The simplest YouTube transcript API there is: add .txt to a video ID, send your API key, and get the full transcript back as a clean, readable document. The key is free for 10 requests a day. No SDK: one HTTPS request you can run from cURL or any language.
First, create your free API key. It takes a Google sign-in and about a minute.
Then take the 11-character video ID and request this URL with the key:
https://youtube-transcript.ai/transcript/{VIDEO_ID}.txt
That's the whole API. For youtube.com/watch?v=dQw4w9WgXcQ the ID is dQw4w9WgXcQ, so:
curl -H "Authorization: Bearer YOUR_KEY" \
https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt
Get your free API key Or use the web tool
Setting this up in a tool? The API quick start has copy-paste steps for Python, JavaScript, n8n and Make.
Every request needs your API key. Send it in either of two ways:
| Where | Example |
|---|---|
| Header | Authorization: Bearer YOUR_KEY |
| Query string | /transcript/{VIDEO_ID}.txt?key=YOUR_KEY |
The query string form is for tools that can only take a URL. Each response carries X-RateLimit-Limit and X-RateLimit-Remaining for today's quota. A missing or unknown key returns 401; a used-up quota returns 429 with Retry-After.
| Method | Endpoint | Returns |
|---|---|---|
| GET | /transcript/{VIDEO_ID}.txt |
Full transcript as a clean, timestamped Markdown document. |
| Parameter | Endpoint | Description |
|---|---|---|
key |
/transcript/{VIDEO_ID}.txt |
Your API key, if you are not sending it in the Authorization header. |
lang |
/transcript/{VIDEO_ID}.txt |
Optional. A YouTube language code such as en, es, or zh-Hant. Falls back to a human-uploaded track, then the auto-generated track. |
curl -H "Authorization: Bearer YOUR_KEY" \
"https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt?lang=en"
Content type is text/markdown; charset=utf-8. A short metadata header (title, source URL, language, duration, word count, and the other available caption languages) is followed by the transcript, grouped into short paragraphs with [m:ss] timestamps:
# 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
Other available languages: a-en (en) [auto], de-DE (de-DE), ja (ja), pt-BR (pt-BR), es-419 (es-419)
To request a specific language: https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt?lang=LANG_CODE
[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...
The output is Markdown, so it renders cleanly in chats, docs, and agents while staying readable as plain text.
const id = 'dQw4w9WgXcQ'
const res = await fetch(`https://youtube-transcript.ai/transcript/${id}.txt`, {
headers: { Authorization: 'Bearer YOUR_KEY' },
})
const transcript = await res.text()
console.log(transcript)
import requests
video_id = "dQw4w9WgXcQ"
url = f"https://youtube-transcript.ai/transcript/{video_id}.txt"
transcript = requests.get(url, headers={"Authorization": "Bearer YOUR_KEY"}).text
print(transcript)
curl -s -H "Authorization: Bearer YOUR_KEY" \
"https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt"
.txt path makes the response a readable document, so agents and pipelines can drop it straight into a prompt — no JSON parsing, no headless browser.Both plans use the same key. Create your key to start on Free, and upgrade from the same page. Every request counts as one, including repeats of the same video; the quota resets at 00:00 UTC. Need more than 1,000 a day? Email hello@youtube-transcript.ai.
Yes, up to 10 requests a day with a free API key. The Pro plan raises that to 1,000 a day for $120 a year.
You need a free API key and no SDK. Create the key, then make a plain HTTPS GET request to /transcript/{VIDEO_ID}.txt with Authorization: Bearer YOUR_KEY from any client or language.
UTF-8 Markdown (text/markdown): a metadata header (title, source, language, duration, word count, available languages), then the transcript in short paragraphs with [m:ss] timestamps. Still fully readable as plain text. CORS is open.
Yes — add ?lang=en (or any YouTube language code). It falls back to a human-uploaded track, then the auto-generated one.
Any public video that has captions — either creator-uploaded or YouTube auto-generated. Private, members-only, or caption-disabled videos can't be transcribed.
Yes — the .txt endpoint groups the transcript into short paragraphs, each prefixed with an [m:ss] timestamp.