YouTube
GET /v1/youtube/video-details

YouTube Video Details API

YouTube video metadata + stats. Always includes degraded / degradedReason — retry when degraded is true.

1 credit per request
TL;DR
YouTube video metadata + stats. Always includes degraded / degradedReason — retry when degraded is true. The YouTube Video Details API (YouTube) is a single authenticated GET request to /v1/youtube/video-details that responds with clean JSON and costs 1 credit. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the YouTube Video Details API?

Returns title, channel, duration, view/like/comment counts, publishedAt (UTC Z), genre/categoryId, availableCaptions[] with expiresAt, live flags, and the degraded envelope. ANDROID InnerTube supplies engagement; publishDate / genre / @handle / isFamilySafe come from the watch-page microformat (retried once when missing). Every 200 includes degraded (boolean) and degradedReason (null or "partial-extraction") — retry when degraded is true. commentCountIsApproximate and likeCountIsApproximate are always keyed (false when the count is null — unknown is not a compact token). likeCount comes from the watch-page accessibility label and is exact when present; the flag is still stamped (CP-F). defaultLanguage is YouTube's video-language metadata and is usually null on this surface; defaultAudioLanguage is that field when InnerTube sends it, otherwise the first ASR caption languageCode. channelVerified is the watch-page owner badge when exposed; null means unread, not unverified (use /youtube/channel-details.verified). thumbnailUrl is the largest thumbnails[] URL, not a second image. descriptionLinks[] is {url, text} — text is the same-line label or null. Flat 1 credit.

What you get

  • degraded / degradedReason always present (retry on partial-extraction)
  • publishedAt UTC Z + likeCount from watch microformat / accessibility label

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
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_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "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 is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success and a data object with the following fields:

Top-level fields

  • urlCanonical URL of the item.
  • idStable platform ID for the item.
  • titleTitle of the item.
  • descriptionDescription text.
  • channelNameName of the channel.
  • channelIdStable channel id (YouTube UC… when applicable).
  • channelUrlURL of the channel.
  • publishedAtUTC ISO-8601 with millisecond Z (YouTube's microformat offset is normalized). null + degraded when the watch fetch failed.
  • durationSecondsLength in seconds for this item (full media length, or a segment span when the endpoint documents a start/end).
  • viewCountView count.
  • likeCountLike count from the watch-page accessibility label (or InnerTube next fallback) — the true integer, not the visible 19M chrome. null + degraded when unread.
  • commentCountComment count.
  • thumbnailUrlLargest thumbnails[].url. Convenience alias — identical to thumbnails[last].url.
  • genreCategory name from playerMicroformatRenderer (e.g. Music).
  • categoryIdYouTube category id — from the player when present, else mapped from genre.
  • tagsTags attached to the item.
  • durationFormattedHuman-readable duration.

Parameters

NameTypeRequiredDescription
urlstringYesPublic 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.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 1 credit. Pass cache=true for a free 24h cache hit; default is always fresh.

Using an AI agent? This endpoint is the MCP tool youtube_video_details via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/youtube/video-details and parse the JSON response.

Use cases

Analytics

Track views, likes, and engagement over time.

Competitor Monitoring

Benchmark the performance of other creators.

Dashboards

Power reporting and BI with real metadata.

Content Curation

Filter and rank videos by performance.

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.

More YouTube APIs

Ready to use the YouTube Video Details API?

Sign up, grab your key, and make your first call in 60 seconds.

YouTube Video Details API | Captapi — Captapi