YouTube · captions · SRT / VTT

A YouTube captions API for any public video

You want the subtitles of a YouTube video in your code. The official API won't give them to you unless you own the video. Here's what works instead.

Why the YouTube Data API doesn't work for this

The YouTube Data API v3 has a captions resource, and it looks like the obvious answer. In practice:

So most developers end up scraping the captions YouTube shows in the player, with a library like youtube-transcript-api or yt-dlp. That works on a laptop, but YouTube blocks most cloud server IPs (see RequestBlocked errors).

One request, any public video

curl -H "x-api-key: YOUR_KEY" \
  "https://api.transkrio.com/v1/transcript?url=https://youtu.be/dQw4w9WgXcQ&format=srt"

Pick the output with format:

formatYou get
json (default)Segments with text, start, duration, plus the joined text, language and is_generated
textPlain text, ready for an LLM
markdownParagraphs of about a minute with timestamp links
srt / vttSubtitle files you can edit, translate or re-upload

Add lang=es (or any ISO code) for a specific language. If the video has no captions at all, the audio is transcribed instead, for 1 credit per started minute. A video with captions costs 1 credit, and failed requests are free.

Code

Full examples with error handling: Python and Node.js. For a whole channel or playlist, see transcribe a YouTube channel. For a single video without code, use the free YouTube transcript generator.

Try it with 100 free credits No card needed. Failed requests are free and unused credits roll over.
Get free API key

FAQ

Can I download captions with the YouTube Data API?

Only for videos on channels you manage. captions.download needs OAuth from the video's owner, so it fails for other people's videos. It also costs 200 quota units of a default 10,000 a day.

Do I need a Google Cloud project or an API key from Google?

No. You only need a Transkrio key. There is no YouTube quota to manage.

Can I get auto-generated captions?

Yes. You get the manual captions when they exist and the auto-generated ones otherwise; is_generated tells you which. Pass lang to pick a language.