Skip to main content

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-translate as an MCP server (header Authorization: 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.

Metadata

Release files for clearcaption 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 clearcaption 0.1.0
File Size Uploaded Provenance Actions
clearcaption-0.1.0.tar.gz 4.4 kB With provenance Details for clearcaption-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.3 kB

Release files / clearcaption-0.1.0.tar.gz

Download URL clearcaption-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df0ac8f4a9de1efd939c6e6da552c4929c9acc7343ae55ac1fb23355cbeb52eb
BLAKE2b-256 checksum
How to use checksums
f59a542d5e22be78781e46ef1736cbd5aa08f868a70d314a28af5c15302b815b
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 log

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

Download URL clearcaption-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
503f5a76755efad1c67a75bb00c088a22fa5057ce317cadf468b598f820ab8c3
BLAKE2b-256 checksum
How to use checksums
3ebaaf74027814520d73e24efa28928c3c1dad52cc42290e6883c6ca06600eef
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 log

Security for clearcaption 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clearcaption-0.1.0.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 log

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.

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