YouTube Transcript API
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.
Why
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
Endpoints
All endpoints live under https://getyoutubetranscript.com/api/v1.
| Method |
Path |
Credits |
Description |
GET |
/transcript |
1 |
Full transcript for one video, plus title/author/thumbnail and caption provenance. Optional per-line timestamps with timestamps=true |
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 |
/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.
Authentication
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.
Quick start
curl "https://getyoutubetranscript.com/api/v1/transcript?v=jNQXAC9IVRw&language=en" \
-H "Authorization: Bearer sk_live_..."
From the terminal
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.
Response example
{
"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), 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.
Parameters
GET /transcript
| 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. |
GET /transcript/languages
| 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.
POST /batch
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"]}'
GET /batch
| 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).
GET /search
| 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 |
GET /resolve
| Param |
Required |
Description |
handle |
yes |
Channel @handle, channel URL, or UC... id |
GET /channel/latest
| Param |
Required |
Description |
channel |
yes |
Channel @handle, URL, or UC... id |
GET /channel/search
| 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 |
GET /channel/videos
| 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 |
GET /channel/playlists
| 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.
GET /channel/posts