Endpoint
Request body
string
required
YouTube video URL. Supported formats:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_ID
string[]
default:"['en']"
ISO 639-1 language codes for caption preference (e.g.,
["en", "es", "fr"]). The first available language will be used.Response
string
required
Response status:
"ok" on success, "error" on failurestring
Full transcript text with timestamps in the format:Only present when
status is "ok".string
required
Normalized video URL
string
required
11-character YouTube video ID extracted from the URL
string
Video title (when available)
string
Language code of the returned transcript (e.g.,
"en", "es")number
Word count in the transcript
string
Extraction method used:
"yt-dlp" (fast) or "browser" (fallback)object[]
List of available caption languages when using browser fallback method
Error response
Whenstatus is "error":
number
Error code (e.g.,
404 for no captions available)string
Human-readable error description
Two-tier extraction approach
Fast path: yt-dlp
When yt-dlp is installed, the server uses it for fast, reliable caption extraction:- No browser needed
- Completes in 2-5 seconds
- Supports subtitle formats: JSON3, VTT, SRV3
- Auto-downloads and parses captions
Fallback: Browser intercept
If yt-dlp is not available, the server:- Launches a browser session
- Navigates to the video URL
- Mutes and plays the video
- Intercepts the caption network request (
/api/timedtext) - Parses the intercepted caption data
Language selection
Captions are requested in the order specified in thelanguages array. The first available language is returned.
ISO 639-1 codes: Use standard two-letter codes (en, es, fr, de, ja, etc.) or extended codes with region (en-US, pt-BR).
If the requested language is unavailable, the endpoint returns an error with available languages listed.
Error codes
Examples
Basic request
Multi-language request
Error response (no captions)
Error response (invalid URL)
Use cases
- Analyze video content without watching
- Generate summaries or key insights from video transcripts
- Index video content for search
- Accessibility: convert video content to text
- Multi-language content analysis
- Research and data extraction from educational videos
Performance
Limitations
- Videos without captions will return a 404 error
- Private or age-restricted videos may fail
- Browser fallback can be interrupted by YouTube ads or anti-bot measures
- The endpoint does not bypass YouTube’s Terms of Service - use responsibly