For the complete documentation index, see llms.txt. This page is also available as Markdown.

Metadata

Retrieve parsed metadata for a YouTube video by video ID.

You can get YouTube video metadata by providing a YouTube video ID to the youtube_metadata source.

Request samples

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

Parameter
Description
Default Value

source

Sets the scraper. Use youtube_metadata

query

YouTube video ID.

parse

Enables parsing. Must be set to true.

callback_url

URL to your callback endpoint. More info

– mandatory parameter

Output sample

Error codes

Code
Status
Description

11201

VIDEO_DELETED

Video is deleted.

11203

VIDEO_PRIVATE

Video is set to private by uploader and only they and explicitly invited people can see it.

11204

VIDEO_GEO_RESTRICTED

Video is geo-restricted.

11205

VIDEO_LIVE

Video is live now.

11206

VIDEO_AGE_RESTRICTED

Video is age restricted.

11207

VIDEO_MEMBER_ONLY

Video is for channel members only, and viewers have to pay the monthly subscription fee.

11208

VIDEO_PREMIUM_ONLY

Video requires the YouTube Premium subscription.

Last updated

Was this helpful?