← yTranscript

YouTube Transcript API

Reliable transcript extraction over a simple REST endpoint. We handle YouTube's bot detection, IP rotation, and captionless videos (Whisper fallback) — you just call an API that works. The same key returns video metadata (title, views, chapters and more) and lists the videos of any channel or playlist. Start free, no card required.

Your IPs stay clean

Open-source libraries get your servers blocked. With us, YouTube's bot detection becomes our problem, not yours — and failed requests are never charged.

Captionless videos work

Videos with no captions fall back to Whisper speech-to-text automatically. One endpoint, every video.

Simple JSON

Timestamped segments with language detection, plus video metadata on request. No XML scraping, no player-response parsing.

Quickstart

curl "https://ytranscript.com/api/v1/transcript?videoId=dQw4w9WgXcQ" \
  -H "Authorization: Bearer yk_live_YOUR_KEY"
{
  "video_id": "dQw4w9WgXcQ",
  "lang": "en",
  "whisper": false,
  "cached": false,
  "units_charged": 1,
  "segments": [
    { "text": "We're no strangers to love", "offset": 18800, "duration": 3600 },
    ...
  ]
}

Use it from Claude, Cursor, and VS Code

Our MCP server gives your AI assistant two tools: get_transcript and get_video_info. Ask it to summarize a video, find where a topic comes up, translate what was said, or check a video's length and chapters first. It works with any plan, including Free. Claude Code:

claude mcp add ytranscript -e YTRANSCRIPT_API_KEY=yk_live_YOUR_KEY -- npx -y ytranscript-mcp

Claude Desktop and Cursor use this config. VS Code uses the same entry under "servers":

{
  "mcpServers": {
    "ytranscript": {
      "command": "npx",
      "args": ["-y", "ytranscript-mcp"],
      "env": { "YTRANSCRIPT_API_KEY": "yk_live_YOUR_KEY" }
    }
  }
}

Setup for every client: GitHub · npm

Client libraries

JavaScript and TypeScript: ytranscript-api. Fully typed, and a failed request throws a YTranscriptError with the error code.

npm install ytranscript-api

import { YTranscript } from "ytranscript-api";
const yt = new YTranscript(process.env.YTRANSCRIPT_API_KEY);
const t = await yt.transcript("dQw4w9WgXcQ", { maxUnits: 15 });
console.log(t.text);

No code at all: the YouTube Transcript Scraper on Apify runs the same API in bulk, paid per result, with no yTranscript account needed.

Reference

GET /api/v1/transcript
ParameterTypeDescription
videoIdstring11-character YouTube video ID
urlstringFull YouTube URL (alternative to videoId)
langstring, optionalPreferred language code (e.g. en, es). Defaults to the video's source language. If the video has no captions in that language, it is transcribed with AI in the language actually spoken (charged as AI transcription, limited by max_units): check lang in the response. If AI transcription can't run, you get the video's default captions and a notice.
metadataboolean, optionalSet to true to add a metadata object (the fields of /api/v1/video) at no extra cost. It is null if the metadata can't be read; the transcript is still returned.
max_unitsinteger, optionalThe most this request may cost. If the video has no captions and AI transcription would cost more, you get 422 max_units_exceeded with the estimate and nothing is charged. Use max_units=1 for captions only.
Transcript response fields
video_idThe 11-character video ID.
langLanguage code of the transcript returned, such as en.
whispertrue when the video has no captions and was transcribed with AI.
cachedtrue when served from our cache (a repeat request within 24 hours).
units_chargedUnits this request cost.
audio_secondsOnly on a live AI transcription: the audio length the charge is based on.
noticeOnly when the transcript isn't in the lang you asked for: the video has no captions in it and AI transcription couldn't run (for example max_units was too low), so these are the video's default captions. Says why.
segmentsArray of { text, offset, duration }. offset and duration are in milliseconds.
metadataOnly with metadata=true: the /api/v1/video fields, or null if they could not be read.
GET /api/v1/video

Metadata for one video: title, description, duration, views, likes, publish date, channel, tags, category, chapters and thumbnails. Takes videoId or url, like the transcript endpoint.

curl "https://ytranscript.com/api/v1/video?videoId=dQw4w9WgXcQ" \
  -H "Authorization: Bearer yk_live_YOUR_KEY"
{
  "video_id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "description": "The official video for ...",
  "duration_seconds": 213,
  "view_count": 1836735032,
  "like_count": 19502415,
  "published_at": "2009-10-24T23:57:33-07:00",
  "channel": {
    "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "name": "Rick Astley",
    "handle": "@RickAstleyYT",
    "url": "https://www.youtube.com/@RickAstleyYT",
    "subscriber_count": 4560000
  },
  "tags": ["rick astley", "never gonna give you up", ...],
  "category": "Music",
  "chapters": [{ "title": "Intro", "start_seconds": 0 }, ...],
  "thumbnails": [{ "url": "https://i.ytimg.com/vi/...", "width": 480, "height": 360 }, ...],
  "is_live": false,
  "cached": false,
  "units_charged": 1
}

duration_seconds, tags and category can be null, and published_at can be a date without a time, when YouTube limits what it shows our servers. Counts are YouTube's own; subscriber_count is rounded the way YouTube displays it.

GET /api/v1/videos

The videos of a channel (newest first) or a playlist (in its own order), with title, publish date, length and views. Use it to transcribe a whole channel, or to check for new videos since a date.

ParameterTypeDescription
channelstringAn @handle, a channel URL or a channel ID (UC...). Lists the channel's uploads.
playliststringA playlist ID or a URL with list= (alternative to channel). Mixes, Watch Later and private playlists are not supported.
contentstring, optionalChannels only: all (default) for every upload including Shorts and live streams, or videos for regular videos only.
published_afterstring, optionalA date, YYYY-MM-DD (UTC): only videos published on or after it. A channel's list ends at the first older video; a playlist is read through and older videos are left out. Older videos have estimated dates, so a few from just before the date can be included: check published_at_exact.
limitinteger, optionalHow many videos to return, 1 to 500. Default 100.
cursorstring, optionalnext_cursor from the previous response, to get the next videos. It carries channel, playlist, content and published_after, so those are not repeated.
curl "https://ytranscript.com/api/v1/videos?channel=@lexfridman&published_after=2026-11-01" \
  -H "Authorization: Bearer yk_live_YOUR_KEY"
{
  "type": "channel",
  "channel_id": "UCSHZKyawb77ixDdsGog4iWA",
  "playlist_id": "UUSHZKyawb77ixDdsGog4iWA",
  "title": "Uploads from Lex Fridman",
  "videos": [
    {
      "video_id": "v1X9Fqs5a14",
      "title": "GTA 6, Crime, Prison Gangs, Jewel Heists ... | Lex Fridman Podcast #505",
      "published_at": "2026-11-19T03:15:09.000Z",
      "published_at_exact": true,
      "published_text": "5 days ago",
      "duration_seconds": 12074,
      "view_count": 276000
    }
  ],
  "next_cursor": null,
  "units_charged": 1
}
typechannel or playlist.
channel_idThe channel ID (UC...) when listing a channel, otherwise null.
playlist_idThe playlist that was listed. For a channel, its uploads playlist.
titleThe playlist title, such as "Uploads from Lex Fridman".
videosA channel's videos newest first; a playlist's in the playlist's own order. Each has video_id, title, published_at, published_at_exact, published_text, duration_seconds and view_count.
published_atIn each video: the exact publish time (ISO 8601) when published_at_exact is true, as it is for the newest 15. Otherwise a date (YYYY-MM-DD) estimated from published_text: the latest the video can have been published. null when YouTube shows no date.
published_at_exactIn each video: whether published_at is exact.
published_textIn each video: YouTube's own wording, such as "3 weeks ago".
next_cursorPass it as cursor to get the next videos. null when there are no more (or published_after was reached). It can also be set when one request read its maximum of 2,000 videos of a playlist without filling limit.
units_chargedUnits this request cost: 1 per started 100 videos returned, at least 1. A follow-up page (with cursor) that has no videos costs nothing.

Units: caption transcripts cost 1 unit. AI transcription (videos with no captions) costs 1 unit per minute of audio, with a minimum of 5; the response reports units_charged and audio_seconds. Video metadata costs 1 unit, or nothing extra when you ask for it with a transcript (metadata=true). Listing a channel or playlist costs 1 unit per 100 videos returned. Failed requests cost nothing.

No surprise charges: a repeat request for the same video within 24 hours costs 1 unit, even if the first one needed AI transcription, and max_units lets you set the most a request may cost before any AI transcription starts.

Price lock: the price you sign up at is yours for as long as you stay subscribed. If our prices change, yours can only go down. Accounts with an API key created on or before November 16, 2026 never pay more than 15 units for an AI transcript, however long the video.

Timing: caption transcripts usually return in 2 to 3 seconds. AI transcriptions download the audio first and can take several minutes on long videos, so use a client timeout of at least 300 seconds.

Headers:

  • X-Quota-Limit: Your plan's monthly units.
  • X-Quota-Used: Units used this month, including this request.
  • X-RateLimit-Remaining: Requests left in the current minute.
  • X-TopUp-Units-Remaining: Top-up units left. Sent once the monthly units are used up and requests draw on top-up units.
  • Retry-After: On 503: seconds to wait before retrying.

Reliability: extraction is an arms race with YouTube — success rates are high but not absolute, which is why failed requests never consume quota. We run multi-strategy fallbacks (edge, direct, residential, AI transcription) so your code only ever sees one endpoint.

Errors

Errors use the HTTP status below and a JSON body with a stable code to branch on, a readable message, and sometimes extra fields. Failed requests are never charged.

{
  "error": {
    "code": "max_units_exceeded",
    "message": "This video has no captions, so it needs AI transcription, which would cost about 9 units. ...",
    "max_units": 5,
    "estimated_units": 9
  }
}
StatusCodeMeaning
400bad_requestNo videoId or url, a value that isn't a YouTube video, or a max_units that isn't a whole number of 1 or more. Video lists: neither or both of channel and playlist, a value that isn't one, or a bad content, published_after, limit or cursor, or a cursor that has expired.
401unauthorizedThe API key is missing, invalid or revoked.
402quota_exceededThe monthly units are used up and there are no top-up units. Upgrade, buy a top-up pack, or wait for the monthly reset (UTC). Extra fields: quota, used, top_up_units.
404no_transcriptTranscript: the video has no transcript we can get. It may be private, removed or age-restricted, or have no speech.
404not_foundVideo info: the video is private, removed or doesn't exist. Video lists: the channel or playlist doesn't exist, is private, or has no public videos.
422max_units_exceededThe video has no captions and AI transcription would cost more than max_units. Nothing was transcribed. estimated_units is null when the length could not be read. Extra fields: max_units, estimated_units.
429rate_limitedToo many requests this minute for your plan. Retry after retry_after_seconds. Extra fields: retry_after_seconds.
500fetch_failedFetching from YouTube failed unexpectedly. Retry.
503temporarily_unavailableYouTube is temporarily blocking our servers. The video isn't missing: retry after the Retry-After header. Extra fields: retry_after_seconds.

Pricing

Free

$0/mo
  • 50 units / month
  • 10 requests / minute
  • Whisper fallback included
  • No card required

Starter

$9/mo
  • 1,000 units / month
  • 30 requests / minute
  • Whisper fallback included
  • Cancel anytime

Developer

$29/mo
  • 10,000 units / month
  • 60 requests / minute
  • Whisper fallback included
  • Email support

Scale

$79/mo
  • 50,000 units / month
  • 300 requests / minute
  • Whisper fallback included
  • Priority support

Need more without a subscription? Pay-as-you-go packs start at $10 for 1,000 units and never expire. Buy them from your dashboard below after signing in.

Your API keys

Checking your account…

YouTube Transcript API - Free Tier, No Card Required