What is YouTube Transcript API?
YouTube Transcript API reads the caption track of a YouTube video and hands it back as text. You give it a link or a video ID; you get every caption line with its start time, end time and duration, ready to search, quote, summarize or turn into notes without sitting through the whole video.
Because every line keeps its timestamp, anything your assistant tells you about the video points back to the second it was said. That makes the text easy to check and easy to cite.
You ask
Get the transcript of NASA's October 2026 Moon Base rovers update and show the part about VIPER with timestamps.
It runs
From your AI assistant over MCP or from your code over REST
You get
- Caption lines
- Video
- Language
- Output options
- Quote people accuratelyFind the exact sentence and the second it was spoken before it goes into an article, a slide or a report.
- Get through long videosAsk for the part about one topic in a two-hour lecture or conference talk and jump straight to it.
- Repurpose your own uploadsTurn a video into a blog post, show notes or a newsletter section that follows what you actually said.
- Search a whole channelCollect transcripts for a channel's recent uploads and find which videos cover a subject.
- Let your agent read the videoClaude or ChatGPT gets the words, answers questions about them and keeps the timestamps in its answer.
What the YouTube captions API returns
A transcript comes back as a list of caption lines plus a few facts about the video and the track. These are the fields our test run returned, along with the output options the tool accepts.
Caption lines
- Caption text
- Start time in seconds
- End time in seconds
- Duration of the line
- Line order
Video
- Video ID and link
- Video title
- Number of caption lines
Language
- Caption language
- Original language of the video
- Target language when you ask for a translation
- Flag for unsupported languages
Output options
- Whole transcript as one block without timestamps
- Transcripts for the latest videos of a channel
- Upload date range for channel runs
Text comes from the caption tracks YouTube has for the video, so a video without captions has nothing to return. Captions keep their on-screen line breaks; ask your assistant to join lines into sentences before you quote. For views, likes and channel details use YouTube Scraper API.
Sample transcript from a real request
The excerpt at the top of this page is a real run from 16 November 2026: the English captions of NASA's “Moon Base: Rovers and Lunar Terrain Vehicles (October 2026 Update)”. The request returned 160 timestamped lines. Here is what the full result shows when you read it closely.
One result in full
The whole result
- Video
- NASA Moon Base: Rovers and Lunar Terrain Vehicles (October 2026 Update)
- Caption track
- English, the video's original language
- Lines
- 160
- Covers
- 0:02 to 9:04 of a 9:17 video
- Per line
- Text, start, end and duration in seconds
- Speaker names
- Not included
What this transcript tells you
160 lines cover 0:02 to 9:04 of the 9:17 video, about one line every 3.4 seconds. Three pauses longer than five seconds, at 0:41, 4:40 and 8:45, have no captioned speech, so a gap in the timestamps is not missing text.
Timestamps match the chapters in the video description. The VIPER chapter starts at 1:32 and its first caption line at 1:31; the lunar terrain vehicle chapter and its first line both start at 5:15.
Lines carry no speaker names. This video switches between a narrator and several interviewees, so open the video at the timestamp before you attribute a quote to a person.
Short lines split sentences in the middle: “VIPER very much” at 1:50 only makes sense with the next line. Ask for passages, not single lines.
How to get a YouTube transcript with your AI assistant
Connect AI/ML API
Click Try it now, pick your client and add the MCP server. You sign in with your AI/ML API account once.
Paste the video link
Add what you want from it: one passage, a quote, a summary with start times or the full text.
Read the answer with timestamps
Your assistant fetches the captions and replies with the lines it used and the second each one starts.
Check the moment
Open the video at that second to hear the tone, or ask for the passage cleaned into full sentences for your notes.
Prompts to start with
Use the AI/ML API MCP YouTube Transcript API tool. Get the transcript of https://www.youtube.com/watch?v=Zezt6EsG9WE and list what it says about the VIPER rover, with timestamps.
Use the AI/ML API MCP YouTube Transcript API tool. Summarize this lecture in ten bullet points and give the start time of each point: [YouTube URL]
Use the AI/ML API MCP YouTube Transcript API tool. Find every place in [YouTube URL] where the speaker talks about pricing and quote those lines with timestamps.
Use the AI/ML API MCP YouTube Transcript API tool. Get the transcripts of the 5 latest videos on youtube.com/@NASA and tell me which ones mention the Moon Base.
Settings for a transcript request
In a chat you only paste a link and say what you need; your assistant fills in the rest. In code you pass these settings yourself.
| Setting | What it controls | Tip |
|---|---|---|
| Video | A watch, youtu.be or Shorts link, or the video ID | Shorts work the same way as regular videos |
| Caption language | Which caption track to read, as a two-letter code such as en or fr | Leave it empty to get the video's default track |
| Translate into | A language code to translate the captions into | Read the original track when exact wording matters |
| Channel | A channel link or @handle instead of a single video, with a video count up to 200 | Start with the 5 or 10 latest uploads |
| Upload dates | Start and end dates for a channel run | Handy for “everything since last quarter” requests |
| Plain text | Adds the whole transcript as one block without timestamps | Good for summaries; keep timestamps for quotes |
Captions are only as good as the track on YouTube. Check names and technical terms against the video when the exact wording matters.
What people do with YouTube transcripts
Fact and quote checking
Confirm what a speaker said, word for word, and link the quote to the exact second in the video.
TextStart time
Lecture and course notes
Turn a long lecture or webinar into notes with a timestamp for each point, so you can rewatch only the hard parts.
TextStart timeDuration
Content repurposing
Draft a blog post, a newsletter section or social posts from your own video while keeping your phrasing.
TextVideo title
Channel and topic research
Pull transcripts for a channel's latest uploads and find which videos discuss a product, a person or a claim.
TextVideo IDUpload dates
Subtitles and localization
Get the original captions and a translated version side by side to review subtitles before you publish them.
TextLanguageTiming
Datasets for analysis
Collect transcripts on a topic for text analysis, classification or evaluation sets, with the video ID kept on every line.
TextVideo IDLanguage
YouTube transcript API for your code
In your code
REST · your AI/ML API key, JSON records back
The same tool runs over REST with your AI/ML API key. Send a video link or ID and get JSON with one object per caption line: the text, start time, end time and duration in seconds. Keep the video ID next to each line and you can rebuild a link to any moment as youtube.com/watch?v=ID&t=SECONDS.
Use the YouTube transcript MCP route when a person asks questions in a chat, and REST when your backend processes a list of videos, such as every new upload on a channel you follow. Both run on one AI/ML API account and one balance. Start with the Toolbox REST quickstart or the MCP setup guide.
Other ways to get a YouTube transcript
YouTube shows a transcript panel under many videos, and there are several ways to get the same text out. They differ in setup and in where you can use the result.
| Open “Show transcript” on YouTube and copy | YouTube Data API captions endpoint | Open-source transcript library | ||
|---|---|---|---|---|
| Setup | Connect once with your AI/ML API account | None | Google Cloud project, OAuth and edit rights on the video | Your own code and server, fixes when YouTube changes |
| Inside an AI chat | Yes. Over MCP | No. No | Only if you build it | Only if you build it |
| Best for | Public videos with captions, from chat or code | One video, read once | Channels exporting their own captions | Developers running their own scripts |
Pricing
Pay as you goBilled per run from your AI/ML API balance
- No subscription
- No seat fee
- One balance for every tool
Each request is billed per run from your AI/ML API balance, with no subscription or seat fee. Our test transcript of a nine-minute NASA video cost less than one cent. Channel runs fetch one transcript per video and cost more, so check the current price in your dashboard before a large batch.
FAQ
Is it legal to download YouTube transcripts?
Reading the captions of public videos for research, notes or accessibility is common practice. Republishing someone else's words is a copyright matter, and YouTube's terms apply to the service. Quote with attribution, and ask a lawyer before commercial reuse.
Can it transcribe a video that has no captions?
No. It reads caption tracks that already exist on YouTube. A video without captions returns nothing; for that you would need the audio file and a speech-to-text model.
Does the YouTube subtitles API work in other languages?
Yes. Ask for a caption track by its two-letter code, such as es or de, or ask for the captions translated into another language. Our test read the original English track of a NASA video.
How is this different from the YouTube Data API captions endpoint?
The official endpoint lists caption tracks, and downloading them needs OAuth and permission to edit the video, so it suits channel owners. YouTube Transcript API reads the captions of any public video that has them, runs on your AI/ML API account and works inside AI assistants.
Is this the open-source youtube-transcript-api package?
No. That Python package runs on your own machine or server, so blocked requests and updates are yours to handle. This is a hosted tool: you call it over REST or MCP and pay per run from your AI/ML API balance.
Is there a YouTube transcript MCP for Claude, ChatGPT or Cursor?
Yes, this tool. Add the AI/ML API MCP server once, paste a video link and ask your question. Hermes, OpenClaw and other MCP clients work the same way.
Can I get the transcript as SRT or plain text?
The result is JSON with start and end times on every line, which converts directly to SRT or VTT; ask your assistant to write the file. For one block of text without timestamps, turn on the plain-text option.
Does the transcript say who is speaking?
No. Caption lines carry text and timing only. In videos with several speakers, check the video at the timestamp before you attribute a line to a person.
How fresh is the transcript?
Each run reads the captions at that moment. If the channel edits or replaces its captions later, run the request again to get the new text.
Get your first transcript
Connect once, paste a YouTube link and ask for the part you need.