Get YouTube transcript (v2)
Changed onGet a YouTube video's transcript — pass a video URL or 11-character ID as video_url.
By default you get English, or the video's first available language if there's no English.
To choose a language, set language to a comma-separated list in priority order; we return the first one that's available. Example: language=de,en,asr tries German, then English, then the auto-generated captions.
- asr = the video's auto-generated captions (ASR = automatic speech recognition).
- asr-<code> = auto-generated captions in a specific language, e.g. asr-hi.
- A plain code like hi returns the human-made captions if they exist, otherwise the auto-generated ones (asr-hi).
- Language codes ignore region (de matches de-DE) and are case-insensitive. Up to 10 codes.
The language field in the response always tells you exactly what you got. Tip: call GET /api/v2/youtube/info first (it's free) to see which languages a video offers.
Request
- Base URLhttps://transcriptapi.com
- AuthHTTP bearer
Query parameters
YouTube video URL or bare 11-char ID
Optional comma-separated language priority list (e.g. de,en,asr). Omit it to get English, or the video's first available language. We return the first code that's available. asr = auto-generated captions; asr-<code> = a specific auto language (e.g. asr-hi). Codes ignore region (de matches de-DE). The response's language field tells you exactly what you got — ask for hi and you'll see asr-hi if only auto-generated captions exist.
Only used with language. true (default): a plain code like hi returns the human-made captions when they exist, otherwise the auto-generated ones. false: a plain code returns human-made captions only; if none exist for any code you listed you get a 404 with available_languages (no credit used). With false, a plain code whose kind is auto is skipped and the next code is tried. asr / asr-<code> still ask for auto-generated captions.
Include basic video metadata in response
Available transcript formats for v2 (restricted).
Response format: json or text
Include timestamps in transcript output
Response
Transcript retrieved successfully
Changes
- info
added the new optional
queryrequest parameterlanguage_fallback - info
added the optional property
//to the response with the status
- info
- warning
the optional response header
X-RateLimit-Limitremoved for the status429 - warning
the optional response header
X-RateLimit-Remainingremoved for the status429 - warning
the optional response header
X-RateLimit-Resetremoved for the status429
- warning