Free YouTube Transcript API
One GET request returns the transcript of any public YouTube video as JSON, TXT, SRT or VTT. No API key, no account, no payment. Open CORS, so it works from a browser, a script, a server or an AI agent.
curl "https://youtubetextconverter.com/api/public/v1/transcript?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&format=txt"Base URL
https://youtubetextconverter.com/api/public/v1
GET /transcript
Returns the transcript of one video. POST works too, with the same query parameters.
| Parameter | Default | Description |
|---|---|---|
| url | required | YouTube URL, youtu.be link, shorts link or the 11 character video id. |
| format | json | json, txt, srt or vtt. |
| lang | auto | Language code such as en, de, sk. Use /languages to see the options. |
| timestamps | false | Set to true to add [mm:ss] marks to the txt output. |
{
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up",
"author": "Rick Astley",
"language": "en",
"availableLanguages": [
{ "languageCode": "en", "label": "English", "auto": false }
],
"segmentCount": 58,
"text": "We're no strangers to love ...",
"segments": [
{ "start": 18.64, "duration": 3.24, "text": "We're no strangers to love" }
]
}GET /languages
Lists every subtitle track of a video, manual and auto generated, plus the title, channel and length.
curl "https://youtubetextconverter.com/api/public/v1/languages?url=dQw4w9WgXcQ"GET /health
Returns the service status and the list of endpoints. Useful for monitoring.
Code examples
const res = await fetch(
"https://youtubetextconverter.com/api/public/v1/transcript?url=" +
encodeURIComponent("https://youtu.be/dQw4w9WgXcQ")
);
const data = await res.json();
console.log(data.text);import requests
r = requests.get(
"https://youtubetextconverter.com/api/public/v1/transcript",
params={"url": "https://youtu.be/dQw4w9WgXcQ", "format": "txt"},
)
print(r.text)curl -o subtitles.srt "https://youtubetextconverter.com/api/public/v1/transcript?url=dQw4w9WgXcQ&format=srt"Errors
Errors come back as JSON with a code and a plain message.
{ "error": { "code": "no_captions", "message": "This video has no subtitles, so there is nothing to transcribe." } }
400 invalid_url the link is not a YouTube link
400 missing_url the url parameter was not sent
404 no_captions the video has no subtitle track
502 video_unavailable private, blocked or age restricted videoPrefer an AI agent?
The same tools are available as a free MCP server, so Claude, Cursor or ChatGPT can read YouTube videos for you. See the MCP server page, or use the web converter if you only need one video.
Frequently asked questions
- Is the YouTube transcript API really free?
- Yes. There is no API key, no account and no payment. Please keep your call rate sane so the service stays free for everyone.
- Do I need an API key or a token?
- No. Every endpoint is open. You only send the YouTube URL.
- Which formats does the API return?
- JSON with timed segments, plain TXT, SRT and VTT. You pick it with the format parameter.
- Can I call the API from a browser?
- Yes. CORS is open for every origin, so fetch works from any web page.
- What happens when a video has no subtitles?
- The API returns HTTP 404 with the error code no_captions. Videos that are private or blocked return 502 with video_unavailable.
- Is there a rate limit?
- There is no hard key based limit. Results are cached for ten minutes per video, so repeated calls are fast and cheap.