youtube-transcript.ai

REST API

YouTube Transcript API for Python, n8n and AI agents

Send one GET request with a video ID and your key. You get the full transcript back as clean Markdown, with timestamps and the video title. Nothing to install, no YouTube blocking to work around.

  • A transcript in about 1.4 seconds
  • Up to 5,000 videos a day
  • 10 free requests a day
  • No SDK, one HTTPS request
Request
curl -H "Authorization: Bearer YOUR_KEY" \
  https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt
Response · 200 · text/markdown
# Transcript: Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)

Source video: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Language: en · Duration: 3:27 · Words: 481

[0:00] We're no strangers to love. You know the rules and so do I...
[0:19] I just wanna tell you how I'm feeling. Gotta make you understand...

Quick start

Your first transcript in a minute

1

Get your key

Sign in with Google and copy your key. Free, no card needed.

Create a key
2

Request the URL

Put the 11-character ID from a YouTube link in place of VIDEO_ID, and your key in place of YOUR_KEY.

https://youtube-transcript.ai/transcript/VIDEO_ID.txt?key=YOUR_KEY
3

Use the text

The response body is the transcript as Markdown. Save it, search it or paste it into a prompt as it is.

No JSON to unpack, no SDK to install.

Examples

Use it from your stack

Send the key as an Authorization: Bearer header, or as ?key= in the URL for tools that only take a URL.

Python · requests
import requests

video_id = "dQw4w9WgXcQ"
r = requests.get(
    f"https://youtube-transcript.ai/transcript/{video_id}.txt",
    headers={"Authorization": "Bearer YOUR_KEY"},
    timeout=60,
)
r.raise_for_status()
print(r.text)

Building with ChatGPT, Claude or Cursor? Copy the instructions into your chat. The assistant gets the endpoint, the auth and the error handling in one go.

ChatGPT Claude Plain text

Response

What comes back

Plain UTF-8 Markdown (text/markdown): a short header with the title, source and language, then the transcript in short timestamped paragraphs.

dQw4w9WgXcQ.txt
# Transcript: Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)

Source video: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Language: en · Duration: 3:27 · Words: 481

[0:00] We're no strangers to love. You know the rules and so do I...
[0:19] I just wanna tell you how I'm feeling. Gotta make you understand...
200

The transcript. X-RateLimit-Limit and X-RateLimit-Remaining show today's quota.

401

The key is missing or not recognised.

429

Today's quota is used up. Retry-After gives the seconds until 00:00 UTC.

Why this API

Built for scripts and agents

Works from servers

Scripts that fetch captions from YouTube directly often get blocked on cloud hosts. Here your code only talks to us, and our fetch pipeline with proxy fallback handles YouTube.

Made for LLMs

One Markdown document: title, source link, then the transcript in short timestamped paragraphs. Paste it into a prompt as it is.

Any language

Add lang=es, lang=ja or any other caption language. Leave it out and you get the default track, human-written captions before auto-generated ones.

Free to start

A free key covers 10 transcripts a day. Pro is 1,000 a day for $120 a year, on the same key and the same URL. Ultra is 5,000 a day for $350.

Pricing

Start free, upgrade when you scale

Every request counts as one, including repeats of the same video. The count resets at 00:00 UTC.

Free

Try the API on a few videos a day

$0
  • 10 requests a day
  • All videos with captions, all languages
  • Google sign-in, no card
Get a free key

Pro Most popular

For scripts and agents that run every day

$120per year (~ $10/month)

Everything in Free, plus:

  • 1,000 requests a day
  • Same key, same URL
  • SubKun Pro included: AI chat & bilingual subtitles right on YouTube
Upgrade to Pro

Ultra

For teams and production pipelines

$350per year (~ $29/month)

Everything in Pro, plus:

  • 5,000 requests a day
  • Up to 3 keys sharing one quota
  • Priority email support
Get Ultra

FAQ

Common questions

Do I need an SDK?

No. It is one HTTPS GET request, so any HTTP client in any language works.

Do I need the full YouTube link?

Just the 11-character video ID. For youtube.com/watch?v=dQw4w9WgXcQ the ID is dQw4w9WgXcQ.

Which videos work?

Any video with captions, either written by the uploader or auto-generated by YouTube.

Can I pick the caption language?

Yes. Add ?lang= with a language code such as en, es or zh-Hant.

I use Claude or ChatGPT, not code.

Connect the YouTube Transcript MCP server with the same key and ask your assistant about any video.

Where is the full reference?

The API reference lists every parameter, the full response format and the error cases.