How to get YouTube video details
GET request to /v1/youtube/video-details with your input. You get clean JSON back in seconds for 1 credit per call — no OAuth, scraping or platform SDKs. YouTube video metadata + stats. Always includes degraded / degradedReason — retry when degraded is true.How to get YouTube video details (step by step)
- 1
Get a free API key
Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.
- 2
Call the YouTube Video Details API
Send an authenticated GET request to /v1/youtube/video-details with your input. No OAuth, no scraping setup.
- 3
Read the JSON response
Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.
Code example
curl "https://api.captapi.com/v1/youtube/video-details?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."What the response looks like
{
"success": true,
"data": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"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 and listen to Rick’s ‘Never’ playlist ❤️ #RickAstleyNever\nhttps://linktr.ee/rickastleynever\n\n“Never Gonna Give You Up” was a global smash on its release in July 1987, topping the charts in 25 countries including Rick’s native UK and the US Billboard Hot 100. It also won the Brit Award for Best single in 1988. Stock Aitken and Waterman wrote and produced the track which was the lead-off single and lead track from Rick’s debut LP “Whenever You Need Somebody”. The album was itself a UK number one and would go on to sell over 15 million copies worldwide.\n\nThe legendary video was directed by Simon West – who later went on to make Hollywood blockbusters such as Con Air, Lara Croft – Tomb Raider and The Expendables 2. The video passed the 1bn YouTube views milestone on 28 July 2021.\n\nSubscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/YTSubID\n\nFollow Rick Astley:\nFacebook: https://RickAstley.lnk.to/FBFollowID \nTwitter: http …",
"channelName": "Rick Astley",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"publishedAt": "2009-10-24T23:57:33-07:00",
"durationSeconds": 213,
"viewCount": 1797826473,
"likeCount": 19283915,
"commentCount": 2400000,
"thumbnailUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddefault.webp",
"genre": "Music",
"categoryId": "10",
"tags": [
"rick astley",
"Never Gonna Give You Up"
],
"durationFormatted": "00:03:33"
}
}Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Public YouTube video URL, e.g. https://youtube.com/watch?v=ID. Not a TikTok/Instagram/Facebook URL. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. |
Frequently asked questions
What does the YouTube Video Details API do?
The YouTube Video Details API lets you fetch full metadata and key stats from a public YouTube video using one GET request to /v1/youtube/video-details. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the YouTube Video Details API cost?
Each successful call costs 1 credit. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.
Do I need a YouTube API key or OAuth?
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
Where are degraded / degradedReason / timings? The title mentions them.
On every 200. degraded is a boolean; degradedReason is null or "partial-extraction" (retry — publishedAt or likeCount missed after the watch-page retry). timings.path is android | watch | android+watch. They were always in the payload; the field list and example now include them.
Why is channelVerified null on a verified channel?
ANDROID videoDetails omits ownerBadges. We now read videoOwnerRenderer on the player and the watch-page ytInitialData. null still means unread this call — not unverified. /youtube/channel-details.verified is the About-page badge.
Why is likeCount the only counter without a compact token in the old docs?
likeCount comes from the watch-page accessibility label (the true integer; the visible chrome may say 19M). likeCountIsApproximate is now always keyed and uses the same CP-F rule as commentCount (v ≥ 10000 and v % 100 === 0, or a K/M/B suffix). Exact accessibility integers stamp false. commentCountIsApproximate is always keyed too — false when commentCount is null.
When do caption URLs die?
availableCaptions[].expiresAt is the URL's expire= unix timestamp (typically ~7h), or null when the timedtext URL is unsigned. Same parse as TikTok media[].expiresAt.
Is the YouTube Video Details API suitable for production use?
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
Ready to get YouTube video details?
Start free with 100 credits — no credit card required.
Get your free API key