get_subtitles
Retrieve YouTube video subtitles as text, preferring human captions and falling back to auto-generated tracks. Supports language selection, timestamped excerpts, and resumable reading for long videos.
Instructions
Read a video's subtitles as text.
Returns human-written captions when they exist, otherwise the
auto-generated track. Output is truncated at `max_chars`; when that
happens the response ends with the timestamp to resume from, which
you pass back as `start_time` to read on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Preferred language codes, comma-separated and in priority order (e.g. 'ko,en'). Falls back left to right. | en |
| video | Yes | YouTube URL or 11-character video ID | |
| refresh | No | Bypass the cache and refetch. Transcripts are cached on disk for 30 days; use this only when the captions are known to have changed. | |
| end_time | No | End of the excerpt, in seconds. | |
| max_chars | No | Character budget for the returned text. | |
| start_time | No | Start of the excerpt, in seconds. | |
| timestamps | No | Prefix each block with its start time. Costs roughly 15% more tokens; enable only when you need to cite or link to moments in the video. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |