8.2k stars · MIT · v1.2.4 (2026-01-29)
Fetches any YouTube video's subtitles with no API key and no quota — competitor research as plain text, tonight.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A small Python library that fetches the subtitle track of any YouTube video, including the automatically generated ones, and can ask YouTube to translate it on the way. It needs no API key and no headless browser, and it has both a Python interface and a command-line tool.
Why it matters
Edition 3 gave you python-youtube for titles and view counts, which tells you that a competitor's video did well. This tells you what was in it — and it is the cheaper of the two by a distance, because it burns none of the 10,000-unit daily API quota. Pull the transcripts of the fifty most-viewed videos about summarising long documents, chat analysis and forex backtesting, hand the pile to Claude, and ask what nobody has explained properly yet. That is a content calendar built in an evening from evidence rather than instinct, and the same transcripts double as keyword seeds for OpenSEO and advertools. It also works on your own back catalogue when you want the text of a video you never wrote a script for.
- Free, no key, no quota, no OAuth consent screen — genuinely a twenty-minute win
- Handles auto-generated captions and can return translated tracks, so Russian-language competitors are in scope too
- MIT and tiny, so it drops into your FastAPI virtual environment without a dependency fight
- It uses an unofficial endpoint. YouTube can change it, and the library then needs an update before it works again
- YouTube blocks datacentre IP ranges aggressively — run it from your Mac, because from the Hetzner box you will need a proxy (the library supports them, but that is a paid service)
- Transcripts only. Views, retention and click-through still come from the API or from Studio
source venv/bin/activate pip install youtube-transcript-api youtube_transcript_api VIDEO_ID --languages en ru --format json