YouTube Transcript API
One request in, the full transcript out. Pay only for the videos you fetch.
Get your free API keyQuickstart
- Sign in and create an API key on the API dashboard. You get 10 free credits (5 transcripts).
- Send the key in the X-API-Key header with a YouTube URL or video ID.
- Buy a credit pack when you need more, or turn on auto top-up.
curl -X POST https://sum.video/api/v1/transcript \
-H "X-API-Key: sv_live_your_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "lang": "en"}'Request
POST /api/v1/transcript
url: YouTube URL (watch, youtu.be, shorts, embed or live link). Use this or video_id.video_id: The 11 character YouTube video ID.lang: Preferred caption language, for example en, de or pt-BR. Defaults to en. When that language is missing, the original track is returned and the response tells you its real language.format: json (segments with timestamps, default), text or srt.
import requests
response = requests.post(
"https://sum.video/api/v1/transcript",
headers={"X-API-Key": "sv_live_your_key"},
json={"video_id": "dQw4w9WgXcQ", "lang": "en", "format": "text"},
timeout=120,
)
print(response.json()["text"])const response = await fetch("https://sum.video/api/v1/transcript", {
method: "POST",
headers: { "X-API-Key": process.env.SUMVIDEO_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://youtu.be/dQw4w9WgXcQ" }),
});
const { segments, credits_remaining } = await response.json();Response
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"is_generated": false,
"credits_used": 2,
"credits_remaining": 98,
"segments": [
{ "text": "We're no strangers to love", "offset": 18.64, "duration": 3.24 }
]
}Errors
| 401 | invalid_key | Missing, wrong or revoked API key. |
| 400 | invalid_input | The URL or video ID could not be read. |
| 402 | insufficient_credits | Your balance is below 2 credits. |
| 402 | budget_exceeded | You reached the monthly credit limit you set. |
| 404 | no_transcript | The video has no captions, or it is private, live or removed. Not charged. |
| 429 | rate_limited | More than 60 requests per minute on one key. Wait for Retry-After seconds. |
| 502 | upstream_error | YouTube did not answer in time. Not charged, retry later. |
Check your balance
curl https://sum.video/api/v1/credits -H "X-API-Key: sv_live_your_key"Pricing
Every transcript costs 2 credits. Credits never expire. Pro subscribers get 100 bonus credits every month.
| Pack | Credits | Transcripts | Price | Per transcript |
|---|---|---|---|---|
| Starter | 100 | 50 | $4.49 | $0.090 |
| Pro | 500 | 250 | $13.99 | $0.056 |
| Scale | 2,000 | 1,000 | $37.99 | $0.038 |
| Business | 5,000 | 2,500 | $74.99 | $0.030 |
Auto top-up, budgets and alerts
- Auto top-up buys a pack with your saved card when your balance drops below a threshold you choose.
- A monthly top-up budget caps how much auto top-up can spend, and a monthly credit limit stops requests when reached.
- Email alerts tell you when your balance runs low, when you reach 80% of your monthly limit, or when a top-up fails.
Limits and fair use
60 requests per minute per key, up to 5 active keys per account. The API returns captions that already exist on YouTube; it does not transcribe audio. You are responsible for using transcripts in line with the rights of the video owners and YouTube's terms.
FAQ
- Do I pay again for the same video?
- Yes, each successful request costs 2 credits, but repeated videos are answered from our cache in milliseconds.
- What happens when a video has no captions?
- You get a no_transcript error and no credits are taken.
- Is it compatible with other transcript APIs?
- The request and response follow the common url, lang and segments shape, so switching usually means changing the base URL and the key.