YouTube Transcript API

The simplest YouTube transcript API there is: add .txt to a video ID and get the full transcript back as a clean, readable document. No API key, no SDK, no signup — just one HTTPS request you can run from cURL, the browser, or any language.

No API key No SDK Markdown + UTF-8 Timestamped CORS open Edge-cached 24h

Quick start

Take the 11-character video ID and request this URL:

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 https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt

Try the live example → Or use the web tool

Endpoint reference

MethodEndpointReturns
GET /transcript/{VIDEO_ID}.txt Full transcript as a clean, timestamped Markdown document.

Query parameters

ParameterEndpointDescription
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 "https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt?lang=en"

Response format

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.

Code examples

JavaScript (fetch)

const id = 'dQw4w9WgXcQ'
const res = await fetch(`https://youtube-transcript.ai/transcript/${id}.txt`)
const transcript = await res.text()
console.log(transcript)

Python (requests)

import requests

video_id = "dQw4w9WgXcQ"
url = f"https://youtube-transcript.ai/transcript/{video_id}.txt"
transcript = requests.get(url).text
print(transcript)

Shell (cURL)

curl -s "https://youtube-transcript.ai/transcript/dQw4w9WgXcQ.txt"

Why this YouTube transcript API is the fastest path

Pricing & limits

Free

$0
  • No API key, no signup
  • Fair-use limits — great for prototypes, scripts, and personal projects
  • All endpoints, all languages
  • 24-hour edge caching

Unlimited / Commercial

$1 / 1,000 API calls
  • No rate limits for production & high-volume use
  • Suitable for apps, agents, and data pipelines
  • Priority capacity
  • Email hello@youtube-transcript.ai to get started

The free tier is intended for normal, low-volume use. If you need guaranteed throughput, no rate limits, or commercial terms, reach out at hello@youtube-transcript.ai and we'll set you up at $1 per 1,000 calls.

FAQ

Is the YouTube transcript API free?

Yes — free with no API key under fair-use limits. For high-volume or commercial production use, email us for an unlimited plan at $1 per 1,000 calls.

Do I need an API key or SDK?

No. There's no key, token, or SDK. Make a plain HTTPS GET request to /transcript/{VIDEO_ID}.txt from any client or language.

What does it return?

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.

Can I pick the caption language?

Yes — add ?lang=en (or any YouTube language code). It falls back to a human-uploaded track, then the auto-generated one.

Which videos work?

Any public video that has captions — either creator-uploaded or YouTube auto-generated. Private, members-only, or caption-disabled videos can't be transcribed.

Does the transcript include timestamps?

Yes — the .txt endpoint groups the transcript into short paragraphs, each prefixed with an [m:ss] timestamp.

Run the live example → Contact for unlimited