YouTube
Learn how to get YouTube data using the Web Scraper API. Discover all supported YouTube sources and get started.
With Web Scraper API, you can extract and parse various types of YouTube data. Below is an overview of all supported YouTube source values.
youtube_search
Up to 20 search results for a search term of your choice.
youtube_search_max
Up to 700 search results for a search term of your choice.
youtube_video_trainability
Information about whether a YouTube video is eligible for AI training purposes.
youtube_download
Audio/video content of a YouTube video of your choice.
youtube_transcript
The transcript of a YouTube video of your choice.
youtube_subtitles
The subtitles of a YouTube video of your choice.
youtube_metadata
The metadata of a YouTube video of your choice.
youtube_channel
All channel data, including a list of videos
youtube_autocomplete
Search bar autocomplete suggestions for any search term
Getting started
Create your API user credentials: sign up for a free trial or purchase the product in the Oxylabs dashboard to create your API user credentials (USERNAME and PASSWORD).
If you need more than one API user for your account, please contact our customer support or message our 24/7 live chat support.
Request sample
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "youtube_search",
"query": "how to make a website"
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'youtube_search',
'query': 'how to make a website'
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('user', 'pass1'),
json=payload,
)
# Print the JSON response with the result.
pprint(response.json())We use synchronous Realtime integration method in our examples. If you would like to use Push-Pull integration, refer to the Integration Methods section.
Last updated
Was this helpful?

