A YouTube Transcript API built and hosted by GetYouTubeTranscript: get YouTube video transcripts via REST API, no Google API key, no scraper to maintain, no yt-dlp or headless browser on your own servers. The same API also does YouTube search, channel metadata and full upload history, and playlist listing.
This repo is the public docs + examples home for the API: endpoint reference, the OpenAPI spec, and runnable examples in curl, Python, JavaScript, Go, and PHP. The API itself is a hosted service - there's no server code to run here.
Most "YouTube transcript" code you'll find is a scraper you run yourself: it works until YouTube changes something or your server's IP gets rate-limited, and then it's yours to fix. GetYouTubeTranscript runs that scraping infrastructure for you, behind one stable REST API:
- One API key, one bill, one thing to integrate against - not a scraper to patch every time YouTube changes its page structure
- Search, channel, and playlist endpoints alongside transcripts, so you're not stitching together three different tools
- A free tier (100 credits, no card) to try it before you commit to anything
- A published OpenAPI spec and official Python and Node.js SDKs
All endpoints live under https://getyoutubetranscript.com/api/v1.
| Method | Path | Credits | Description |
|---|---|---|---|
GET |
/transcript |
1 (AI: 3 per minute) | Full transcript for one video, plus title/author/thumbnail and caption provenance. Optional per-line timestamps with timestamps=true. mode=auto or mode=generate makes an AI transcript for videos with no captions |
GET |
/transcript/jobs |
free | Status or result of an AI transcript job |
GET |
/transcript/languages |
1 credit | A video's caption languages (manual or auto-generated) and which one a default request returns |
POST |
/batch |
1 per successful video | Queue up to 100 videos at once; results by polling or a signed webhook |
GET |
/batch |
free | Batch status and a page of results |
GET |
/search |
1 | Search YouTube videos or channels, paginated |
GET |
/resolve |
1 credit | Resolve a channel @handle/URL to a channel ID |
GET |
/channel/latest |
1 credit | Channel details + its 15 newest uploads |
GET |
/channel/search |
1 | Search within one channel's videos, paginated |
GET |
/channel/videos |
1 | A channel's uploads, Shorts or live streams (tab), newest, most popular or oldest first (sort), paginated |
GET |
/channel/playlists |
1 | A channel's playlists, paginated |
GET |
/channel/posts |
1 | A channel's community posts, paginated |
GET |
/channel/banner |
1 | A channel's banner (uncropped, plus every crop size) and avatar |
GET |
/video/related |
1 | The videos YouTube suggests next to a video |
GET |
/video/dislikes |
1 | A video's estimated likes and dislikes |
GET |
/video |
1 | A video's details: views, likes, upload date, duration, tags |
GET |
/video/comments |
1 / page | A page of a video's top comments |
GET |
/tiktok/transcript |
1 | A TikTok video's transcript as timed segments |
GET |
/playlist |
1 | List every video in a playlist, paginated |
GET |
/credits |
free | Check remaining credit balance, plan, and rate limit |
POST |
/signup |
free | Self-serve signup step 1: email a 6-digit OTP |
POST |
/signup/verify |
free | Self-serve signup step 2: verify OTP, mint an API key |
"Free" endpoints still require a valid API key and are still rate-limited - only the credit cost is zero.
Every request (except /signup and /signup/verify) needs an API key, sent as either:
Authorization: Bearer sk_live_...
or:
x-api-key: sk_live_...
Get a key at getyoutubetranscript.com (free tier, no card), or mint one in code with the self-serve signup flow - see Examples.
curl "https://getyoutubetranscript.com/api/v1/transcript?v=jNQXAC9IVRw&language=en" \
-H "Authorization: Bearer sk_live_..."The gyt command line wraps the same API: npm install -g @tubeagentkit/cli, then gyt login and gyt transcript <url>. See tubeagentkit/youtube-transcript-cli.
{
"success": true,
"data": {
"video_id": "jNQXAC9IVRw",
"language_code": "en",
"requested_language": "en",
"caption_type": "manual",
"title": "Me at the zoo",
"author_name": "jawed",
"author_url": "https://www.youtube.com/channel/UC4QobU6STFB0P71PVoOGeMg",
"thumbnail_url": "https://i.ytimg.com/vi/jNQXAC9IVRw/hqdefault.jpg",
"transcript": "All right, so here we are, in front of the elephants...",
"word_count": 39,
"cached": true,
"fetched_at": "2026-09-20T03:10:58.938Z"
}
}| Field | Meaning |
|---|---|
language_code |
The caption track actually returned |
requested_language |
What you asked for. If it differs from language_code, YouTube didn't have that language |
caption_type |
manual (uploaded by the creator), auto (YouTube speech recognition), ai (our AI transcript, see AI transcripts), or null if unknown |
cached |
true when served from the stored copy rather than fetched from YouTube just now |
fetched_at |
ISO 8601 time it was fetched from YouTube |
By default /transcript returns one block of plain text. Add timestamps=true to also get data.segments, one {start, duration, text} entry per caption line (times in seconds):
curl "https://getyoutubetranscript.com/api/v1/transcript?v=5e37ZT3SQbk&language=en×tamps=true" \
-H "Authorization: Bearer sk_live_..."{
"success": true,
"data": {
"video_id": "5e37ZT3SQbk",
"language_code": "en",
"transcript": "So, Reed, education, which a lot of ...",
"segments": [
{ "start": 3.96, "duration": 4.56, "text": "So, Reed, education, which a lot of" }
]
}
}The other fields are the same as above (shortened here). Without timestamps=true there is no segments key. It costs the same 1 credit.
Some videos have no captions at all. Add mode to /transcript to get an AI speech-to-text transcript instead of a 404:
mode |
What you get | Cost |
|---|---|---|
native (default) |
Captions only | 1 credit |
auto |
Captions if the video has any, otherwise an AI transcript | 1 credit for captions, AI price otherwise |
generate |
Always an AI transcript | AI price |
The AI price is 3 credits per minute of video, rounded up, minimum 3 (a 10 minute 30 second video costs 33 credits). Videos up to 4 hours; live and upcoming streams are refused. With an AI mode, language is the language spoken in the video; leave it out to use the video's own audio language. translate can't be combined with mode=auto or mode=generate.
- Every
mode=auto|generateanswer has anX-Credits-Chargedheader with what the call cost. - Reading your own AI transcript again within 24 hours costs 0.
- Credits are taken when the AI transcript starts and refunded automatically if it fails.
A short video usually answers 200 straight away, with caption_type: "ai", source: "ai" and duration_seconds added to data. A longer one answers 202 with a job to poll:
{
"success": true,
"data": null,
"job": {
"job_id": "6f1c2b0e-8a4d-4c1e-9b7a-2d3e4f5a6b7c",
"status": "running",
"video_id": "jNQXAC9IVRw",
"credits_charged": 3,
"poll_url": "/api/v1/transcript/jobs?id=6f1c2b0e-8a4d-4c1e-9b7a-2d3e4f5a6b7c",
"poll_interval_seconds": 5,
"created_at": "2026-09-20T03:10:58.938Z"
}
}Poll GET /transcript/jobs?id=<job_id> every poll_interval_seconds (5). Polling is free and only the account that started the job can read it. It answers 202 while the job is queued or running, 200 with the transcript in data when it is done, or the job's error (for example 502 AI_FAILED) when it failed. Add timestamps=true to the poll to get segments. Jobs are kept 7 days.
# Start (or reuse) an AI transcript
curl -i "https://getyoutubetranscript.com/api/v1/transcript?v=jNQXAC9IVRw&mode=generate" \
-H "Authorization: Bearer $GYT_API_KEY"
# If that answered 202, poll the job until it answers 200
JOB_ID=6f1c2b0e-8a4d-4c1e-9b7a-2d3e4f5a6b7c
while :; do
code=$(curl -s -o job.json -w '%{http_code}' \
"https://getyoutubetranscript.com/api/v1/transcript/jobs?id=$JOB_ID" \
-H "Authorization: Bearer $GYT_API_KEY")
[ "$code" = "202" ] || break
sleep 5
done
cat job.json| Param | Required | Description |
|---|---|---|
v |
yes | YouTube video URL (full or short) or an 11-character video ID |
language |
no | Caption language code, e.g. en, es (default en) |
timestamps |
no | Set to true to also return data.segments: one {start, duration, text} per caption line, times in seconds. Same 1 credit. |
translate |
no | Language code to translate the transcript into, e.g. es. Not with mode=auto or mode=generate |
mode |
no | native (default, captions only), auto (captions, else AI) or generate (always AI). See AI transcripts |
| Param | Required | Description |
|---|---|---|
id |
yes | The job_id from a 202 answer of /transcript |
timestamps |
no | true to include segments in the finished transcript |
Free. Answers 202 while the job runs, 200 with data and job when it is done, or the job's error when it failed. 404 JOB_NOT_FOUND if the id doesn't belong to your account.
| Param | Required | Description |
|---|---|---|
v |
yes | YouTube video URL (full or short) or an 11-character video ID |
Returns default_language_code (what /transcript returns with no language) and languages: one {language_code, name, caption_type} per language and caption type. An empty list means the video has captions turned off. Costs 1 credit per successful call.
Queue up to 100 videos in one call. Returns 202 with a batch_id immediately; transcripts are fetched in the background. Submitting is free; 1 credit per video that returns a transcript, failed videos are never charged (10 videos where 2 have no captions = 8 credits).
| Body field | Required | Description |
|---|---|---|
videos |
yes | Array of 1-100 video URLs or IDs. Duplicates are fetched once |
language |
no | Caption language for every video (default en) |
timestamps |
no | true to include per-line segments in the results |
webhook_url |
no | Public https URL that receives a signed batch.completed POST |
Optional header Idempotency-Key: retrying with the same key returns the original batch. When webhook_url is set, the response includes a webhook_secret (shown once). Each delivery has X-GYT-Signature: t=<unix>,v1=<hex>, where v1 is HMAC-SHA256 of "<t>.<raw body>" keyed with that secret; both SDKs ship a verify_webhook_signature / verifyWebhookSignature helper. At most 5 unfinished batches per account; results are kept 7 days.
curl -X POST "https://getyoutubetranscript.com/api/v1/batch" \
-H "Authorization: Bearer sk_live_..." -H "Content-Type: application/json" \
-d '{"videos": ["jNQXAC9IVRw", "dQw4w9WgXcQ"]}'| Param | Required | Description |
|---|---|---|
id |
yes | The batch_id from POST /batch |
offset |
no | Items to skip (default 0) |
limit |
no | Items per page, 1-50 (default 20) |
Returns status (queued / processing / completed), counts, credits_charged, and items in submission order. Succeeded items carry the same fields as /transcript (except cached); failed items carry an error_code such as TRANSCRIPT_DISABLED, VIDEO_UNAVAILABLE or PAYMENT_REQUIRED. Page with next_offset (null on the last page).
| Param | Required | Description |
|---|---|---|
q |
yes, unless page_token is set |
Search query, minimum 2 characters |
page_token |
no | Continuation token from a previous response's data.pagination.next_page_token |
type |
no | video (default) or channel - restricts to one kind, doesn't mix both |
country |
no | Two-letter region code, e.g. us |
language |
no | Result language hint, e.g. en |
limit |
no | Max results for this page |
| Param | Required | Description |
|---|---|---|
handle |
yes | Channel @handle, channel URL, or UC... id |
| Param | Required | Description |
|---|---|---|
channel |
yes | Channel @handle, URL, or UC... id |
| Param | Required | Description |
|---|---|---|
channel |
yes, unless continuation is set |
Channel @handle, URL, or UC... id |
q |
yes, unless continuation is set |
Query to search within the channel, minimum 2 characters |
continuation |
no | Continuation token from a previous response's data.continuation_token |
| Param | Required | Description |
|---|---|---|
channel |
yes, unless continuation is set |
Channel @handle, URL, or UC... id |
tab |
no | videos (default), shorts, or streams (the Live tab). First page only |
sort |
no | latest (default), popular, or oldest. First page only |
continuation |
no | Continuation token from a previous response's data.continuation_token. It already carries tab and sort |
| Param | Required | Description |
|---|---|---|
channel |
yes, unless continuation is set |
Channel @handle, URL, or UC... id |
continuation |
no | Continuation token from a previous response's data.continuation_token |
Returns data.playlists: one {position, id, title, link, type, video_count, thumbnail} per playlist. Pass a playlist's id to /playlist to list its videos.
| Param | Required | Description |
|---|---|---|
channel |
yes, unless continuation is set |
Channel @handle, URL, or UC... id |
continuation |
no | Continuation token from a previous response's data.continuation_token |
Returns data.posts: one {position, id, url, text, links, published_time, likes, comments, attachment} per community post.
| Param | Required | Description |
|---|---|---|
channel |
yes | Channel @handle, URL, or UC... id |
Returns data.avatar, data.has_banner and data.banner: the uncropped original, the largest crop, and every crop in sizes ({url, width, height}).
| Param | Required | Description |
|---|---|---|
v |
yes | Video ID or full YouTube URL |
Returns data.related: the videos YouTube suggests next to the video, each {position, id, title, link, channel, views, published_time, length, thumbnail}.
| Param | Required | Description |
|---|---|---|
v |
yes | Video ID or full YouTube URL |
Returns data.likes, data.dislikes, data.rating and data.view_count. YouTube no longer publishes dislikes, so these are estimates (data.estimated is always true).
| Param | Required | Description |
|---|---|---|
v |
yes | Video ID or full YouTube URL |
Returns data.title, data.description, data.channel (id, name, subscribers, thumbnail), data.views (exact, a digit string), data.likes (YouTube's rounded label, e.g. "19M"), data.upload_date, data.duration (seconds), data.thumbnails and data.keywords (the video's tags). A missing or private video is a 404 VIDEO_UNAVAILABLE.
| Param | Required | Description |
|---|---|---|
v |
yes | Video ID or full YouTube URL, on every page |
continuation |
no | data.continuation_token from the previous page, sent with the same v |
Returns data.comments (each {comment_id, link, channel, published_date, text, likes, replies}), data.has_more and data.continuation_token (null on the last page). 1 credit per page. A 404 COMMENTS_DISABLED means comments are turned off or the video does not exist.
| Param | Required | Description |
|---|---|---|
url |
yes | TikTok video URL, short link (vm.tiktok.com/...) or numeric video ID |
Returns data.video_id, data.author, data.description (up to 500 characters), data.language (e.g. "eng-US"), data.auto_generated and data.segments (each {start, text}, start in seconds). A TikTok without captions, or one that can't be found, is a 404 TRANSCRIPT_NOT_FOUND and is not charged.
| Param | Required | Description |
|---|---|---|
list |
yes, unless continuation is set |
Playlist ID or URL |
continuation |
no | Continuation token from a previous response's data.continuation_token |
All continuation/page tokens are opaque - pass them back exactly as received, don't inspect or construct them.
Every error response has this shape:
{ "success": false, "code": "INVALID_API_KEY", "message": "This API key is invalid or has been revoked." }| HTTP status | Code | Meaning |
|---|---|---|
| 400 | BAD_REQUEST / endpoint-specific codes (e.g. MISSING_URL, INVALID_URL) |
Missing or invalid parameters |
| 401 | MISSING_API_KEY |
No key provided in Authorization: Bearer or x-api-key |
| 401 | INVALID_API_KEY |
Key is invalid or has been revoked |
| 402 | PAYMENT_REQUIRED |
Out of credits - response includes creditsLeft and topupCreditsLeft. For an AI transcript, also when the balance can't cover it; credits_required says how many it needs |
| 404 | endpoint-specific (e.g. video/channel/playlist not found, no captions available) | Resource doesn't exist or has no transcript |
| 404 | JOB_NOT_FOUND |
No AI transcript job with this id for your account |
| 422 | LIVE_STREAM / TOO_LONG / AUDIO_UNAVAILABLE |
AI transcripts only: a live or upcoming stream, a video over 4 hours, or audio that could not be read |
| 429 | RATE_LIMITED |
Rate limit exceeded for your plan tier - response includes requestsThisMinute |
| 429 | TOO_MANY_BATCHES |
5 batches still running for this account - wait for one to finish |
| 429 | TOO_MANY_JOBS |
5 AI transcripts already in progress, or too many failed today |
| 500 | INTERNAL_ERROR |
Something broke on our end |
| 502 | AI_FAILED |
The AI transcript could not be made. Credits are refunded |
Failed and rate-limited requests are never charged a credit - only a successful (2xx) response consumes one. For batches, only videos that return a transcript are charged. AI transcript credits are refunded automatically if the job fails.
Rate limits are per API key, per plan tier:
| Plan | Requests/minute |
|---|---|
| Free | 60 |
| Monthly ($5/mo) | 200 |
| Annual ($4.50/mo) | 300 |
| Starter ($19/mo) | 300 |
| Pro ($49/mo) | 400 |
| Scale ($99/mo) | 600 |
A 429 response includes requestsThisMinute so you can back off accordingly.
search, playlist, channel/search, channel/videos, channel/playlists, and channel/posts are all paginated the same way: the first response includes a continuation token (data.pagination.next_page_token for /search, data.continuation_token for the others). Pass that token back on the next call and drop the original query params. A missing/null token, or has_more: false, means there are no more pages.
More complete, runnable versions of these live in examples/, reading the API key from the GYT_API_KEY environment variable.
curl "https://getyoutubetranscript.com/api/v1/transcript?v=jNQXAC9IVRw" \
-H "Authorization: Bearer $GYT_API_KEY"import requests
response = requests.get(
"https://getyoutubetranscript.com/api/v1/transcript",
headers={"Authorization": f"Bearer {api_key}"},
params={"v": "jNQXAC9IVRw"},
)
data = response.json()["data"]
print(data["title"], data["transcript"])const response = await fetch(
`https://getyoutubetranscript.com/api/v1/transcript?v=jNQXAC9IVRw`,
{ headers: { Authorization: `Bearer ${apiKey}` } }
);
const { data } = await response.json();
console.log(data.title, data.transcript);Run any example: GYT_API_KEY=sk_live_... python examples/python/get_transcript.py jNQXAC9IVRw
- youtube-transcript-api-python - typed Python client with batch + webhook helpers, plus self-serve signup helpers
- youtube-transcript-api-node - zero-dependency Node.js/TypeScript client with batch + webhook helpers, ESM + CJS
- youtube-mcp - remote MCP server so Claude, ChatGPT, Cursor, and VS Code can call this API as a tool
- youtube-transcript-skills - Agent Skill for Claude Code, Cursor, and other coding agents
- n8n-nodes-getyoutubetranscript - n8n community node for workflow automation
- Chrome extension - get a transcript and ask AI questions about any video without leaving YouTube
- AI pipelines - feed transcripts into an LLM for summarization, RAG, or chat over video content
- Content repurposing - turn a video into a blog post, newsletter, or social copy
- Research - pull transcripts across many videos for analysis at scale
- Channel monitoring - poll
/channel/videosor/channel/latestto catch new uploads from channels you track - YouTube search in your app -
/searchwithout needing a Google Cloud project or API key
jdepoix/youtube-transcript-api is a well-known open-source Python library for pulling YouTube captions. It's free, it's good, and for local scripts and small personal projects it's often the right tool.
Where it and this API differ:
| This API | jdepoix/youtube-transcript-api | |
|---|---|---|
| Runs where | Our servers (hosted) | Your machine / your server, from your own IP |
| Cloud hosting | Not affected - we handle the scraping infra | Frequently blocked by YouTube on AWS/GCP/Azure IP ranges |
| Language | Any HTTP client | Python only |
| Search | Yes (/search) |
No |
| Channel data | Yes (/channel/*, /resolve) |
No |
| Playlist listing | Yes (/playlist) |
No |
| Cost | Free tier, then metered credits | Free, always |
| Maintenance | We maintain it | You update the package when YouTube changes something |
If you're running a quick local script and don't want to sign up for anything, jdepoix's library is genuinely a good choice. If you're running on a server (especially a cloud provider IP that YouTube is more likely to rate-limit), want search/channel/playlist data too, or don't want to be the one who fixes the scraper when it breaks, that's what this API is for.
Is there an official YouTube transcript API?
Not for arbitrary videos. The official YouTube Data API has a captions.download method, but it only works for videos you own and requires OAuth as the channel owner. GetYouTubeTranscript is an independent hosted API (not affiliated with YouTube or Google) that returns the transcript of any public video with captions, along with search, channel, and playlist data.
Do I need a Google API key?
No. You only need a GetYouTubeTranscript API key, obtained from the dashboard or the self-serve /signup + /signup/verify flow. No Google Cloud project, no OAuth.
Does it work for videos without captions?
/transcript returns whatever captions are available for the video (creator-provided or YouTube auto-captions), in the language you request via language. By default, if a video has no captions at all, disabled captions, or no captions in the requested language, the endpoint returns a 404. Add mode=auto (captions if any, otherwise AI) or mode=generate (always AI) to get an AI speech-to-text transcript instead, at 3 credits per minute of video. See AI transcripts.
How much does it cost?
Free: 100 credits, no card required. Monthly: $5 for 1,000 credits/month, top-ups at $2.50/1,000. Annual: $4.50/mo (billed $54/year) for 1,000 credits/month, top-ups at $1.50/1,000 (40% cheaper). Developer plans: Starter $19 for 7,500 credits/month, Pro $49 for 25,000, Scale $99 for 60,000, all with top-ups at $1.50/1,000. 1 credit = 1 successful request; failed and rate-limited requests aren't charged. AI transcripts for videos without captions cost 3 credits per minute of video (minimum 3). Only /credits, a batch's status, AI job polling and the signup calls are free.
What are the rate limits? 60 requests/minute on the free tier, 200/min on Monthly, 300/min on Annual - see Rate limits.
- Docs
- OpenAPI spec (live) - the copy in this repo (
openapi.json) is a snapshot; the live URL is canonical - Pricing
- GetYouTubeTranscript on GitHub
Other ways to use the GetYouTubeTranscript API:
- youtube-transcript-api-python: YouTube Transcript API SDK for Python
- youtube-transcript-api-node: YouTube Transcript API SDK for Node.js / TypeScript
- youtube-mcp: Remote YouTube MCP server for Claude, ChatGPT, Cursor and VS Code
- youtube-transcript-skills: YouTube transcript Agent Skill for Claude Code, Cursor, Codex and OpenClaw
- youtube-transcript-cursor-plugin: YouTube Transcript Cursor plugin bundling the MCP server, skills, commands and a research agent
- n8n-nodes-getyoutubetranscript: YouTube transcript n8n community node, also usable as an AI Agent tool
Comparing options, including other tools: awesome-youtube-transcripts lists libraries, hosted APIs, MCP servers and speech-to-text tools for YouTube transcripts.
MIT - see LICENSE. The GetYouTubeTranscript API itself is a proprietary hosted service; this repo's docs and example code are MIT.