API Reference

YouTube Video

Get metadata for a YouTube video including title, description, view count, likes, duration, tags, and channel info.

Use this to get a video's title, description, channel, publish date, duration, and view, like, and comment counts. Useful for tracking video performance and enriching video lists.

2 credits per request.

Quick example

curl -G "https://api.webscraperapi.ai/v1/youtube_video" \
  -H "Authorization: Bearer $WEBSCRAPERAPI_API_KEY" \
  --data-urlencode "video_id=hHQlcnubuFI" \
  --data-urlencode "output=json"

video_id takes a video ID or a full YouTube URL. Pass the returned channel_id to YouTube Channel to get details on the channel.

Full API reference

GET
/v1/youtube_video

Query Parameters

video_id*string

YouTube video ID or URL.

Length1 <= length
output?|

Output format. Defaults to json.

timeout_ms?|

Request timeout in milliseconds.

Response Body

application/json

application/json

curl -X GET "https://api.webscraperapi.ai/v1/youtube_video?video_id=string"
null
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}