Skip to main content

youtube-transcript-unblocked

Getting IpBlocked or RequestBlocked from youtube-transcript-api on your server? Change one import.

youtube_transcript_api._errors.RequestBlocked: Could not retrieve a transcript for the video ...
YouTube is blocking requests from your IP. ... You are doing requests from an IP belonging to a cloud provider (like AWS, Google Cloud Platform, Azure, etc.)
pip install youtube-transcript-unblocked
export APIFY_TOKEN=apify_api_...   # free account: https://console.apify.com/sign-up ($5 free credit/month)
# from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_unblocked import YouTubeTranscriptApi

ytt_api = YouTubeTranscriptApi()
transcript = ytt_api.fetch("UF8uR6Z6KLc", languages=["en"])
for snippet in transcript:
    print(snippet.start, snippet.text)

That's the whole change. You get youtube-transcript-api's own objects (FetchedTranscript, FetchedTranscriptSnippet, .to_raw_data()) and its own exceptions (TranscriptsDisabled, NoTranscriptFound, VideoUnavailable, AgeRestricted, ...), so your except clauses and its formatters keep working:

from youtube_transcript_api.formatters import SRTFormatter
print(SRTFormatter().format_transcript(transcript))

How it works

Transcripts are fetched by a hosted Apify Actor, wulfcare/youtube-transcript-scraper, which handles YouTube's IP blocks: it paces requests per IP, finds IPs YouTube accepts, and switches to residential proxies when datacenter IPs are refused. Your code only talks to the Apify API, so it runs the same from a laptop, AWS Lambda, GCP, Azure, Docker or CI.

Measured 2026-10-28: 150 separate one-video calls, mixed content: every video that has captions returned a transcript, median 6.8 s per call.

Many videos at once

fetch_many sends a whole list in one Actor run (faster and cheaper than one call per video):

results = ytt_api.fetch_many(["UF8uR6Z6KLc", "dQw4w9WgXcQ", "jNQXAC9IVRw"], languages=["en", "de"])
for video_id, t in results.items():
    if isinstance(t, Exception):
        print(video_id, "failed:", type(t).__name__)
    else:
        print(video_id, t.language_code, len(t), "lines")

Supported API

youtube-transcript-api here
YouTubeTranscriptApi().fetch(video_id, languages=["en"]) same
YouTubeTranscriptApi().list(video_id) returns the caption tracks (language, language_code, is_generated, .fetch()); costs one transcript
YouTubeTranscriptApi.get_transcript(...) / get_transcripts(...) (0.x API) same
proxy_config=..., http_client=... accepted and ignored (not needed)
translate() not supported (YouTube's own caption languages only)
— fetch_many(video_ids, languages) batch call

Video URLs work as well as ids. Options: YouTubeTranscriptApi(api_token="...", max_cost_usd=1.0) (spending cap per run).

Cost

$0.003 per transcript ($3 per 1,000), billed by Apify from your account, plus a tiny platform fee per call (about $0.0002). Videos without captions, unavailable videos and invalid ids are free. Apify's free plan includes $5 of credit each month.

More

Channels, playlists, searches, SRT and timestamped text: call the Actor directly. Other scrapers (Google Trends, App Store, Google Play, ...): github.com/wulfcare/scrapers.

Not affiliated with youtube-transcript-api or YouTube; it uses youtube-transcript-api's classes so your code doesn't change. MIT licensed.

Metadata

Release files for youtube-transcript-unblocked 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtube-transcript-unblocked 0.1.0
File Size Uploaded Provenance Actions
youtube_transcript_unblocked-0.1.0.tar.gz 7.6 kB Without provenance Details for youtube_transcript_unblocked-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for youtube-transcript-unblocked 0.1.0
File Interpreter ABI Platform Actions
youtube_transcript_unblocked-0.1.0-py3-none-any.whl Python 3 none any Details for youtube_transcript_unblocked-0.1.0-py3-none-any.whl

Total release size: 15.2 kB

Release files / youtube_transcript_unblocked-0.1.0.tar.gz

Download URL youtube_transcript_unblocked-0.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4f44241354bd8d5dfd5a2381d4253ac7f501259f3c4215ece4d624fa35d714c8
BLAKE2b-256 checksum
How to use checksums
8c9a39dcf396f9a4574d86f2fab05cd6bbf19b504d49614de594cff001de7f83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / youtube_transcript_unblocked-0.1.0-py3-none-any.whl

Download URL youtube_transcript_unblocked-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c61cae255ecfc70f828bc37ef345c34725e93891d3fe767e6c23a5f14702ae7d
BLAKE2b-256 checksum
How to use checksums
8d798a39fe8a55c08af9a5217d419a580f68cee317725ee702e14ac2a48397fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for youtube-transcript-unblocked 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page