YouTube
GET /v1/youtube/audio-transcript

YouTube Audio Transcript API

Speech-to-text for YouTube audio. Use it when a video has no captions — or when you want a transcript of what was actually spoken rather than YouTube's published captions. Priced per started minute of audio.

2 credits/min of audio per request
TL;DR
Speech-to-text for YouTube audio. Use it when a video has no captions — or when you want a transcript of what was actually spoken rather than YouTube's published captions. Priced per started minute of audio. The YouTube Audio Transcript API (YouTube) is a single authenticated GET request to /v1/youtube/audio-transcript that responds with clean JSON and costs 2 credits/min of audio. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the YouTube Audio Transcript API?

Transcribes YouTube audio with Whisper-class ASR when the video has no published captions (or when you want speech-to-text regardless). Separate from /transcript — that endpoint only returns YouTube's caption tracks. Pricing is duration-based and honest: creditsUsed = ceil(durationSeconds / 60) × 2 (badge: 2 credits/min of audio). Success includes estimatedCredits (same number) so maxCredits is usable without doing the arithmetic. Pass maxCredits to refuse expensive jobs before any STT runs (400 cost_exceeds_max, 0 credits). Prefers Groq whisper-large-v3-turbo when GROQ_API_KEY is set (measured: ~20 min ≈ 12s e2e, ~82 min ≈ 49s); otherwise OpenAI whisper-1. Audio is re-encoded to 16 kHz mono 32 kbps before upload so podcast-length jobs stay under the ~25 MB ceiling. Sync path is capped at 90 minutes under Cloudflare's 110s hard deadline; longer videos return 400 duration_too_long with estimatedCredits before any STT spend. An audio download miss is 502 audio_extract_failed with a split reason: blocked_rate (403/429, retryable, retryAfterSeconds=300), extract_timeout (retryable, 60s), extractor_unavailable (signed-URL / extractor miss, retryable, 120s), no_audio_format / restricted / live_unavailable (this video, retryable false). estimatedCreditsIfRetried is only present when retryable is true. A permanent miss with no captions sets obtainable:false and says no transcript is obtainable — it does not leave suggestedEndpoint:null as an open loop. Download budget is 20s (a doomed fetch used to sit for ~67s). blocked_rate opens a service-wide circuit (cacheScope=service, blockedRateConsecutive) so further downloads wait out the cooldown instead of deepening a YouTube block. When a published caption track exists, suggestedEndpoint=/v1/youtube/transcript — suggest, never substitute STT with captions. Response always includes source: "asr", asrProvider, languageIsDetected, numeric segments[{text,startMs,endMs}], text, durationSeconds, creditsUsed, estimatedCredits. Cache hits still bill — the cache is our margin.

What you get

  • source:asr discriminator (pair with /transcript source:captions)
  • estimatedCredits on success; maxCredits preflight without the arithmetic
  • extractor_unavailable vs restricted / live / no_audio_format — retryable is per class
  • Permanent no-captions miss closes the loop (obtainable:false)

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
curl "https://api.captapi.com/v1/youtube/audio-transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjNQXAC9IVRw" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "success": true,
  "data": {
    "platform": "youtube",
    "videoId": "jNQXAC9IVRw",
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "asrProvider": "groq-whisper-large-v3-turbo",
    "language": "en",
    "languageIsDetected": true,
    "durationSeconds": 19,
    "segments": [
      {
        "text": "Alright, so here we are in front of the elephants.",
        "startMs": 0,
        "endMs": 4000
      },
      {
        "text": "The cool thing about these guys is that they have really, really, really long fronts.",
        "startMs": 4000,
        "endMs": 12000
      },
      {
        "text": "And that's cool.",
        "startMs": 12000,
        "endMs": 14000
      },
      {
        "text": "And that's pretty much all there is to say.",
        "startMs": 16000,
        "endMs": 19000
      }
    ],
    "text": "Alright, so here we are in front of the elephants. The cool thing about these guys is that they have really, really, really long fronts. And that's cool. And that's pretty much all there is to say.",
    "creditsUsed": 2
  }
}

Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success and a data object with the following fields:

Top-level fields

  • platformAlways "youtube" on this endpoint.
  • videoIdYouTube video id parsed from the url.
  • urlCanonical URL of the item.
  • sourceAlways "asr" — Whisper-class speech-to-text on the audio (not YouTube's published captions). Pair with /youtube/transcript source:"captions".
  • asrProviderASR backend that produced this transcript (e.g. "groq-whisper-large-v3-turbo" or "openai-whisper-1").
  • languageBCP-47 / ISO speech language code from ASR (e.g. "en"), not a full name like "english".
  • languageIsDetectedtrue when language was auto-detected from the audio; false when the language query param was honored.
  • durationSecondsAudio length in whole seconds — basis for per-minute billing.
  • textFull transcript — segment texts joined with a single space. Prefer this over any legacy transcript alias.
  • creditsUsedCredits billed for this call: ceil(durationSeconds / 60) × 2. Present in data (and echoed on the envelope).

Segments

Each item in segments contains:

  • textFull transcript — segment texts joined with a single space. Prefer this over any legacy transcript alias.
  • startMsCue start in integer milliseconds.
  • endMsCue end in integer milliseconds (always > startMs).

Parameters

NameTypeRequiredDescription
urlstringYesPublic 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.
languagestringNoPreferred caption language as an ISO code, e.g. "en". Defaults to auto-detect.
maxCreditsnumberNoRefuse before STT when estimatedCredits would exceed this (400 cost_exceeds_max, 0 credits). The estimate is on every success and, when the extract miss is retryable, as estimatedCreditsIfRetried.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits/min of audio. Pass cache=true for a free 24h cache hit; default is always fresh.

Using an AI agent? This endpoint is the MCP tool youtube_audio_transcript via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/youtube/audio-transcript and parse the JSON response.

Use cases

Accessibility

Provide captions and transcripts for hearing-impaired users.

Content Analysis

Analyze spoken content for keywords, topics, and sentiment.

Search & Discovery

Make video content searchable by text.

Content Creation

Extract quotes and key phrases from videos.

Language Learning

Provide text alongside audio for language learners.

Research

Analyze large volumes of video content efficiently.

SEO

Extract text content for search engine optimization.

Frequently asked questions

What does the YouTube Audio Transcript API do?+

The YouTube Audio Transcript API lets you extract the full, timestamped transcript from a public YouTube audio transcript using one GET request to /v1/youtube/audio-transcript. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the YouTube Audio Transcript API cost?+

Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.

Do I need a YouTube API key or OAuth?+

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

How are credits calculated?+

creditsUsed = ceil(durationSeconds / 60) × 2. The same number is estimatedCredits on a 200, so you can set maxCredits from a previous response. Pass maxCredits to refuse before STT (400 cost_exceeds_max, 0 credits). On a retryable audio_extract_failed the estimate is estimatedCreditsIfRetried — it is omitted when retryable is false. Cache hits still bill — the cache is our margin.

How is this different from /youtube/transcript?+

/transcript returns YouTube's published captions (source:captions, flat 1 credit). /audio-transcript runs speech-to-text on the audio (source:asr, per-minute). Both use the same body shape: text + segments[{text,startMs,endMs}]. Fall back using the source discriminator — no key rename needed.

Why did /audio-transcript 502 when /transcript already worked?+

Read reason, not a blanket retryable. Transient (about us): blocked_rate (retryAfterSeconds=300), extract_timeout (60), extractor_unavailable (120) — estimatedCreditsIfRetried is present. Permanent (this video): no_audio_format, restricted (age/geo/members/DRM), live_unavailable. When a published track exists, suggestedEndpoint is /v1/youtube/transcript (suggest, never substitute). When it does not, obtainable:false and the message says no transcript is obtainable. 0 credits on the 502.

What is the sync length limit?+

90 minutes when Groq is configured (measured: ~82 min Huberman ≈ 49s e2e under Cloudflare's ~110s deadline). Longer videos return 400 duration_too_long with estimatedCredits and cost 0 — multi-hour livestreams need a future chunked path.

Is the YouTube Audio Transcript API suitable for production use?+

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.

More YouTube APIs

Ready to use the YouTube Audio Transcript API?

Sign up, grab your key, and make your first call in 60 seconds.

YouTube Audio Transcript API | Captapi — Captapi