YouTube Transcript API
YouTube's published captions with timestamps — not speech-to-text.
Returns the captions YouTube publishes for a video — manual or auto-generated. It does not perform speech-to-text. Long live streams and VODs frequently have no auto-captions at all. When there is no caption track this endpoint returns 404 and costs 0 credits (strictly better than charging for a null body); use /v1/youtube/audio-transcript to transcribe the audio directly (priced per minute). The 404 body includes code (no_captions / language_not_available / video_unavailable), reason, availableLanguages[], hasAutoCaptions, and — when the video is reachable with audio but has no tracks — a suggestion block with estimatedCredits for audio-transcript. video_unavailable (deleted, private, or otherwise unplayable) does not include that suggestion. Success responses use the same transcript vocabulary as audio-transcript / Rumble: text + segments[{text,startMs,endMs}], plus source: "captions", requestedLanguage, and returnedLanguage (no redundant language twin). Pass language to require that track; there is no silent fallback. Flat 1 credit on success.
Request
- Base URL: https://api.captapi.com
- URL: https://api.captapi.com/v1/youtube/transcript
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Query parameters
Public YouTube video URL, e.g. https://youtube.com/watch?v=ID. Not a TikTok/Instagram/Facebook URL. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble.
Preferred caption language as an ISO code, e.g. "en". Defaults to auto-detect.
Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
Response
Success. The data object for this endpoint.
Changes
No recorded changes to this operation across all 3 revisions of this API.