youtube-transcript-api RequestBlocked or IpBlocked: why it happens and how to fix it

Checked on 2026-11-18.

Your script fetched transcripts fine on your laptop. On a server it raises RequestBlocked or IpBlocked. Your code did not break: YouTube is refusing the address the request comes from.

What the error means

The library's own README puts it plainly: "YouTube has started blocking most IPs that are known to belong to cloud providers". AWS, Google Cloud, Azure, most VPS hosts and serverless platforms all send requests from such addresses, so the same call that works at home is refused there. The two exceptions the README names for this are RequestBlocked and IpBlocked.

To confirm that this is your case, run the same script on your own computer with the same video ID. If it works there and fails on the server, it is the address, not your code.

Fix 1: run it from an address that is not blocked

For a one-off job, such as a few hundred videos for a research project, run the script on your own machine and upload the result. It costs nothing and needs no changes. It stops being practical when the job has to run on a schedule or behind a web app.

Fix 2: send the requests through rotating residential proxies

This is the fix the README describes. The library has two proxy settings built in:

Python
from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_api.proxies import GenericProxyConfig, WebshareProxyConfig

# A Webshare "residential" plan, which the library supports directly
api = YouTubeTranscriptApi(
    proxy_config=WebshareProxyConfig(
        proxy_username="<proxy-username>",
        proxy_password="<proxy-password>",
    )
)

# Or any other proxy provider
api = YouTubeTranscriptApi(
    proxy_config=GenericProxyConfig(
        http_url="http://user:pass@my-custom-proxy.org:port",
        https_url="https://user:pass@my-custom-proxy.org:port",
    )
)

transcript = api.fetch("jNQXAC9IVRw")

It works, with two costs. You pay for a proxy plan, usually by traffic, and you own the upkeep: a single static proxy address gets blocked like any other, so the addresses have to rotate. Signing in is not a way around the block at the moment either: the README says cookie authentication is currently not available.

Fix 3: move the request to an HTTP API

With Pipefetch the transcript is one HTTPS request to our servers, so it does not matter where your code runs, and there are no proxies to buy or rotate.

Python
import os
import requests

res = requests.get(
    "https://pipefetch.com/v1/youtube/transcript",
    params={"video": "https://www.youtube.com/watch?v=jNQXAC9IVRw"},
    headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
    timeout=90,
)
if res.status_code == 404:
    print("No captions for this video")  # not charged
else:
    res.raise_for_status()
    data = res.json()["data"]
    print(data["text"])                      # the whole transcript
    for segment in data["segments"]:         # timed pieces
        print(segment["start"], segment["text"])

A request costs 1 credit, a video without captions costs nothing, and a new account has 100 free credits. The answer also carries the video's title, channel, language and chapters. The reference lists every parameter.

Which fix fits

SituationFix
A one-off batch you can run yourselfRun it on your own computer
It must run on a server and you already pay for residential proxiesThe library's proxy settings
It must run on a server and you would rather not run proxiesAn HTTP API such as Pipefetch

The same block hits other tools

This is not specific to one library. yt-dlp and the JavaScript transcript packages read the same pages, and from a data-centre address they are refused in the same way. Switching library does not help; changing where the request comes from does.

Try it with 100 free credits. No card, no Google Cloud project, no OAuth. Get an API key or read the docs.