YouTube Video API
Get one video from its link or ID: title, description, channel, views, likes, length, category, keywords and publish date.
- 1 credit per call
- Failed calls are free
- Updated
- youtube.video.get
{ "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)", "like_count": 19482118, "view_count": 1825190023, "category": "Music", "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw", "channel_name": "Rick Astley", "channel_subscriber_count": "4.55M subscribers", "channel_url": "/@RickAstleyYT", "date_text": "Oct 24, 2009", "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy a…", "duration_seconds": 213, "embed_url": "https://www.youtube.com/embed/dQw4w9WgXcQ", "full_description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy a…", "is_family_safe": true, "is_live": false, "is_live_content": false, "is_private": false, "is_unlisted": false, "like_count_text": "19M", "metadata_complete": true, "publish_date": "2009-10-24T23:57:33-07:00", "upload_date": "2009-10-24T23:57:33-07:00", "video_id": "dQw4w9WgXcQ", "view_count_text": "1,825,190,023 views", "most_replayed": { "video_id": "dQw4w9WgXcQ", "segments": [ { "duration_seconds": 2.14, "intensity": 1, "start_seconds": 0 }, { "duration_seconds": 2.14, "intensity": 0.4230315549340408, "start_seconds": 2.14 } ] }, "keywords": [ "rick astley", "Never Gonna Give You Up" ]}
What you send
The input
object of the request, with every field the endpoint accepts.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| url | string | yes | The video's link or its 11-character ID. Shorts and live links work too. | https://www.youtube.com/watch?v=dQw4w9WgXcQ |
Fields it returns
What each record in the response holds, with the values from the sample above.
| Field | Type | What it is | Example |
|---|---|---|---|
| title | string | The video's title. | Rick Astley - Never Gonna Give You Up (Official Video) (4K Rema… |
| channel_name | string | The channel that posted the video. | Rick Astley |
| view_count | integer | Views, as YouTube shows them. | 1,825,190,023 |
| like_count | integer | Likes, as YouTube shows them. | 19,482,118 |
| duration_seconds | integer | The video's length, in seconds. | 213 |
| category | string | The video's category. | Music |
| publish_date | string | When the video was published. | 2009-10-24T23:57:33-07:00 |
| channel_id | string | YouTube's ID for the channel. | UCuAXFkgsw1L7xaCfnd5JJOw |
| channel_subscriber_count | string | The channel's subscribers, as YouTube writes them. | 4.55M subscribers |
| channel_url | string | The channel's address on YouTube. | /@RickAstleyYT |
| date_text | string | The publish date as YouTube writes it. | Oct 24, 2009 |
| description | string | The start of the video's description. | The official video for “Never Gonna Give You Up” by Rick Astley… |
| embed_url | string | The link to embed the video. | https://www.youtube.com/embed/dQw4w9WgXcQ |
| full_description | string | The video's full description. | The official video for “Never Gonna Give You Up” by Rick Astley… |
| is_family_safe | boolean | Whether YouTube marks it as family safe. | true |
| is_live | boolean | Whether it is live now. | false |
| is_live_content | boolean | Whether the video was a live stream. | false |
| is_private | boolean | Whether the video is private. | false |
| is_unlisted | boolean | Whether the video is unlisted. | false |
| keywords | array | Keywords set by the channel. | rick astley, Never Gonna Give You Up, nggyu |
| like_count_text | string | Likes as YouTube writes them. | 19M |
| metadata_complete | boolean | Whether every video detail was available. | true |
| most_replayed | object | Which parts of the video viewers replay most. | 2 fields |
| most_replayed.segments | array | The video in short parts, each with how often it is replayed. | 100 records |
| most_replayed.segments[].duration_seconds | number | The part's length, in seconds. | 2.14 |
| most_replayed.segments[].intensity | integer | 1 | |
| most_replayed.segments[].start_seconds | integer | 0 | |
| most_replayed.video_id | string | YouTube's ID for the video. | dQw4w9WgXcQ |
| upload_date | string | When the video was uploaded. | 2009-10-24T23:57:33-07:00 |
| video_id | string | YouTube's ID for the video. | dQw4w9WgXcQ |
| view_count_text | string | Views as YouTube writes them. | 1,825,190,023 views |
Call it from your code, or ask your agent
Set UPSCRAPE_API_KEY to your key and copy a working request.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "youtube.video.get", "input": { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "youtube.video.get", "input": { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "youtube.video.get", "input": { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
https://data.upscrape.com/mcp
Use Upscrape to get the YouTube video youtube.com/watch?v=dQw4w9WgXcQ. How many views and likes does it have, and when was it published?
More from the YouTube API
- YouTube Channel API1 credit
- YouTube Channel Videos API1 credit
- YouTube Search API1 credit
- YouTube Comments API1 credit
- YouTube Channel Shorts API1 credit
- YouTube Channel Live Streams API1 credit
- YouTube Channel Playlists API1 credit
- YouTube Playlist API1 credit
- YouTube Channel Community API1 credit
- YouTube Community Post API1 credit
- YouTube Hashtag Videos API1 credit
- YouTube Typeahead Search API1 credit
- YouTube Trending Shorts API1 credit
The same data from other platforms
YouTube Video API FAQ
The short answers. The docs have the long ones.
How much does the YouTube Video API cost?
1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send url. The input fields below list every option with its type and limits.
Do I need a YouTube login?
No. It reads public YouTube data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds youtube.video.get, checks its price and runs it with the same credits as the REST API.
Your first YouTube call is free.
Up to 100 free credits to start, no card needed.