YouTube Transcript API

Fetch YouTube transcripts in a single call

POST any YouTube URL — Shorts, long-form, live replays, or youtu.be links — and get back a clean JSON transcript with timestamps. 1 credit per call, 60 requests per minute.

JSON response · Timestamped segments · Shorts & live replays supported · No scraping

Three steps to a transcript

1
Create an API key Generate a key in your dashboard. Free credits included.
2
POST a YouTube URL Send the full URL — watch?v=, youtu.be, or /shorts/.
3
Receive JSON Get title, full transcript, and timed segments.

POST /api/youtube/transcript

Base URL: https://api.transcriptmagic.com. Authenticate with a Bearer token in the Authorization header.

cURL
curl -X POST https://api.transcriptmagic.com/api/youtube/transcript \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Python
import requests

response = requests.post(
    "https://api.transcriptmagic.com/api/youtube/transcript",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
)

data = response.json()
print(data["title"])
print(data["transcript"])
JavaScript
const response = await fetch("https://api.transcriptmagic.com/api/youtube/transcript", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }),
});

const data = await response.json();
console.log(data.title, data.transcript);

What you get back

A clean JSON object with the full transcript, timed segments, video title, and your remaining credit balance.

200 OK
{
  "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "transcript": "We're no strangers to love. You know the rules and so do I...",
  "segments": [
    {
      "text": "We're no strangers to love",
      "startMs": "18500",
      "endMs": "21120",
      "startTimeText": "0:18"
    },
    {
      "text": "You know the rules and so do I",
      "startMs": "21120",
      "endMs": "24440",
      "startTimeText": "0:21"
    }
  ],
  "credits": 997
}
title The YouTube video title
transcript Full transcript joined as a single string
segments Line-level array with startMs, endMs, startTimeText
credits Your remaining credit balance after this call

What the API handles

Standard videos

Any public video on youtube.com/watch?v=… — from 30-second clips to multi-hour lectures.

YouTube Shorts

Vertical short-form content at youtube.com/shorts/…. Great for viral hook analysis and cross-posting to TikTok or Reels.

youtu.be short links

Share-URL format works out of the box — no need to expand it before calling the API.

Live replays

Completed live streams with captions available. Ideal for podcast archives and recorded webinars.

One credit per call

Every successful API request uses 1 credit. Monthly credits roll over, cancel anytime.

Free
$0 /month
10 credits/month
  • SRT exports
  • All platforms supported

No credit card required

Pro
$19 /month
3000 credits/month
Choose your credits:
  • All Plus features
  • Batch processing

Credits rollover. Cancel anytime

Need higher volume? Email [email protected] for custom pricing.

What developers build with it

SEO content pipelines

Turn YouTube videos into blog posts, structured summaries, and schema-rich articles that rank.

AI chatbots & RAG

Ingest channel archives into a vector DB and build Q&A bots grounded in video content.

Chaptered summaries

Use timestamps to auto-generate chapters, jump-to-moment UI, and digest views for long videos.

Course & lecture indexing

Make educational content searchable — learners type a concept, land at the exact second it's taught.

Creator research tools

Analyze what competitors say, extract viral hooks from Shorts, and track topic trends across channels.

Subtitle & dubbing workflows

Build SRT/VTT files straight from the segments array, then feed to translation for multilingual dubbing.

Questions developers ask

Does the YouTube Transcript API work on YouTube Shorts?

Yes. Any public YouTube URL works — Shorts (youtube.com/shorts/…), long-form videos, live replays, and youtu.be short links are all accepted. Just POST the full URL to /api/youtube/transcript.

What about age-restricted or unlisted videos?

Unlisted videos work as long as you provide the full URL. Age-restricted videos that require sign-in are not supported — the API can only fetch publicly viewable captions.

Which languages does the API support?

The API returns whichever caption track YouTube exposes for the video. That covers 100+ languages for auto-generated captions and every language creators manually publish. Translation is a separate step you run after fetching.

Do I get timestamps I can use for subtitles?

Yes. The segments array includes startMs, endMs, and startTimeText for each line, so you can build SRT/VTT files, chaptered summaries, or jump-to-moment UI directly from the response.

How accurate is the transcript?

When the creator has uploaded manual captions, accuracy is essentially 100%. When only YouTube auto-captions exist, accuracy matches YouTube's own ASR — very good for clear speech, weaker on heavy music or overlapping dialogue.

What are the rate limits?

60 requests per minute per API key. X-RateLimit-Remaining and Retry-After headers are returned on every response. Need more throughput? Email [email protected].

Other platforms & references

Dashboard Pricing Get Extension