YouTube Video API
Full video or Short metadata by URL or id: title, description, channel, view/like counts and publish date.
$0.80/1k req, pay per request, no subscription.
{"id": "dQw4w9WgXcQ","title": "Official Video","channel": "Rick Astley","durationMs": 213000,"views": 1540000000,"likes": 17200000,"createdUtc": 1256453853,"description": "The official video.",... 7 more fields}
Pricing and providers
YouTube Video API pricing: one API, 3 interchangeable providers
The cheapest provider serves first. If it fails, the next one takes over in the same call.
Try it
Get YouTube video in one request
This sample shows 10 of 18 fields. See every field
{
"found": true,
"data": {
"id": "dQw4w9WgXcQ",
"title": "Official Video",
"channel": "Rick Astley",
"durationMs": 213000,
"views": 1540000000,
"likes": 17200000,
"createdUtc": 1256453853,
"description": "The official video."
}
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
One request, one response shape.
Every field you send and every field you get back, each with a real example.
Last verified 2026-10-31 · uptime and latency measured over 30d
Request body
JSON, posted to this endpoint.
- idstring
YouTube video ID. A Short uses the same ID as any other video.
- requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `authorAvatarUrl`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a video that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. A source that returns only a rounded or shortened value for a field does not count as returning it.
- urlstring
https://www.youtube.com/watch?v=dQw4w9WgXcQ
Full YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work.
Response
JSON, one example value per field.
The video result, or null when not found.
- authorAvatarUrlstringcan require
URL of the publishing channel's avatar image.
- authorIdstring
YouTube channel ID of the publishing channel.
- authorUrlstring
Canonical URL of the publishing channel, tracking query parameters stripped.
- categorystring
YouTube category the video is filed under, for example "Music".
- channelstring
Rick Astley
Name of the channel that published the video. Populated whenever the provider has data for the entity.
- commentsintegercan require
Number of comments. Some sources round large counts (2.4M instead of 2,457,538); name `comments` in requireFields to be served only by a source that returns the exact count.
- createdUtcnumber
1256453853
UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity.
- descriptionstringcan require
The official video.
Video description text. Some sources return it as YouTube displays it, with long links shortened (https://colab.research.google.com/dri...) and YouTube or social links replaced by their titles; name `description` in requireFields to be served only by a source that returns every link intact.
- durationMsinteger
213000
Duration of the video in milliseconds.
- idstring
dQw4w9WgXcQ
Unique identifier of the video. Populated whenever the provider has data for the entity.
- imagestring
URL of the video thumbnail image.
- keywordsstring[]
Keywords the uploader tagged the video with.
- likesinteger
17200000
Number of likes.
- titlestring
Official Video
Title of the video. Populated whenever the provider has data for the entity.
- viewsinteger
1540000000
Number of views.
- foundboolean
true
Whether the video was found.
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
Selling this API? See the full schema your endpoint must return.
FAQ
About the YouTube Video API
The AnyAPI YouTube Video API returns YouTube video data as normalized JSON from one POST call to /v1/run/youtube.video. Full video or Short metadata by URL or id: title, description, channel, view/like counts and publish date. AnyAPI routes each request across 3 sources and falls back automatically when one fails. It costs from $0.80 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.4% of YouTube video calls through AnyAPI succeeded, with a median response time of 4.4 seconds across 52,940 measured calls.