Get YouTube transcript
get_transcriptFetch YouTube video transcripts with timestamps in text, JSON, SRT, or WebVTT formats; choose caption languages and continue long transcripts by start time.
Instructions
Fetch the transcript (captions) of a YouTube video: what is said in it, with timestamps. Default output is plain text, one "[HH:MM:SS.mmm] text" line per caption, preceded by a header line with the video ID, language, language code and whether the captions are auto-generated. format "json" returns compact JSON {video_id, language, language_code, is_generated, snippets:[{text, start, duration}]}; "srt" and "webvtt" return subtitle files exactly as the API formats them (no header). Languages are tried in the order given and the first available one is returned; if none exists the tool says so, and list_transcripts shows what is available. Output longer than max_characters is cut at a whole line with a note telling you how to read on with start_seconds. A request can take up to about 75 seconds for uncached videos. Each call (including one with start_seconds) counts as one request against the user's plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"video": "<video>"
},
"name": "get_transcript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | "manual" = human-made captions only, "generated" = YouTube auto-generated only, "any" (default) = manual if available, else auto-generated. | any |
| video | Yes | The YouTube video. Pass the 11-character video ID (e.g. dQw4w9WgXcQ) or a YouTube video URL: youtube.com/watch?v=ID, youtu.be/ID, youtube.com/shorts/ID, youtube.com/embed/ID, youtube.com/live/ID (m.youtube.com and music.youtube.com work too). Other youtube.com URLs with a v= parameter also work. | |
| format | No | "text" (default, most compact; best for reading, summarizing or quoting), "json" (snippets with start and duration in seconds, for precise timing), "srt" or "webvtt" (subtitle files, when the user wants one). | text |
| languages | No | Language codes (BCP 47, e.g. "en", "es", "pt-BR", "zh-Hans") in priority order; the first one available is returned. At most 10. Default ["en"]. If unsure which exist, call list_transcripts first. | |
| start_seconds | No | Only return captions that start at or after this time in seconds (text and json formats only). Use the value from a truncation note to continue reading a long transcript. Default 0. | |
| max_characters | No | Maximum characters of transcript to return (default 100,000, roughly 25k tokens or about 1.5-2 hours of speech). Longer output is cut at a whole line with a note. Lower it to save context, raise it to get a long video in one call. | |
| preserve_formatting | No | Keep YouTube's HTML formatting tags (<i>, <b>) in caption text. Default false. Rarely needed; bypasses the API's cache. |