YouTube Transcript API: Fetch Video Transcripts with One GET Request
Need YouTube transcripts in your app, data pipeline or AI agent? Your options are surprisingly awkward:
- YouTube's official Data API only lets you download caption tracks for videos you own (OAuth as the channel owner). It doesn't work for arbitrary videos.
- Scraper libraries (like the popular Python
youtube-transcript-api) hit YouTube's internal endpoints directly — they break whenever YouTube changes something, and get IP-blocked quickly at any real volume, especially from cloud IPs.
The Yoinku API gives you a third option: a hosted REST endpoint that handles the YouTube side (including proxies and format parsing) and returns clean JSON.
Quick start
Create a free account and issue an API key on the account page. Then:
curl -H "x-api-key: YOUR_API_KEY" \
"https://yoinku.com/api/v1/transcript?url=https://www.youtube.com/watch?v=VIDEO_ID"
The response is plain text and timestamped chunks in one payload:
{
"ok": true,
"data": {
"id": "VIDEO_ID",
"platform": "youtube",
"lang": "en",
"source": "manual",
"text": "The full transcript as one plain-text string...",
"chunks": [
{ "startSeconds": 0, "durationSeconds": 4.2, "text": "The full transcript" },
{ "startSeconds": 4.2, "durationSeconds": 3.8, "text": "as one plain-text string" }
],
"availableLanguages": { "manual": ["en"], "auto": ["en", "ja", "es"] }
}
}
Useful details:
- Creator subtitles beat auto-captions. When the creator uploaded real subtitles, you get those; otherwise the auto-generated track.
langparameter: request a specific language with&lang=ja,&lang=es, etc.availableLanguagestells you what exists.chunksare RAG-ready: each cue hasstartSecondsanddurationSeconds, so you can chunk by time windows and cite timestamps.- Failed calls are refunded automatically and never count against your quota.
Python example
import requests
resp = requests.get(
"https://yoinku.com/api/v1/transcript",
params={"url": "https://www.youtube.com/watch?v=VIDEO_ID", "lang": "en"},
headers={"x-api-key": "YOUR_API_KEY"},
)
data = resp.json()["data"]
print(data["text"][:500])
for chunk in data["chunks"][:5]:
print(f'{chunk["startSeconds"]:>8.1f}s {chunk["text"]}')
JavaScript example
const res = await fetch(
"https://yoinku.com/api/v1/transcript?url=" +
encodeURIComponent("https://www.youtube.com/watch?v=VIDEO_ID"),
{ headers: { "x-api-key": process.env.YOINKU_API_KEY } },
);
const { data } = await res.json();
console.log(data.text);
Metadata too
The companion endpoint GET /api/v1/meta?url=... returns structured metadata for the same videos: title, description, channel, duration, view counts, tags, chapters and available subtitle languages. Same auth, same quota pool. See the full API reference.
Using it from AI agents (MCP)
If your consumer is an AI agent rather than code, Yoinku also runs a remote MCP server at https://yoinku.com/mcp with the tools get_video_transcript, get_video_metadata and get_video_download_url — same API keys, same quotas. One line to add in Claude Code:
claude mcp add --transport http yoinku https://yoinku.com/mcp --header "x-api-key: YOUR_API_KEY"
Setup details are on the MCP page.
Pricing
- Free: 10 data requests (transcript/metadata) per day — enough to build and test.
- Hobby ($9/mo): 100 data requests/day.
- Pro ($29/mo): 1,000 data requests/day.
Quotas are per UTC day and shared across REST and MCP. Over-quota calls return HTTP 429 with an upgradeUrl. See pricing.
Summary
One GET request, one API key, and you get YouTube transcripts as both plain text and timestamped chunks — without maintaining scrapers or proxy pools. Create a free API key →