v1

latestOpenAPI 3.1.02026-08-0682678.6 KB
YouTube transcript

Get YouTube transcript (v2)

Get 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.

get/api/v2/youtube/transcript

Query parameters

video_urlstring required

YouTube video URL or bare 11-char ID

YouTube video URL or bare 11-char ID

languagestring nullable

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 captions exist.

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 captions exist.

send_metadataboolean

Include basic video metadata in response

Include basic video metadata in response

format'json' | 'text'

Available transcript formats for v2 (restricted).

Response format: json or text

include_timestampboolean

Include timestamps in transcript output

Include timestamps in transcript output

Response

Transcript retrieved successfully

video_idstring required

YouTube video ID

languagestring required

Language of the returned transcript

length_secondsinteger nullable

Total video length in whole seconds (e.g. 213). null when the source doesn't expose a fixed length — live streams and the rare fallback extraction path.

lengthTextstring nullable

Total video length as a human-readable string, e.g. '3:33' or '1:02:45'. null in the same cases as length_seconds. Matches the lengthText format used by the search/channel/playlist endpoints.