ClearCaption: YouTube transcripts that work from the cloud
youtube-transcript-api works on your laptop, then fails on AWS, GCP, Colab, Vercel or Render with
RequestBlocked, IpBlocked, TranscriptsDisabled (when captions clearly exist) or 429 Too Many Requests.
YouTube blocks cloud IP ranges, and translated captions (transcript.translate('de')) return 429 from almost any IP.
ClearCaption is a drop-in fallback: the same output ([{"text", "start", "duration"}]), but the request runs on
Apify's rotating proxies, so it works from any server. It can also translate: it fetches the original track and translates it.
Free: ~1,000 videos/month with a free Apify account ($5 monthly credit, no credit card).
pip install clearcaption
export APIFY_TOKEN=your_token # free account: https://console.apify.com/sign-up
from clearcaption import fetch, fetch_many
fetch("dQw4w9WgXcQ") # [{'text': ..., 'start': 18.64, 'duration': 3.24}, ...]
fetch("dQw4w9WgXcQ", translate_to="de") # translated
fetch_many(["https://youtu.be/dQw4w9WgXcQ", "https://www.youtube.com/@channel"]) # videos, channels, playlists
Keep youtube-transcript-api and fall back only when blocked
from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_api._errors import RequestBlocked, IpBlocked
from clearcaption import fetch
def transcript(video_id):
try:
return YouTubeTranscriptApi().fetch(video_id).to_raw_data()
except (RequestBlocked, IpBlocked):
return fetch(video_id)
Other ways to call it
- REST / any language:
POST https://api.apify.com/v2/acts/clearcaption~youtube-transcript-translate/run-sync-get-dataset-items?token=...with{"videos": ["dQw4w9WgXcQ"]}. - AI agents (Claude, Cursor, n8n) via MCP: add
https://mcp.apify.com?tools=clearcaption/youtube-transcript-translateas an MCP server (headerAuthorization: Bearer <APIFY_TOKEN>, or sign in to Apify on first connection). - No code: Apify Store page: paste URLs, download JSON / CSV / SRT / VTT.
Price
$0.005 per video with captions. Videos without captions cost $0. Translation costs $0.005 per started 10 minutes of video, and is free when YouTube already has a track in that language. Pay per use on Apify, no subscription. The free Apify plan includes monthly credit.
Compared with
| youtube-transcript-api + residential proxy | Hosted subscription APIs | ClearCaption | |
|---|---|---|---|
| Works from cloud | yes, if you run proxy rotation | yes | yes |
| Translated captions | 429 on tlang |
varies | yes |
| Channels / playlists / search | no | some | yes |
| Billing | proxy plan | monthly plan | per video, $0 without captions |
MIT license. Issues and PRs welcome.
Command line
clearcaption dQw4w9WgXcQ # plain text
clearcaption dQw4w9WgXcQ --to de --srt # German SRT, timestamps kept
clearcaption https://www.youtube.com/@freecodecamp --json
Other ways to use it
- JavaScript / TypeScript:
npm i clearcaption(clearcaption-js) - n8n: community node
n8n-nodes-clearcaption(repo)
Metadata
Release files for clearcaption 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clearcaption-0.2.1.tar.gz | 5.2 kB | With provenance | Details for clearcaption-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clearcaption-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for clearcaption-0.2.1-py3-none-any.whl |
Total release size: 11.1 kB
Release files / clearcaption-0.2.1.tar.gz
| Download URL | clearcaption-0.2.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f961c3baa9e44748d101fd2bdeea517ba8ad65b43f6689b5b4541adc0a1d27a
|
|
BLAKE2b-256 checksum How to use checksums |
f23131a7b2b4e52e7b7b64092b1ebc898f334a7f2177261ca21a4106a00207fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / clearcaption-0.2.1-py3-none-any.whl
| Download URL | clearcaption-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efc9d87fb17719553643cee66bb1a92ba3c9126a9e28f29f467fd4f74a86e4f2
|
|
BLAKE2b-256 checksum How to use checksums |
0e019fd1f16abbcb68a821d8ea78aab72ad7b40772f7d5326a0e51632018f348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for clearcaption 0.2.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for clearcaption-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA 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.