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.
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"}'{
"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
# 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}")// 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);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.
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 youYouTubeTranscript.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.
| Feature | YouTubeTranscript.dev | youtube-transcript-api (Python) | YouTube Data API v3 |
|---|---|---|---|
| What it is | Hosted REST API | Open-source Python library | Google's official API |
| Any public video | Yes | Yes | No: captions.download only works on videos you own |
| Videos without captions | AI speech-to-text fallback | Fails | Fails |
| Runs from cloud servers | Yes, we handle the fetching | Often IP-blocked by YouTube; needs proxies | Yes |
| Batch, playlist, channel | Built-in endpoints | Write your own loop | Write your own loop |
| Translation | 100+ languages | YouTube's translations only | No |
| Languages and SDKs | REST, Python, Node, Dart, CLI, MCP | Python only | Google client libraries |
| Cost | Free plan, paid from $5/mo | Free (plus proxy costs) | Free within quota |
Capabilities
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.
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.