get_video_transcript
Retrieve YouTube video transcripts or captions, manual or auto-generated, with timestamps, language selection, and pagination for AI agents.
Instructions
Get YouTube video transcript/captions (manual or auto-generated) with timestamps. Use 'lang' to pick a language code (e.g. 'en', 'id'), or omit it to get the first manual track (else the first auto-generated one); get_transcript_languages lists the codes. Returns both timestamped and plain text versions, paginated with startSegment/nextStartSegment. available=false with reason NO_CAPTIONS or LANGUAGE_UNAVAILABLE when captions are absent; access problems (ACCESS_BLOCKED etc.) are errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language code for the transcript (e.g., 'en', 'id', 'ja'). Omit to get the first manual track, or the first auto-generated one if there is no manual track. get_transcript_languages lists the codes. | |
| video | Yes | YouTube video URL or video ID | |
| maxSegments | No | Maximum number of transcript segments to return. 0 (default) returns as many as the server allows per response (currently 500). Use with startSegment for pagination. | |
| startSegment | No | Segment index to start from (0-based). Use nextStartSegment from the previous response to paginate through long transcripts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why available is false | |
| hasMore | Yes | ||
| message | No | ||
| videoId | Yes | ||
| segments | Yes | ||
| available | Yes | ||
| plainText | Yes | ||
| languageCode | Yes | Language of the returned track; the requested code when unavailable; null when none was requested and the video has no captions | |
| startSegment | Yes | ||
| totalSegments | Yes | ||
| isAutoGenerated | No | Whether the returned track is YouTube's automatic (ASR) captions; null if unknown | |
| nextStartSegment | Yes | ||
| returnedSegments | Yes | ||
| availableLanguages | No | Language codes that do exist, when reason is LANGUAGE_UNAVAILABLE |