Youtube Get Transcript
youtube_get_transcriptFetch a YouTube video's transcript as plain text, optionally translated.
Instructions
Fetch a YouTube video's transcript as plain text, optionally translated.
Returns the caption text for one 11-character video ID, with the language that was
actually used, whether it is auto-generated, and next_cursor.
Timestamps are OFF by default because each [mm:ss] marker costs tokens; when
include_timestamps is true a marker is inserted wherever the caption minute changes
(a word-level auto-generated track gets far fewer markers than segments).
translate_to asks YouTube to translate the caption track that languages selects into
that language code, so a caller can read a video that has no captions of its own
language. Get valid targets from youtube_list_transcript_languages
(translatable_to). The text returned is YouTube's machine translation, not the
creator's words: it is not a translation this server performed, and it can be wrong.
is_translated is true when the text differs in language from the track it came from,
translated_from carries that track's language code, and is_generated is always true
for a translation because YouTube's translation is machine output. Paging, truncation
and the cursor contract are the same as for an untranslated transcript.
Long transcripts are truncated at the server's RESPONSE_LIMIT and cut on caption
boundaries: read next_cursor and call again with it to get the following page —
next_cursor: null (and truncated: false) means you have the whole thing. Each
page repeats the time anchor of its first segment.
Costs no YouTube Data API quota: transcripts are scraped from YouTube's internal
caption endpoint, not the Data API, and translation is a parameter on that same
endpoint. They are cached forever, so a repeat call is free — translated pages under
their own cache key, never mixed with the untranslated ones. Failures are expected and
specific — captions may be disabled, absent in the requested languages, or the IP may
be blocked (transient). A language the video cannot be translated into is an
INVALID_REQUEST error: check the listing, do not retry. Age-restricted videos cannot
be read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | ||
| video_id | Yes | ||
| languages | No | ||
| translate_to | No | ||
| include_timestamps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| language | Yes | ||
| video_id | Yes | ||
| truncated | Yes | ||
| next_cursor | Yes | ||
| is_generated | Yes | ||
| is_translated | No | ||
| language_code | Yes | ||
| translated_from | No |