REST API · PYTHON · NODE · MCP

YouTube Transcript API

Turn any YouTube video into text with timestamps in one API call. When a video has no captions, we transcribe the audio with AI, so you never hit a dead end.

  • Native YouTube captions returned as JSON in seconds
  • AI speech-to-text when a video has no captions, through the same endpoint
  • Batch, playlist, and channel endpoints for bulk jobs

Free plan includes 10 credits a month. No credit card required.

Get a Transcript in One Request

Send a YouTube URL or video ID. You get back the full text plus segments with start and end times in milliseconds.

REQUEST
curl -X POST https://www.youtubetranscript.dev/api/v2/transcribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video": "dQw4w9WgXcQ", "language": "en"}'
RESPONSE
{
  "status": "completed",
  "credits_used": 1,
  "data": {
    "video_id": "dQw4w9WgXcQ",
    "video_title": "Rick Astley - Never Gonna Give You Up",
    "transcript": {
      "language": "en",
      "source": "manual",
      "text": "We're no strangers to love...",
      "segments": [
        { "text": "We're no strangers to love", "start": 18800, "end": 21880 },
        { "text": "You know the rules and so do I", "start": 22640, "end": 26760 }
      ]
    }
  }
}

SDKs and Integrations

Code Examples

PYTHON
# pip install youtubetranscriptdevapi
from youtubetranscript import YouTubeTranscript

yt = YouTubeTranscript("YOUR_API_KEY")
result = yt.transcribe("dQw4w9WgXcQ")

for seg in result.segments[:5]:
    print(f"[{seg.start_formatted}] {seg.text}")
JAVASCRIPT / TYPESCRIPT
// npm install youtube-transcript-api
import { YouTubeTranscript } from "youtube-transcript-api";

const yt = new YouTubeTranscript({ apiKey: "YOUR_API_KEY" });
const result = await yt.getTranscript("dQw4w9WgXcQ");

console.log(result.data?.transcript.text);
BATCH (MANY VIDEOS)
curl -X POST https://www.youtubetranscript.dev/api/v2/batch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_ids": ["dQw4w9WgXcQ", "jNQXAC9IVRw"], "language": "en"}'

# -> 202 with a batch_id; poll GET /api/v2/batch/{batch_id}

Videos Without Captions? Still Covered.

Many videos have no captions at all, and most transcript tools simply fail on them. With mode: "auto", we return captions when they exist and switch to AI speech-to-text when they don't, through the same endpoint. AI transcription costs 1 credit per 90 seconds of video, and you can preview the cost first with /api/v2/transcribe/estimate.

AUTO MODE
curl -X POST https://www.youtubetranscript.dev/api/v2/transcribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video": "VIDEO_ID", "mode": "auto"}'

# Captions exist  -> 200 with the transcript
# No captions     -> 202 with a job_id; poll GET /api/v2/jobs/{job_id}
#                    or pass "webhook_url" to get the result pushed to you

YouTubeTranscript.dev vs. Alternatives

The two free options developers usually try first are the open-source youtube-transcript-api Python library and YouTube's official Data API v3. Here is how they compare.

FeatureYouTubeTranscript.devyoutube-transcript-api (Python)YouTube Data API v3
What it isHosted REST APIOpen-source Python libraryGoogle's official API
Any public videoYesYesNo: captions.download only works on videos you own
Videos without captionsAI speech-to-text fallbackFailsFails
Runs from cloud serversYes, we handle the fetchingOften IP-blocked by YouTube; needs proxiesYes
Batch, playlist, channelBuilt-in endpointsWrite your own loopWrite your own loop
Translation100+ languagesYouTube's translations onlyNo
Languages and SDKsREST, Python, Node, Dart, CLI, MCPPython onlyGoogle client libraries
CostFree plan, paid from $5/moFree (plus proxy costs)Free within quota

Capabilities

Native captions (manual and auto-generated)Yes
AI speech-to-text fallback for videos without captionsYes
Millisecond timestamps per segmentYes
Word-level timestampsYes (AI transcription)
Translation to 100+ languagesYes
Batch, playlist, and channel endpointsYes
Webhooks for async jobsYes
Upload your own audio or video (up to 2GB / 8 hours)Yes
Speaker labels, chapters, summaries (AI transcription)Yes

What Developers Build With It

AI and LLM apps

  • Feed video content into RAG pipelines and vector databases
  • Summarize, chapter, or quiz any video
  • Give AI agents video access via the MCP server

Research and analysis

  • Analyze lectures, interviews, and earnings calls at scale
  • Track topics and sentiment across a whole channel
  • Build searchable archives with timestamps

SaaS and content products

  • Add "paste a YouTube link" features to your app
  • Turn videos into blog posts, show notes, and social posts
  • Generate SRT and VTT subtitles

Need ideas? Browse what to build with YouTube transcripts.

Simple, Credit-Based Pricing

One credit fetches one captioned transcript. AI transcription costs 1 credit per 90 seconds of video. Re-fetching a transcript you already own is free.

PlanPriceIncludes
Free$010 credits / month, 1 request / second
Lite$5 / mo500 credits / month, 5 requests / second
Basic$9 / mo1,200 credits / month, 25 requests / second
Pro$29 / mo5,000 credits / month, 50 requests / second
Business$79 / mo18,000 credits / month, 100 requests / second

Yearly billing and higher volumes are available. See full pricing.

FAQ

Is there a free YouTube Transcript API?+

Yes. The free plan includes 10 credits every month and an API key, with no credit card required. One credit fetches one captioned transcript, and re-fetching a transcript you already own is free.

What happens if a video has no captions?+

Send the request with mode set to auto. If the video has captions you get them back immediately. If it doesn't, we transcribe the audio with AI speech-to-text through the same endpoint and return a job_id you can poll, or deliver the result to your webhook. AI transcription costs 1 credit per 90 seconds of video.

Which languages are supported?+

We return any caption language YouTube has for the video, and you can translate transcripts into 100+ languages. AI speech-to-text also supports 100+ languages with automatic language detection.

What format are timestamps in?+

Each segment has start and end times in milliseconds. You can also request paragraphs or word-level timestamps, and export to plain text, SRT, or VTT through the SDKs.

What are the rate limits?+

Rate limits depend on your plan: 1 request per second on Free, 5 on Lite, 25 on Basic, 50 on Pro, and 100 on Business. For large jobs, use the batch endpoint instead of many single calls.

Can I get transcripts for a whole playlist or channel?+

Yes. Resolve a playlist or channel to its video IDs, then submit them to the batch endpoint. Results arrive by polling or webhook. The maximum batch size depends on your plan.

How is this different from the youtube-transcript-api Python library?+

The open-source library is great for local scripts, but it only works when captions exist and YouTube often blocks it when it runs from cloud servers. Our API is hosted, handles the fetching for you, falls back to AI transcription, and adds batch jobs, translation, and SDKs in several languages.

Can I use a video ID instead of a URL?+

Yes. The video field accepts a full YouTube URL, a youtu.be link, a Shorts link, an embed link, or the 11-character video ID. See the full list of supported YouTube URL formats at /youtube-url-formats.

Ready to Build?

Get your API key in under a minute. No credit card required.

GET A FREE API KEY

Start extracting transcripts for free

Convert any YouTube video to text in seconds. No credit card required.

TRY YOUTUBETRANSCRIPT.DEV →
YouTube Transcript API: Free Tier, AI Fallback, Python & JS SDKs