Skip to main content
Loss of provenance

A previous release had provenance metadata, but this release does not. View details.

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.2

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

Loss of provenance

These files do not have provenance metadata, despite files in a prior release including this data.

We recommend further investigation before installing these files. View details.

Source distribution (sdist)

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

Built distribution (wheel)

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

Total release size: 12.8 kB

Release files / shephouse_yt-0.1.2.tar.gz

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL shephouse_yt-0.1.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
70d64dbf52d9f6934a8d2c3ff1ca696dc54762a398ea91ac77a9957fed7e7e5a
BLAKE2b-256 checksum
How to use checksums
9228dc623ca563f049b9bc5774f6658def8fca3471be35f7f8a805d9175d7109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL shephouse_yt-0.1.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
840bfa41a50bf11e9fc013189627d0fd12a23e1a03da19554aea84ec5a5ef000
BLAKE2b-256 checksum
How to use checksums
5b5eec5757ddf2962f4cc8dc74f8bc442a4e3e57712ed56a492be06a1213a637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for shephouse-yt 0.1.2

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.

Loss of provenance

A previous release of these files had provenance metadata, but this release does not.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Release comparison

  • Removed 0.1.1 2 files With provenance
  • Added 0.1.2 2 files Without provenance

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