Skip to main content

youtube-transcript-cloud

YouTube transcripts from Python, the command line or an AI agent that keep working on AWS, GCP, Azure, Vercel and other cloud servers, where YouTube blocks most direct requests (RequestBlocked, IpBlocked). The interface is compatible with youtube-transcript-api's, so moving over is an import line. The transcripts are read by the YouTube Transcript Scraper on Apify, with your Apify API token. No proxy to buy or manage.

Install

pip install youtube-transcript-cloud
# or from GitHub
pip install git+https://github.com/Spyridon-Pikoulas/youtube-transcript-cloud

No dependencies beyond the standard library, Python 3.9 and newer. Get a token at apify.com (free sign-up), under Settings → API & Integrations, and set it as APIFY_TOKEN.

Python

from youtube_transcript_cloud import YouTubeTranscriptApi

ytt_api = YouTubeTranscriptApi()  # or YouTubeTranscriptApi(apify_token="...")
transcript = ytt_api.fetch("dQw4w9WgXcQ", languages=["de", "en"])

for snippet in transcript:
    print(snippet.start, snippet.text)

transcript.language_code, transcript.is_generated
transcript.to_raw_data()  # [{"text": "...", "start": 0.0, "duration": 1.54}, ...]

Moving from youtube-transcript-api:

# from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_cloud import YouTubeTranscriptApi

Many videos in one call, read in a single run:

results = ytt_api.fetch_all(["dQw4w9WgXcQ", "https://youtu.be/jNQXAC9IVRw"])
# {video_id: FetchedTranscript, or the error it raised}

The caption tracks a video has:

for t in ytt_api.list("dQw4w9WgXcQ"):
    print(t.language_code, t.language, t.is_generated)

find_transcript, find_manually_created_transcript and find_generated_transcript work as you know them. Formatters too: JSONFormatter, PrettyPrintFormatter, TextFormatter, SRTFormatter and WebVTTFormatter from youtube_transcript_cloud.formatters. The errors have the same names: NoTranscriptFound, TranscriptsDisabled, VideoUnavailable, RequestBlocked, all subclasses of CouldNotRetrieveTranscript. ApifyError means Apify refused the call (a wrong token, no credit).

ytt_api.run(videos) gives the Actor's own items: title, channel, publish date, views, duration, language and text with each video.

Command line

youtube-transcript-cloud dQw4w9WgXcQ https://youtu.be/jNQXAC9IVRw --languages de en --format json > transcripts.json
youtube-transcript-cloud --list-transcripts dQw4w9WgXcQ

Formats: pretty (default), json, text, srt, webvtt.

AI agents (MCP)

youtube-transcript-cloud mcp is an MCP server on stdio with one tool, get_youtube_transcript (a video URL or ID, preferred languages, optional timestamps). For Claude Desktop, Cursor and other MCP clients:

{
  "mcpServers": {
    "youtube-transcripts": {
      "command": "uvx",
      "args": ["youtube-transcript-cloud", "mcp"],
      "env": {"APIFY_TOKEN": "YOUR_APIFY_TOKEN"}
    }
  }
}

What it costs

The Actor charges $0.001 per transcript ($1 per 1,000) to your Apify account. Videos without captions and failed reads are free. When YouTube blocks a run, it switches to Apify's residential proxy and its traffic is charged too, about $0.0002 a transcript. Apify's free plan includes monthly credit that covers a few thousand transcripts.

Differences from youtube-transcript-api

  • Video URLs (watch, youtu.be, Shorts, embed, live) work wherever a video ID does.
  • A language matches its regional variants: en finds en-GB.
  • translate() raises NotTranslatable: translated captions aren't offered.
  • list() reads one transcript to see the tracks, so it costs one; fetch() on that track then costs nothing more.
  • There are no proxy or cookie options: the requests go out from Apify.
  • preserve_formatting is accepted and has no effect.

This project is not affiliated with youtube-transcript-api or YouTube.

License

MIT

Metadata

Release files for youtube-transcript-cloud 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-cloud 0.1.0
File Size Uploaded Provenance Actions
youtube_transcript_cloud-0.1.0.tar.gz 13.1 kB With provenance Details for youtube_transcript_cloud-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 25.4 kB

Release files / youtube_transcript_cloud-0.1.0.tar.gz

Download URL youtube_transcript_cloud-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4d158155151e9e5bc8c17abc20b97ba1c2d5da64e744aeba954a096d23ff39ef
BLAKE2b-256 checksum
How to use checksums
5b404734072072017c2435696acb4d58b8d6ec1c9d830aa87b66fc54c9211ff4
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 24, 2026.

Transparency log

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

Download URL youtube_transcript_cloud-0.1.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49866c5e950656be5e4af7a6f2a8905522fc19ea807f6e41a4cb15ba29f7533a
BLAKE2b-256 checksum
How to use checksums
2d44511e08f23c53e37ea6e77db814dd8984e03cda8989dc1ec1d08c83176422
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 24, 2026.

Transparency log

Security for youtube-transcript-cloud 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 youtube_transcript_cloud-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 24, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full 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