ytscrape is a pure-Python library published on PyPI under the MIT license. It has a minimal footprint — three small runtime dependencies — and works on every major operating system. This page covers everything you need to get it running in your environment.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vsmutok/ytscrape/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Python 3.10 or newer. ytscrape uses modern type annotations and structural pattern features that require Python 3.10+. It is tested against CPython 3.10, 3.11, 3.12, 3.13, and 3.14.
- Runtime dependencies — installed automatically by pip or uv:
| Package | Purpose |
|---|---|
requests >=2.28 | All HTTP communication with YouTube’s InnerTube endpoints. |
pycountry >=22.3.5 | Validates ISO 639-1 language codes and ISO 3166-1 country codes passed to language= and region=. |
defusedxml >=0.7.1 | Safe XML parsing for transcript/caption track responses. |
Install the Package
The package name on PyPI is
ytscrape — install it exactly as shown above. After installation a ytscrape console script is also registered, so you can run ytscrape search "python" --max 10 directly from your terminal.Verify the Installation
Open a Python interpreter or create a small script and confirm the package imports correctly:Optional: Development Dependencies
If you want to contribute to ytscrape or run its test suite locally, sync the full development environment usinguv:
dev dependency group includes:
| Package | Purpose |
|---|---|
pytest >=9.1.1 | Test runner — execute with uv run pytest. |
ruff >=0.14.5 | Linting and code formatting. |
bandit >=1.9.4 | Static security analysis. |
pre-commit >=4.3.0 | Git hook runner that executes ruff and bandit before every commit. |
twine >=6.2.0 | Package upload tooling (maintainers only). |