cURL & REST

YouTube Transcript API with cURL & REST

A pure REST YouTube Transcript API for cURL, Postman, HTTPie, and any HTTP client that speaks Bearer auth. 7 endpoints, predictable JSON, 300 req/min rate limit, 49ms median cached responses, and 100 free credits — no SDK required.

100 free credits — no credit card required
Definition

What is a REST YouTube Transcript API?

A REST YouTube Transcript API is a versioned set of HTTPS endpoints — one per operation — that takes query parameters in and returns JSON out. There is no handshake, no graph, no streaming protocol to learn. Authenticate with a Bearer token, send a GET, and read the response. Because everything is plain HTTP, the same call works in cURL, Postman, HTTPie, xargs pipelines, GitHub Actions, AWS Lambda, and any HTTP client your stack already speaks.

Quickstart

cURL Quickstart

Export your key once, then call the YouTube Transcript API the same way you call any other REST service. The example below pulls the transcript for a single video.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/transcript?video_url=dQw4w9WgXcQ" \
  -H "Authorization: Bearer $YT_API_KEY"

A typical 200 response looks like:

json
{
  "video_id": "dQw4w9WgXcQ",
  "language": "en",
  "transcript": [
    { "text": "Never gonna give you up",  "start": 0.0,  "duration": 4.12 },
    { "text": "Never gonna let you down", "start": 4.12, "duration": 3.85 }
  ]
}
Reference

All seven endpoints — one cURL each

Every endpoint shares the same Bearer-auth header and the same JSON shape conventions. Copy any block below and replace $YT_API_KEY with your key.

Get Transcripts 1 credit

Extract YouTube transcripts with or without timestamps.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/transcript?video_url=dQw4w9WgXcQ" \
  -H "Authorization: Bearer $YT_API_KEY"

Search YouTube 1 credit

Search YouTube for videos or channels with rich metadata.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/search?q=fastapi%20tutorial" \
  -H "Authorization: Bearer $YT_API_KEY"

Search Inside a Channel 1 credit

Search videos within a specific channel.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/channel/search?channel_id=UC8butISFwT-Wl7EV0hUK0BQ&q=react" \
  -H "Authorization: Bearer $YT_API_KEY"

Browse Channel Videos 1 credit / page

Paginated list of all uploads from a channel (~100 / page).

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/channel/videos?channel_id=UC8butISFwT-Wl7EV0hUK0BQ&page=1" \
  -H "Authorization: Bearer $YT_API_KEY"

Track New Uploads Free

RSS-based monitoring for the latest 15 uploads of a channel.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/channel/latest?channel_id=UC8butISFwT-Wl7EV0hUK0BQ" \
  -H "Authorization: Bearer $YT_API_KEY"

Extract Playlist Videos 1 credit / page

Retrieve all videos in any public YouTube playlist.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/playlist/videos?playlist_id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf" \
  -H "Authorization: Bearer $YT_API_KEY"

Resolve Channel Handle Free

Convert any @handle, URL, or UC… ID to a canonical channel ID.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/channel/resolve?handle=%40freeCodeCamp" \
  -H "Authorization: Bearer $YT_API_KEY"
Postman & Insomnia

Postman collection

We do not ship a hosted Postman collection — but you do not need one. Create a Postman environment with two variables, point each request at {{baseUrl}}, and add Authorization: Bearer {{apiKey}} in the headers. The same env file imports cleanly into Insomnia and Bruno.

json
{
  "name": "YouTubeTranscriptAPI",
  "values": [
    { "key": "baseUrl", "value": "https://youtubetranscriptapi.com/api/v2", "enabled": true },
    { "key": "apiKey",  "value": "PASTE_YOUR_KEY_HERE",        "enabled": true }
  ]
}
Shell tips

Shell scripting tips

Store the key in env

Add export YT_API_KEY=... to your shell rc file or a .envrc. Never inline the key in a committed script.

Parse JSON with jq

Pipe the response into jq -r '.transcript[].text' for plaintext output, or jq .metadata.title for a single field.

Batch with xargs

Cat a file of video IDs and pipe through xargs -P 6 -I {} curl ... to fan out six concurrent requests under the 300 req/min cap.

Response headers

Headers you'll see on every response

Inspect them with curl -I or curl -D -.

HeaderMeaning
X-Cache-StatusHIT for edge-cached responses, MISS for fresh fetches.
X-RateLimit-LimitYour current cap. Today it is 300 requests per minute per key.
X-RateLimit-RemainingRequests left in the current minute window. Read it before you fan out.
X-RateLimit-ResetUnix timestamp when the window resets. Useful for delaying retries.
Retry-AfterReturned only on 429. Sleep this many seconds, then retry.

Frequently asked questions

Do I need an SDK to use this YouTube Transcript API?

No. Every endpoint speaks plain HTTPS and JSON, so cURL, HTTPie, Postman, Insomnia, and your language's standard HTTP client all work without a wrapper. Pass a Bearer token in the Authorization header, send a GET, and parse the response. The contract stays stable across API versions, so your scripts will not rot.

How do I authenticate with cURL?

Store your key in an environment variable like YT_API_KEY, then pass it with -H "Authorization: Bearer $YT_API_KEY". This keeps the key out of shell history files and lets you commit your scripts to git without leaking secrets. Rotate the key from your dashboard at any time — old keys revoke instantly.

What's the rate limit and how do I handle 429s in shell?

300 requests per minute per API key. On a 429 response, the Retry-After header tells you how many seconds to wait. A simple shell loop reads the header with curl -I, sleeps for that many seconds, then retries. Stay polite to X-RateLimit-Remaining and you should rarely see a 429 at all.

Are failed requests charged?

Errors and 429s are never charged — only HTTP 200s debit a credit. That includes 4xx validation errors, 404 missing transcripts, 408/503 upstream blips, and any 429 throttling. Your 100 free credits last as long as your successful calls do, which makes cURL-based experimentation effectively free while you tune your scripts.

Can I cache responses on my side?

Yes, and you should. Transcripts for a given video do not change, so a one-line write to disk, Redis, or your CDN saves you a credit on every repeat fetch. We also edge-cache at our end — repeat hits return in 49ms median — but a local cache eliminates even that round-trip from your batch jobs.

Where do I find the full API reference?

Every endpoint, every parameter, every response shape lives at /docs/api. The transcript endpoint reference at /docs/api/transcript shows the full request and response payload, including the optional metadata block. The /docs/quickstart page walks you through your first call in under a minute.

cURL it. Ship it.

One Bearer header. Predictable JSON. 100 free credits to test the YouTube Transcript API end-to-end before you pay a cent.

YouTube Transcript API with cURL & REST — YouTubeTranscriptAPI