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). 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. Response always includes source: "asr", asrProvider, languageIsDetected, numeric segments[{text,startMs,endMs}], text, durationSeconds, creditsUsed. Cache hits still bill — the cache is our margin.

What you get

  • source:asr discriminator (pair with /transcript source:captions)
  • Per-minute pricing + maxCredits preflight
  • Uniform segments[] with numeric startMs/endMs (verbose_json)
  • Groq-first path; 90-minute sync cap from measured e2e

Platform limits

Honest ceilings from the upstream platform surface — not Captapi bugs. Unexpected truncation here is usually the platform, not us.

  • Sync transcription is capped at 90 minutes (Cloudflare ~110s hard deadline + ~25 MB upload). Longer videos — including multi-hour livestreams — return 400 duration_too_long with estimatedCredits (0 credits, no STT).
  • Audio is speech-reencoded (16 kHz mono 32 kbps) before ASR; rare extract failures may still hit audio_too_large.
  • Requires GROQ_API_KEY in production for the 90-minute band; without it the OpenAI fallback is far slower and should stay on a tighter operational cap.

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",
    "source": "asr",
    "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, cached, creditsUsed, 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).
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits.

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. Hits include cached + cachedAt. 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. Pass maxCredits to refuse before STT when the estimate would exceed your budget (400 cost_exceeds_max, 0 credits). 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). Fall back from one to the other using the source discriminator — segment parsers should accept both shapes.

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. Hits include cached + cachedAt. 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.