Skip to main content

transcriptout

youtube-transcript-api works on your laptop and breaks in production with RequestBlocked or IpBlocked, because YouTube blocks cloud IP ranges. transcriptout keeps the same interface and fetches through TranscriptOut, so there are no proxies to run and nothing to block on your side.

Migration is one line.

# from youtube_transcript_api import YouTubeTranscriptApi
from transcriptout import YouTubeTranscriptApi

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

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

Install

pip install transcriptout

API key

Sign in at transcriptout.com and create a key on the Keys page. It starts with sk_. New accounts start with free credits, no card.

The package reads the key from the TRANSCRIPTOUT_API_KEY environment variable, so your code stays the same as with youtube-transcript-api. Set it in the terminal you run your code from.

# macOS and Linux
export TRANSCRIPTOUT_API_KEY=sk_your_key

# Windows PowerShell
$env:TRANSCRIPTOUT_API_KEY="sk_your_key"

That lasts until the terminal is closed. For a project, put the line TRANSCRIPTOUT_API_KEY=sk_your_key in a .env file and load it with python-dotenv (from dotenv import load_dotenv; load_dotenv()) before creating the client. On a server, add the variable in your host's settings (Render, Fly, Docker and so on).

Or pass the key in code.

ytt_api = YouTubeTranscriptApi(api_key="sk_your_key")

Keep the key out of git. An error saying No API key means the variable is not set in the process that runs your code.

What stays the same

  • fetch(video_id, languages=...), list(video_id), find_transcript, find_manually_created_transcript, find_generated_transcript
  • FetchedTranscript and FetchedTranscriptSnippet with .text, .start, .duration, .to_raw_data()
  • Exception names, so except NoTranscriptFound: keeps working
  • Formatters in transcriptout.formatters (TextFormatter, JSONFormatter, SRTFormatter, WebVTTFormatter)
  • The static get_transcript, get_transcripts and list_transcripts, removed from youtube-transcript-api in 1.2.0, work again

What is new

Many videos in one call, up to 4,000 per job, with retries handled on our side.

result = ytt_api.fetch_many(video_ids, language="en")
for video_id, transcript in result.transcripts.items():
    ...
for video_id, error in result.errors.items():
    ...

What differs

  • Auto-generated tracks come grouped into readable segments of up to 180 characters rather than YouTube's short caption lines. Pass segment= to the constructor to change the size.
  • Translation (transcript.translate(...)) is not supported yet and raises NotTranslatable.
  • proxy_config and cookies are accepted and ignored, there is nothing to proxy.
  • Video URLs are accepted as well as ids.

Pricing

One credit per transcript. fetch with a language the video lacks costs one more call to list its tracks. Requests refused for reasons on our side are refunded. See pricing.

License

MIT

Metadata

Release files for transcriptout 0.1.2

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

Source distribution (sdist)

Source distribution for transcriptout 0.1.2
File Size Uploaded Provenance Actions
transcriptout-0.1.2.tar.gz 13.6 kB Without provenance Details for transcriptout-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 28.2 kB

Release files / transcriptout-0.1.2.tar.gz

Download URL transcriptout-0.1.2.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a43c85f1c821efce0b1f18113036799b0381800ff59491b3b622b02b830a81dc
BLAKE2b-256 checksum
How to use checksums
d6746810baeb3bc8a53009cd3062b06f233a840687c97994647277f91a4fed20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

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

Download URL transcriptout-0.1.2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16498aff2fbedabf36b254e51db9204487fc7c82fceedcf3fd59eb0681cc2f79
BLAKE2b-256 checksum
How to use checksums
60f909fd3c97d62fac55e4560320f5b674332b558a5f731d5d887a8025189816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

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

No provenance found

None of the files in this release were uploaded with provenance metadata.

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