YouTube Transcript API

YouTube Transcript API returns the captions of a YouTube video as text, one line per caption with the second it starts and ends. Paste a link into your AI assistant and ask for a passage, a quote or a summary with timestamps, or call the same tool from your code.

  • Timestamp on every line
  • Tested
  • REST API + MCP
  • Billed per run

1Your request

Use the AI/ML API MCP YouTube Transcript API tool. Get the transcript of NASA's October 2026 Moon Base rovers update and show the part about VIPER with timestamps.

Video
youtube.com/watch?v=Zezt6EsG9WE
Channel
NASA
Caption language
English

2Result160 timestamped lines · 16 Nov 2026

NASA Moon Base: Rovers and Lunar Terrain Vehicles (October 2026 Update)

1:31One of NASA's first rovers to study the lunar surface will be VIPER,

1:36a robotic rover designed to search for ice and other resources.

1:40VIPER is built, tested, and ready to fly on Blue Origin's second

1:44Blue Moon Mark One lander, scheduled to launch in late 2027.

1:50VIPER very much

1:51acts as a scout for Moon Base to understand these locations

1:54on the South Pole, where they anticipate sending more assets, establishing bases.

1:59VIPER is currently at the Johnson Space Center in a clean room.

2:02It's ready to go.

Source: Real result from 16 Nov 2026, 9 of 160 lines shown, from the VIPER chapter. Each line carries its start time; the full result also has end time and duration.

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

YouTube Transcript API

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

    1. Caption text
    2. Start time in seconds
    3. End time in seconds
    4. Duration of the line
    5. Line order
  • Video

    1. Video ID and link
    2. Video title
    3. Number of caption lines
  • Language

    1. Caption language
    2. Original language of the video
    3. Target language when you ask for a translation
    4. Flag for unsupported languages
  • Output options

    1. Whole transcript as one block without timestamps
    2. Transcripts for the latest videos of a channel
    3. 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
Video length and chapters come from the same day's YouTube Scraper API run on NASA's channel.

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

  1. 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.

  2. Paste the video link

    Add what you want from it: one passage, a quote, a summary with start times or the full text.

  3. Read the answer with timestamps

    Your assistant fetches the captions and replies with the lines it used and the second each one starts.

  4. 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.

SettingWhat it controlsTip
VideoA watch, youtu.be or Shorts link, or the video IDShorts work the same way as regular videos
Caption languageWhich caption track to read, as a two-letter code such as en or frLeave it empty to get the video's default track
Translate intoA language code to translate the captions intoRead the original track when exact wording matters
ChannelA channel link or @handle instead of a single video, with a video count up to 200Start with the 5 or 10 latest uploads
Upload datesStart and end dates for a channel runHandy for “everything since last quarter” requests
Plain textAdds the whole transcript as one block without timestampsGood 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 AI assistant

MCP · sign in once with your AI/ML API account

MCP setup guide ↗

In your code

Backend, script or scheduled job

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.

Other ways to get a YouTube transcript: YouTube Transcript API on AI/ML API, Open “Show transcript” on YouTube and copy, YouTube Data API captions endpoint, Open-source transcript library
AI/ML APIOpen “Show transcript” on YouTube and copyYouTube Data API captions endpointOpen-source transcript library
SetupConnect once with your AI/ML API accountNoneGoogle Cloud project, OAuth and edit rights on the videoYour own code and server, fixes when YouTube changes
Inside an AI chatYes. Over MCPNo. NoOnly if you build itOnly if you build it
Best forPublic videos with captions, from chat or codeOne video, read onceChannels exporting their own captionsDevelopers 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.

See pricing

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.