Blog

How to Get a YouTube Transcript Programmatically (2026 Guide)

August 3, 2026· 3 min read tutorialapi

Transcripts are one of the most useful pieces of data on YouTube, but also among the most annoyingly hard to get. You want them for subtitles, for feeding an LLM, for SEO, for accessibility, or for building a search feature over video content. Whatever your reason, you need a reliable way to turn a video URL into plain text.

This guide shows three ways to do it, from a one-liner to a production-grade call, all against a single HTTP API.

Why there's no "official" way

YouTube doesn't offer a public, documented transcript API for developers. The transcripts you see under a video live behind undocumented endpoints. That's why every tool in this space, including open-source libraries like youtube_transcript_api and downloaders like yt-dlp, is technically working around YouTube's internals.

That works, until it doesn't: YouTube aggressively blocks datacenter IPs, changes endpoints, and adds bot checks. If you're building something real, you don't want to be the one fighting that battle every week.

The three options

1. The youtube_transcript_api library (Python). Great for one-off scripts. But it breaks whenever YouTube changes things, it's Python-only, and you're on the hook for IP blocks.

2. yt-dlp. A swiss-army knife for downloading. Transcript extraction is a side feature, and it pulls in a lot of machinery (and dependencies) for what is, ultimately, a single API call.

3. A hosted transcript API. You send a video URL, you get JSON back. Caching, IP rotation, and YouTube's anti-bot measures are someone else's problem. This is what the rest of this guide uses.

The endpoint

The rest of this guide uses TranscribeMaxx, a hosted API. One endpoint, GET /api/v1/transcript, returns a full transcript as JSON, with or without timestamps, plus metadata like the video's title and length.

It's free to start: grab a key in one click on the homepage (no signup), or read the API docs for details.

curl: the fastest way to test

# plain transcript, as JSON (default)
curl "https://transcribemaxx.com/api/v1/transcript?video_url=jNQXAC9IVRw" \
  -H "Authorization: Bearer tmx_YOUR_KEY"

# plain text instead of JSON
curl "https://transcribemaxx.com/api/v1/transcript?video_url=jNQXAC9IVRw&format=text" \
  -H "Authorization: Bearer tmx_YOUR_KEY"

# with timestamps + metadata
curl "https://transcribemaxx.com/api/v1/transcript?video_url=jNQXAC9IVRw&include_timestamp=true&send_metadata=true" \
  -H "Authorization: Bearer tmx_YOUR_KEY"

The JSON response looks like this:

{
  "video_id": "jNQXAC9IVRw",
  "language": "en",
  "transcript": [
    { "text": "All right, so...", "start": 0, "duration": 3.2 },
    { "text": "...", "start": 3.2, "duration": 4.1 }
  ],
  "length_seconds": 19,
  "lengthText": "0:19"
}

Node.js (no dependencies)

Node 18+ ships fetch, so a full transcription call is ~15 lines:

const res = await fetch(
  "https://transcribemaxx.com/api/v1/transcript?video_url=jNQXAC9IVRw",
  { headers: { Authorization: "Bearer tmx_YOUR_KEY" } }
);
const data = await res.json();

const fullText = data.transcript.map((s) => s.text).join(" ");
console.log(fullText);

Python

import requests

res = requests.get(
    "https://transcribemaxx.com/api/v1/transcript",
    params={"video_url": "jNQXAC9IVRw"},
    headers={"Authorization": "Bearer tmx_YOUR_KEY"},
)
data = res.json()
full_text = " ".join(seg["text"] for seg in data["transcript"])
print(full_text)

Timestamps and languages

Pass include_timestamp=true and every segment arrives with its start time and duration, handy for building a caption-style player or jumping to sections.

Language selection is a priority list: language=de,en tries German first, falls back to English. Auto-generated captions work too: the API accepts asr-* language codes (e.g. asr-es for Spanish auto-captions), so even videos without manual subtitles can be transcribed.

One detail that matters: caching

Fetching a transcript from YouTube costs a round-trip of roughly 10 seconds through a proxy. A good API caches aggressively: on TranscribeMaxx, cached hits return in about 20 milliseconds (500x faster than the miss path), and cached results never count against your quota usage on repeated calls.

Pricing

Plans start at $1/month for 300 transcriptions (billed annually, $12/year), up to 2,000/month on the pro tier. A free tier exists too: 30 lifetime transcriptions per IP. Compare plans on the pricing page.

Summary

Want to compare the few options in this space? Read our comparison of YouTube transcript APIs.

Try it yourself: it's free to start

Get your API key in one click and transcribe your first video in seconds. No signup required for the free key.

← All posts