youtube-transcript-api RequestBlocked or IpBlocked on a server? Get YouTube transcripts without proxies
youtube-transcript-api works on a laptop but usually fails on AWS, Google Cloud, Azure and similar hosts with RequestBlocked or IpBlocked ("Could not retrieve a transcript for the video… YouTube is blocking requests from your IP"), because YouTube blocks most IP addresses that belong to cloud providers. The library's own README recommends rotating residential proxies. YouTube Transcript Scraper on Apify handles that for you: send video, Short, channel or playlist URLs and get the transcript text, timestamps and caption language back for $1.50 per 1,000 transcripts. Videos without captions aren't charged.
Open YouTube Transcript Scraper on Apify $1.50 per 1,000 transcripts ($1.20 on Gold and above)
Step by step
- Create a free Apify account. Sign up at apify.com. The free plan includes $5 of monthly credit, about 3,300 transcripts with this Actor, and needs no credit card.
- Install the Apify client. Run pip install apify-client and copy your API token from Apify Console → Settings → API & Integrations.
- Swap the call. Instead of YouTubeTranscriptApi().fetch(video_id), start the Actor with videos (IDs or URLs) and language. Each video comes back as one row with the full transcript text, word count and caption language.
- Add timestamps if you need them. Set includeTimestamps to true to get segments with start time, duration and text for every caption line, like the snippets the library returns.
- Channels, playlists and languages. Pass a channel or playlist URL to get the transcripts of its latest videos (up to 15 each). Manual captions in your language come first, then auto-generated ones; translateTo asks YouTube for a machine translation, which YouTube rate-limits, so treat it as best effort.
- Run it from your server or an AI agent. Call the Actor from your backend with the token, or give an AI assistant the MCP server URL below.
Do it from code
Python
# pip install apify-client
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automationnation/youtube-transcript-scraper").call(run_input={
"videos": [
"https://www.youtube.com/watch?v=UF8uR6Z6KLc"
],
"language": "en"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item.get("title"), item.get("channel"), item.get("wordCount"), item.get("transcriptLanguage"))
REST API (cURL)
curl -X POST "https://api.apify.com/v2/acts/automationnation~youtube-transcript-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"videos": ["https://www.youtube.com/watch?v=UF8uR6Z6KLc"], "language": "en"}'
From an AI assistant (MCP)
Add this MCP server URL to Claude, ChatGPT or Cursor and ask in plain English:
https://mcp.apify.com?tools=automationnation/youtube-transcript-scraper
Alternatives
Other options: keep youtube-transcript-api and buy rotating residential proxies (its README explains how); use the official YouTube Data API, whose captions.download only works for videos you own or manage; or use another transcript Actor on Apify. See the side-by-side comparison of YouTube transcript scrapers. See the side-by-side comparison.
FAQ
Why does youtube-transcript-api work locally but not on my server?
YouTube blocks most IP addresses that belong to cloud providers such as AWS, Google Cloud and Azure, and IPs that send too many requests. The library raises RequestBlocked or IpBlocked when that happens; its README says so in the section on working around IP bans.
Do I need proxies with the Actor?
No. It runs on Apify's infrastructure and switches to residential IPs when YouTube asks for a sign-in. You pay per transcript, not for proxy traffic.
What if a video has no captions?
It comes back with an error status and no transcript, and it isn't charged.
What does it cost?
$1.50 per 1,000 transcripts ($1.20 on Apify's Gold plan and above). Apify's free $5 monthly credit covers about 3,300 transcripts.
Can an AI assistant use it?
Yes. Add the MCP server URL below to Claude, ChatGPT or Cursor and ask, for example, "summarise the transcript of this video".
Written by AutomationNation, the developer of YouTube Transcript Scraper. Prices checked October 2026.