API · YouTube
GET /youtube/videos/{id}
A YouTube video or Short: details, exact views, likes and comments, channel, chapters, captions, paid-promotion flag, up next.
| |
|---|
| Request | GET /v1/youtube/videos/{id} |
| Operation id | youtube.video.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A YouTube video or Short: details, exact views, likes and comments, channel, chapters, captions, paid-promotion flag, up next.
| Name | Type | Required | Description |
|---|
id | string | yes | A video or Short id, or any URL of it (watch, youtu.be, shorts, live, embed). Example: dQw4w9WgXcQ. |
| Name | Type | Required | Description |
|---|
language | string | no | ISO 639-1 language code (en, es, pt-BR). Example: en. |
| Status | Meaning | Schema |
|---|
200 | The video. | YouTubeVideo |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The video, channel, playlist or post does not exist, was removed, or has nothing there. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | YouTube is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
kind | "youtube#video" | |
id | string | |
snippet | object | |
contentDetails | object | |
statistics | object | |
statisticsAreApproximate | boolean | True when the counts came from an abbreviated label ("1.2M views") on a list row. |
status | object | |
paidProductPlacementDetails | object | The creator disclosed a paid promotion ("Includes paid promotion"). |
liveStreamingDetails | object | |
isShort | boolean | A Short (not a Data API field). |
channel | YouTubeChannelRef | The channel a video or post belongs to (not a Data API part). |
chapters | YouTubeChapter[] | |
captionTracks | YouTubeCaptionTrack[] | |
descriptionLinks | string[] | Links in the description, unwrapped from YouTube’s redirect. |
related | YouTubeVideo[] | The “up next” videos YouTube shows beside it (summaries). |
Errors use one shape everywhere; see Errors for every code and what to do.