YouTube Metadata
You can get YouTube video metadata by providing a YouTube video ID to the youtube_metadata source.
Note that the parse parameter set to true is required. Render parameter is not allowed.
Request samples
The following examples demonstrate how to retrieve the metadata of a YouTube video.
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "youtube_metadata",
"query": "tIgIF5lve8U",
"parse": true
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'youtube_metadata',
'query': 'tIgIF5lve8U',
'parse': true
}
# 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.
Request parameter values
Generic
Parameter
Description
Default Value
source
Sets the scraper.
youtube_metadata
query
YouTube video ID.
-
parse
Enables parsing when set to true.
-
- mandatory parameter
Last updated
Was this helpful?

