Skip to main content
Extract captions from any YouTube video without an API key. Uses a two-tier approach: fast yt-dlp extraction when available, with browser-based fallback.

Endpoint

Request body

string
required
YouTube video URL. Supported formats:
  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
  • https://www.youtube.com/embed/VIDEO_ID
  • https://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 failure
string
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

When status 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
Install yt-dlp:

Fallback: Browser intercept

If yt-dlp is not available, the server:
  1. Launches a browser session
  2. Navigates to the video URL
  3. Mutes and plays the video
  4. Intercepts the caption network request (/api/timedtext)
  5. Parses the intercepted caption data
This method is slower (10-20 seconds) and can be interrupted by YouTube ads.

Language selection

Captions are requested in the order specified in the languages 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

Response:

Multi-language request

Returns Spanish captions if available, otherwise falls back to French, then English.

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

See also