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

Commercial

Let's talk
  • For products built on top of this endpoint
  • Terms and capacity agreed case by case
  • Tell us your use case and rough daily volume
  • Email hello@youtube-transcript.ai to start the conversation

The free tier is intended for normal, low-volume use — personal projects, prototypes, and scripts. It is not a resale or bulk-ingest tier, and sustained high-volume traffic is rate limited. If you're building a commercial product on top of it, email hello@youtube-transcript.ai with your use case and rough daily volume.

FAQ

Is the YouTube transcript API free?

Yes — free with no API key under fair-use limits. It's not intended for resale or high-volume production workloads; if you're building a commercial product on top of it, email us to discuss a partnership.

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 → Commercial use? Talk to us