Get a YouTube video transcript

Full transcript for one video, plus title/author/thumbnail metadata. One block of text by default; add 'timestamps=true' to also get 'segments', one {start, duration, text} per caption line (times in seconds). Same credit cost either way. Provenance: language_code is the caption track actually returned and can differ from requested_language (YouTube falls back to the track it has); caption_type is 'manual' (creator-uploaded) or 'auto' (speech recognition), null when unknown for older transcripts; cached says whether it came from our stored copy, fetched at fetched_at. Failed requests (no captions, unavailable video) are never charged.

get/transcript

Request

  • Base URL: https://getyoutubetranscript.com/api/v1
  • URL: https://getyoutubetranscript.com/api/v1/transcript
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Query parameters

vstring required

YouTube video URL (full or short) or an 11-character video ID.

languagestring

Caption language code, e.g. 'en', 'es'.

timestampsboolean

Set to 'true' to include 'segments': per-line {start, duration, text} timestamps in seconds, e.g. for citing a moment in the video. Off by default because it roughly doubles the response size.

translatestring

Language code to machine-translate the transcript into, e.g. 'es', 'de', 'zh-CN'. Each caption line is translated in place, so timestamps stay aligned. The response adds 'translated_to'; 'language_code' stays the source track. Same 1-credit cost.

Response

Transcript retrieved. 'segments' is present only when timestamps=true.

Changes

No recorded changes to this operation across all 1 revision of this API.