YouTube transcript / captions
youtube_transcriptExtract existing captions from public YouTube videos or Shorts as text, JSON, Markdown, SRT, VTT, or LLM-ready chunks, with optional language and source selection.
Instructions
Get the transcript of a public YouTube video or Shorts from its existing captions (manual or auto-generated). Formats: 'text' (plain transcript, default), 'json' (metadata plus timestamped segments), 'llm' (ordered timestamped chunks for RAG/summaries), 'markdown' (readable with timestamps), 'srt' or 'vtt' (subtitle files). Optionally pick a language tag (e.g. en, es, pt-BR) and caption source. When language is omitted the API prefers manual English, then automatic English, then the first available track. Waits up to ~2 minutes; if still running, returns a jobId for get_job. Fails with TRANSCRIPT_NOT_AVAILABLE when the video has no matching captions (no speech-to-text fallback).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | YouTube video/Shorts URL or an 11-character video ID | |
| format | No | Output format. Default: text | |
| source | No | Caption source: preferred (default), manual (human captions only) or automatic (auto-generated only) | |
| language | No | Caption language tag such as en, en-US, de, pt-BR. Omit for automatic selection. | |
| maxChars | No | Truncate the returned transcript to this many characters. Default: 100000 | |
| chunkSize | No | Target characters per chunk for the 'llm' format (500-12000, default 4000) | |
| maxWaitSeconds | No | How long to wait for completion before returning a jobId. Default: 120 |