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-apion your own machine is free and often works fine locally. You only need this if you're blocked.
Install
pip install git+https://github.com/shephouse-actors/shephouse-yt
export APIFY_TOKEN=... # Apify Console → Settings → API & Integrations
Try it in 60 seconds
- Create a free Apify account and copy your API token: Apify Console → Settings → API & Integrations.
- Run:
pip install git+https://github.com/shephouse-actors/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
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.
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.0
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 |
|---|---|---|---|---|
| shephouse_yt-0.1.0.tar.gz | 5.9 kB | With provenance | Details for shephouse_yt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shephouse_yt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for shephouse_yt-0.1.0-py3-none-any.whl |
Total release size: 11.7 kB
Release files / shephouse_yt-0.1.0.tar.gz
| Download URL | shephouse_yt-0.1.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54696ee7d7c2f59107df493dbdf8da5bc9fc0c63d98bdd4200cceb277d72b31e
|
|
BLAKE2b-256 checksum How to use checksums |
9d31aaa503d551822035f8f56d1569309028083445bc0ef8a84deb331677b09e
|
| 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 24, 2026.
Transparency logRelease files / shephouse_yt-0.1.0-py3-none-any.whl
| Download URL | shephouse_yt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0b96cae9927bb20af48bb7784e9ae881f6e014a30958b99ba396e842c1773ba
|
|
BLAKE2b-256 checksum How to use checksums |
638973eb00ecb536fd9000763d16788de65f2ee30c9bed6459017dd29178a80e
|
| 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 24, 2026.
Transparency logSecurity for shephouse-yt 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for shephouse_yt-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 Oct 24, 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.