Most people who need YouTube captions in code follow the same path. They find captions.download in the YouTube Data API, set up a Google Cloud project, and build on it. Then they try a video from someone else's channel, and it returns a 403 that no setting will fix.
Use TranscriptAPI. One request returns the captions of any public YouTube video, with timestamps, whoever owns it. You need no OAuth, no proxies and no scraper to maintain.
curl "https://api.transcriptapi.io/transcript?video_id=dQw4w9WgXcQ" \ -H "Authorization: Bearer $API_KEY"
Get a free key (20 credits, no card) and that call works right away. If you don't code and just want the text, paste the link into the free transcript tool, or connect it to ChatGPT or Claude.
Why captions.download returns 403
captions.download is authorised against the channel that owns the caption track. It needs an OAuth token from the account that uploaded the video. An API key won't do, and neither will a service account. For anyone else's video, the response is always the same:
403 forbidden The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.
What makes it a trap is that captions.list works for any video. You see the caption IDs and languages and assume the download will work too. It won't, and there is no flag, allowlist or quota tier that changes that.
captions.list tells you a transcript exists. captions.download tells you it is none of your business.
And the quota would stop you anyway
A default Google Cloud project gets 10,000 units a day. captions.download costs 200 of them, which is 50 caption downloads a day, and only for your own videos. search.list costs 100, so discovering videos eats the same budget. One mid-sized channel would take a month to backfill.
The Data API is still fine for metadata such as titles, view counts and upload lists. It is the caption text it can't provide. If you are replacing an existing integration, the migration guide maps each endpoint.
Why the free scrapers break in production
The usual next step is an open-source scraper such as youtube-transcript-api or yt-dlp. They read the same data the browser does, so they work for any public video, on your laptop. Deployed, they run into a string of problems:
- Cloud IPs are blocked. From AWS, GCP, Azure, Hetzner and similar, requests fail with
IpBlockedorRequestBlocked, often on the very first call. Waiting or changing headers doesn't help, because the block is on the address. - Datacenter proxies fail without showing it. They load the watch page fine, captions included, so a curl health check passes. The transcript request behind it is still blocked.
- Only rotating residential proxies work, and only when they are pinned to a non-EU region. EU exit nodes get the cookie-consent wall instead of the page.
- The bandwidth is metered. Residential traffic is billed per gigabyte, and every fetch, including the failed ones, downloads the whole watch page.
- YouTube changes its pages without notice. When it moved channel listings to a new format, scrapers didn't throw errors. They just returned empty lists.
None of this is impossible, but it is a second product to run. We run it so you don't have to: a tuned residential pool, retries through fresh exit IPs, and deploy checks that perform real transcript fetches before taking traffic.
Self-hosting vs TranscriptAPI
| Scraper + proxies | TranscriptAPI | |
|---|---|---|
| Setup | Proxy account, region pinning, retries, health checks | One API key |
| Cost per transcript | ~377 KB of residential traffic, plus failed attempts | 1 credit, under $0.002 on the $49 plan |
| Failed requests | You pay for the bytes anyway | Refunded |
| Same video again | Full cost again | Free from cache |
| YouTube changes its pages | Silent empty results | Fixed on our side |
| Search, channels, playlists | Data API quota or more scraping | Same key, 1 credit per call |
Get captions for any video with TranscriptAPI
In Python, it is a single request:
import os, requests
r = requests.get(
"https://api.transcriptapi.io/transcript",
params={"video_id": "dQw4w9WgXcQ", "language": "en"},
headers={"Authorization": f"Bearer {os.environ['TRANSCRIPTAPI_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())- Creator-uploaded and auto-generated captions, in any language the video has.
- Add
translate_to=de(or any language) for an AI translation. - The same key covers YouTube search, channel uploads and playlists. See the API docs.
- Recipes for batching and channel backfills are in the cookbook. To give the transcripts to an AI assistant, use the MCP server.
Start with 20 free credits, no card. Pricing starts at $49 a month for 25,000 transcripts, or one-time top-ups from $10.
Frequently asked questions
Can I download captions for a YouTube video I don't own?
Not through the official YouTube Data API: captions.download only works with an OAuth token from the channel that owns the video. TranscriptAPI returns the captions of any public video that has them, with one API key and no OAuth.
Why does captions.download return 403 forbidden?
Because the request is not authorised as the video's owner. captions.list works for any video, but downloading the track needs OAuth as the uploading channel. No quota increase, scope or billing setting changes that.
Why does youtube-transcript-api work locally but not on my server?
YouTube blocks datacenter IP ranges (AWS, GCP, Azure, Hetzner and others) for transcript requests, so the library raises IpBlocked or RequestBlocked in the cloud. Getting past it reliably requires rotating residential proxies and ongoing maintenance. TranscriptAPI handles that part for you.
Does it work with auto-generated captions?
Yes. Creator-uploaded and auto-generated captions both work, in any language the video has, and you can request an AI translation into another language.
What does it cost?
20 free credits to start, no card. One credit per transcript; the $49 plan includes 25,000 credits a month, under $0.002 per transcript. Failed requests are refunded and repeat requests for the same video are served from cache for free.