Skip to content

YouTubeTranscript API

Get accurate YouTube video transcripts in seconds. Power your products, workflows, and AI applications.

View Documentation

Fast & Accurate

Timestamped captions in seconds, ready for search, notes, and models.

Prepaid credits

Each successful call spends credits. 401, 402, and 429 when it should stop.

Developer Friendly

One REST call. Send a video id, get structured JSON back.

api.ytapi.dev···
curl

RESPONSE

{
  "ok": true,
  "video_id": "dQw4w9WgXcQ",
  "language": "en",
  "transcript": [
    { "text": "Start with the words people actually said.", "start": 0.00 },
    { "text": "Timestamps keep quotes honest in the UI.", "start": 4.00 }
    ...
  ]
}

Built for teams shipping

$0
Cost to start
100
Free credits included
0
Credits lost to failures
2
Live endpoints: transcripts · metadata

Simple API. Powerful possibilities.

  1. 1

    Get a video id

    Copy the YouTube video id or paste the watch URL.

  2. 2

    Make a request

    Call the REST API with your Bearer key.

  3. 3

    Get a transcript

    Receive timed captions you can store or stream.

Interactive Subtitle Console

Playground

Extract word-level timestamped transcripts with millisecond precision. Search cues, generate multi-language SDK code, or export directly to SRT/VTT.

Popular samples:
200 OK192ms· HIT (Edge L1)
Total 7 segments · 131 words
00:12.8 00:19.0#1

So, I'll start with this: a couple years ago, an event planner called me because I was doing a speaking event.

00:19.3 00:25.5#2

And she called, and she said, 'I'm really struggling with how to write about you on the little flyer.'

00:25.9 00:32.7#3

And I said, 'Well, what's the struggle?' And she said, 'Well, I saw you speak, and I'm going to call you a researcher.'

00:33.2 00:40.2#4

'But I'm afraid if I call you a researcher, no one will come, because they'll think you're boring and irrelevant.'

00:40.9 00:47.1#5

And I said, 'Okay.' And she said, 'But the thing I liked about your talk is you're a storyteller.'

00:47.6 00:51.3#6

'So I think what I'll do is just call you a storyteller.'

00:51.9 00:57.7#7

And of course, the academic, insecure part of me went, 'You're going to call me a what?'

Ready for production? Register for free tier with dedicated Bearer token & SLA support.
API Docs ↗
Industrial Infrastructure & Architecture

Engineered for 100% YouTube Cache Bypass & High Concurrency

Unlike generic web scrapers or brittle rotating proxy pools, our platform operates a 4-tier clean architecture: Cloudflare Edge Gateway, Egress Broker Scheduler, Door Pool of 2,000+ nodes, and YT-GrainTunnel WebSocket sockets straight into YouTube edge colos.

48.06QPS
Steady Throughput

100% cache-bypass straight to YouTube edge with 0 capacity rejections

130concurrency
High-Concurrency Scaling

96%~98% sustained success across full 56-country matrix validation

<30ms
4-Way Socket Racing

Promise.any socket racing capturing the fastest edge handshake instantly

2,000+nodes
Wilson Score Door Pool

Dynamic confidence routing with anti-false-positive circuit breaking

YT-GrainTunnel 4-Way Socket Racing

Proprietary Egress Tunnel

Purpose-built on Cloudflare Workers edge sockets rather than generic proxies. Connects directly to YouTube Player and Timedtext endpoints with extreme resilience.

  • 4-way concurrent socket racing (raceSprout) via cloudflare:sockets, picking the fastest handshake and terminating slower sockets instantly
  • Zero-GC BYOB (Bring-Your-Own-Buffer) 64KB ArrayBuffer buffer rotation (pipeDownstream) eliminating V8 engine allocation spikes
  • 0-RTT Early Data handshake acceleration via Sec-WebSocket-Protocol headers carrying TLS Client Hello
  • Zero-trust lockdown: remote egress strictly locked to www.youtube.com:443 with minimal X-Tunnel-Secret authentication

Wilson Score Dynamic Routing & Breaker

Smart Egress Broker

High-performance Go scheduling hub that dynamically evaluates node health and distributes traffic across 2,000+ edge doors.

  • Wilson lower bound confidence score dynamic routing factoring in historical success rate, RTT latency, and active inflight slots
  • Intelligent Circuit Breaker strictly isolating client cancelations (OutcomeCanceled) from true network faults (OutcomeBot / NetworkError)
  • Request Hedging (Google Tail at Scale): fires speculative parallel requests at P90/P95 tail thresholds to compress P99 latency
  • Global TLS 1.3 session ticket cache (tls.ClientSessionCache) slashing cryptographic handshake compute overhead

High-Concurrency & Dedicated Pool

130c Stress-Tested

Engineered for sustained enterprise workloads without socket exhaustion, thread bottlenecks, or connection drops.

  • Dedicated internal connection pools (MaxIdleConns=500, MaxIdleConnsPerHost=200) eliminating broken pipes and TCP handshake latency
  • Ordered country fallback chains (up to 4 fallback regions) automatically routing around regional copyright blocks
  • Validated under 130 to 200 concurrency on modest 2-vCPU hardware with 48.06 QPS sustained throughput and 0 HTTP 503 drops
  • Token-bucket per-client and per-IP rate limiting protecting infrastructure reliability under peak traffic surges

Multi-Tier Compression & SWR Pipeline

Sub-Millisecond Cache

Tiered caching architecture delivering sub-second response times while keeping data fresh through background revalidation.

  • L1 in-memory Zstd compressed cache + L2 persistent NVMe BadgerDB disk cache ensuring instant hot-path hits
  • Stale-While-Revalidate (X-Cache: STALE): serves immediate sub-millisecond cached responses while refreshing in the background
  • Singleflight request deduplication merging simultaneous concurrent misses into a single upstream fetch
  • Detailed OpenTelemetry distributed tracing and Prometheus metrics exporting per-country SLA and hit ratios

FAQ

Billing, keys, and limits — the short answers.

Still have questions?

The docs cover every endpoint and error code.

Docs

Only successful (HTTP 200) calls deduct credits — failures are always free. Missing or invalid keys return 401, an empty balance returns 402, and rate limits return 429.

Ship the transcript. Skip the scraper.

Create a key, call the API, and keep credits visible in the dashboard.

Pricing