Skip to main content

shephouse-yt: YouTube transcripts from cloud servers (youtube-transcript-api-style client)

Disclosure: ShepHouse is an AI-operated software studio. An AI agent wrote and maintains this repo, under a human owner. This client calls our own paid Apify Actor, shephouse/youtube-transcript-scraper-bulk.

The youtube-transcript-api library is often blocked (RequestBlocked / IpBlocked) when you run it on AWS, GCP, Azure or other hosts. This small client keeps a familiar interface and fetches transcripts through the Apify Actor above, which uses residential proxies.

Cost (please read)

  • $0.005 per delivered transcript (pay-per-event on Apify). Failed videos (no captions, unavailable, invalid ID) are not charged. There is no start fee.
  • Runs bill to your own Apify account. Apify's free monthly platform credit can cover small volumes. Plan limits apply; see the Actor page.
  • Prices can change. The Actor's Pricing tab is the source of truth.
  • Running youtube-transcript-api on your own machine is free and often works fine locally. You only need this if you're blocked.

Install

pip install shephouse-yt
export APIFY_TOKEN=...   # Apify Console → Settings → API & Integrations

Try it in 60 seconds

  1. Create a free Apify account and copy your API token: Apify Console → Settings → API & Integrations.
  2. Run:
pip install shephouse-yt
export APIFY_TOKEN=apify_api_...
python -m shephouse_yt https://www.youtube.com/watch?v=PXbVn-f_wuM        # add --json or --lang de,en

Blocked on a server? See why it fails on servers for free options first, or our tested guides: RequestBlocked / IpBlocked, "Sign in to confirm you're not a bot", and AWS / GCP / GitHub Actions.

For RAG chunking with timestamps, see examples/rag_chunks.py.

Use

from shephouse_yt import YouTubeTranscriptApi, TranscriptsDisabled

api = YouTubeTranscriptApi()                       # proxy_config / cookies kwargs are accepted and ignored
t = api.fetch("PXbVn-f_wuM", languages=["de", "en"])
print(t.language_code, t.is_generated, t[0].text, t[0].start, t[0].duration)
raw = t.to_raw_data()                              # [{"text", "start", "duration"}, ...]

many = api.fetch_many(["PXbVn-f_wuM", "AAAAAAAAAAA"])  # one Actor run for the batch
for vid, r in many.items():
    print(vid, "error" if isinstance(r, Exception) else len(r))

Exceptions: TranscriptsDisabled, NoTranscriptFound, VideoUnavailable (all subclass CouldNotRetrieveTranscript).

What is not supported

  • list() / translate().
  • Formatters. For SRT/VTT/chapters/token counts, call the Actor directly.
  • Each call is an Apify run, so expect several seconds to tens of seconds of latency. Batch with fetch_many.

Using Claude Desktop, Cursor or another MCP client?

shephouse-yt-mcp wraps the same Actor as an MCP server (get_transcript, get_transcripts), so agents can fetch transcripts from cloud hosts too.

Need a full RAG pipeline?

For search or Q&A over many videos, the YouTube Transcript → RAG Starter Kit (paid ShepHouse product, two tiers) builds on this client. Starter ($29) adds a resumable cache, timestamped chunks, keyless BM25 search, optional embeddings and cited answers. Pro ($59) adds an RSS channel monitor for new uploads, Qdrant/pgvector loaders and a retrieval eval (recall@k/MRR). Both are delivered as Polar downloads. ShepHouse is AI-operated. This client stays free and MIT.

Tests

pip install pytest requests && pytest -q (offline; the HTTP call is mocked).

Not affiliated with YouTube/Google or with the youtube-transcript-api project. MIT licensed.

Metadata

Release files for shephouse-yt 0.1.1

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

Source distribution (sdist)

Source distribution for shephouse-yt 0.1.1
File Size Uploaded Provenance Actions
shephouse_yt-0.1.1.tar.gz 6.5 kB With provenance Details for shephouse_yt-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shephouse-yt 0.1.1
File Interpreter ABI Platform Actions
shephouse_yt-0.1.1-py3-none-any.whl Python 3 none any Details for shephouse_yt-0.1.1-py3-none-any.whl

Total release size: 12.9 kB

Release files / shephouse_yt-0.1.1.tar.gz

Download URL shephouse_yt-0.1.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
579c6c62b8871aa10dda9b127dda6ad9b91921721d8279ae16c078d9476afafa
BLAKE2b-256 checksum
How to use checksums
a0b230ae4476136b111390637be6926a24b8047ddd5ae8c532005aede0aa5856
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 Oct 29, 2026.

Transparency log

Release files / shephouse_yt-0.1.1-py3-none-any.whl

Download URL shephouse_yt-0.1.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba878af327d5b96acb03c69274577abdcd7845a267458962e320e004c28ca2be
BLAKE2b-256 checksum
How to use checksums
e4774db1956509b1f8841c9a9bfb653db8da85c8661d84ee662487a540d91130
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 Oct 29, 2026.

Transparency log

Security for shephouse-yt 0.1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for shephouse_yt-0.1.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 Oct 29, 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