Skip to main content

YouTube Scraper for effortless public YouTube data collection, including video and channel information.

Project description

YouTube Scraper

Oxylabs promo code

With YouTube Scraper, you can easily collect public YouTube data without blocks. Follow this guide to see how to scrape YouTube using Oxylabs’ Scraper API.

How it works

Simply, send a web request to our API and you’ll retrieve the HTML of any public YouTube page you wish to scrape.

Python code example

The below code requests and delivers the HTML content of this Oxylabs video on YouTube:

import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'universal',
    'url': 'https://www.youtube.com/watch?v=SLSGtgKWzxg',
    'render': 'html'
}

# Get a response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),  # Your credentials go here
    json=payload
)

# Instead of response with job status and results URL, this will return the
# JSON response with results.
pprint(response.json())

See Oxylabs documentation for more details.

Output sample

{
    "results": [
        {
            "content":"<!doctype html>
<html lang="en">
<head>
            ...
            </script></body>
</html>
",
            "created_at": "2023-05-18 12:33:40",
            "updated_at": "2023-05-18 12:33:55",
            "page": 1,
            "url": "https://www.youtube.com/watch?v=SLSGtgKWzxg",
            "job_id": "7064941110115745793",
            "status_code": 200
        }
    ]
}

Oxylabs’ YouTube Scraper API will ease your data gathering efforts and you’ll be sure to gather YouTube data like channel information, video details, titles, descriptions, playlists, and more. Reach out to us via live chat or email in case you have any questions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube-video-scraper-api-0.1.3.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

youtube_video_scraper_api-0.1.3-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page