YouTube · Guide

How to get a YouTube audio transcript

TL;DR
To get a YouTube audio transcript, sign up for a free Captapi key, then send one GET request to /v1/youtube/audio-transcript with your input. You get clean JSON back in seconds for 2 credits/min of audio per call — no OAuth, scraping or platform SDKs. 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.

How to get a YouTube audio transcript (step by step)

  1. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 2

    Call the YouTube Audio Transcript API

    Send an authenticated GET request to /v1/youtube/audio-transcript with your input. No OAuth, no scraping setup.

  3. 3

    Read the JSON response

    Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.

Code example

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_..."

What the response looks like

{
  "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 (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
urlstring YesPublic 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.

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.

Ready to get a YouTube audio transcript?

Start free with 100 credits — no credit card required.

Get your free API key