YouTube Transcript API
YouTube transcript API — full video captions with timestamps in multiple languages. AI training data and content indexing from $0.01/call.
Fetch the complete transcript (captions) for any YouTube video including start/end timestamps for each line. Supports multiple languages. Ideal for AI training, search indexing, and accessibility.
Try it live
Fill in the fields and hit Run to see a real response.
{
"ok": true,
"data": {
"id": "dQw4w9WgXcQ",
"transcript": [
{
"startMs": "320",
"endMs": "14580",
"startTime": "0:00",
"text": "[Music]"
},
{
"startMs": "18170",
"endMs": "22120",
"startTime": "0:18",
"text": "We're no strangers to love"
}
]
}
}Features
Each line in the transcript array carries startMs and endMs (e.g. 18170 to 22120) alongside its text, so you can map any sentence to its exact moment in the video.
Pass a lang code to fetch the transcript in a specific language when the video offers multiple caption tracks.
Every line also includes a human-readable startTime like 0:18, ready to render as clickable timestamps without converting milliseconds yourself.
Returns the transcript whether the captions were uploaded by the creator or auto-generated by YouTube.
Use cases
AI Training Data
Extract video transcripts as training data for AI and NLP models.
Search Indexing
Index video content by transcript text to enable full-text search over video libraries.
Content Summarization
Feed transcripts into summarization models to generate video summaries.
Accessibility
Provide text transcripts alongside embedded videos for accessibility compliance.
Quick start
Copy this snippet and start making calls.
const res = await fetch('https://api.yepapi.com/v1/youtube/transcript', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "dQw4w9WgXcQ",
"lang": "en"
}),
});
const data = await res.json();
console.log(data);The YouTube Transcript API — full captions with timestamps
The YouTube Transcript API returns the complete caption text of any video as structured JSON. Send id (e.g. dQw4w9WgXcQ) and an optional lang to /v1/youtube/transcript and get a transcript array where every line has startMs, endMs, a formatted startTime like 0:18, and the spoken text. It works with both creator-uploaded and YouTube's auto-generated captions.
At $0.01 per call it's the cheapest way to get a video's words as data — the foundation for AI training corpora, full-text search over video libraries, and automated summarization. The timestamps let you jump from any sentence straight to its moment in the video.
What is a YouTube Transcript API?
A YouTube Transcript API returns the full spoken-word captions of a video as timestamped, structured data. You send a video ID (and optionally a language code) and receive a transcript array where each entry has the start and end time in milliseconds (startMs, endMs), a human-readable startTime like 0:18, and the line's text. It works with both manually uploaded and auto-generated caption tracks. This turns a video — opaque to text tooling — into searchable, summarizable, machine-readable language, which is why it underpins AI data pipelines, video search, and accessibility features.
Build your own video search and summary tool
Pull transcripts for a video library and index the text, and you can offer full-text search that jumps users to the exact second a phrase is spoken — the startMs on each line makes that deep-linking trivial. Feed a transcript into a summarization model to auto-generate chapter notes or a TL;DR. For AI work, transcripts at scale make clean training and retrieval corpora. Combine with the Channel Videos endpoint to enumerate a creator's uploads, then transcribe each into a searchable, summarized knowledge base of everything they've said.
YouTube Transcript API pricing — $0.01/call
Each transcript costs $0.01, returning the entire timestamped caption array in one call regardless of video length. There's no daily quota. That flat rate makes large-scale transcription economical — indexing a 1,000-video channel for full-text search is about $10. The official Data API exposes caption tracks but gates downloads behind OAuth and ownership in many cases; this endpoint returns the readable transcript directly for any video with captions.
Transcript vs. Subtitles — text vs. track list
These two endpoints are complementary. The Transcript endpoint returns the actual caption text with timestamps. The Subtitles endpoint returns the list of which caption tracks exist — language names, codes, and whether each is translatable — but not the words themselves. The efficient pattern is to call Subtitles first to discover available languages, then call Transcript with the right lang to pull the text you want, avoiding a failed call when a language isn't present.
Try the YouTube Transcript API free
Get $5 in free credit at signup, no card required — 500 transcripts. Pull the timestamped captions for any video and inspect the startMs and text fields before wiring transcription into your pipeline.
Start making API calls in 30 seconds
$5 free credit on signup. No credit card required. Pay per call.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Fetch the complete transcript (captions) for any YouTube video including start/end timestamps for each line. Supports multiple languages. Ideal for AI training, search indexing, and accessibility.
Each API call costs $0.01. No monthly minimums or subscriptions — you only pay for what you use.
Sign up for a free API key, then send a POST request to /v1/youtube/transcript. Check the code example above for a ready-to-use snippet in JavaScript, cURL, or Python.
YepAPI bundles SEO, AI, and web scraping APIs under one key with no monthly minimums. You get lower per-call pricing, a unified dashboard, and one billing account instead of managing multiple providers.
Ready to integrate?
Get your API key and start making calls in 30 seconds. $5 free credit on signup — no credit card required.
More youtube api endpoints
Search
$0.01YouTube search API — find videos, channels, and playlists with filters for date, duration, and type. Structured JSON results from $0.01/call.
Video Details
$0.02Full YouTube video metadata — title, views, likes, description, keywords, thumbnails, and available formats. Video intelligence from $0.02/call.
Comments
$0.01YouTube comments API — fetch top-level comments and replies with author info, likes, and timestamps. Sentiment analysis and engagement research from $0.01/call.