pytube
Python 3 library for downloading YouTube Videos.
Decision gist · record as of 2026-08-14
Yes, if you need a simple, dependency-free way to download YouTube videos and can verify it still works with current YouTube. No, if you require active maintenance, bug fixes, or assurance of compatibility—the package is dormant and YouTube's API changes frequently, so expect breakage without notice. Consider it a working tool for personal use or one-off scripts, not a production dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later.
- YouTube's streaming infrastructure changes frequently; this package is dormant and may break without notice.
- Low install friction with no runtime dependencies.
License · maintenance · safety
The Unlicense (Unlicense) (permissive) — Licensed under The Unlicense (Unlicense), a permissive public-domain-equivalent license that places no restrictions on use, modification, or redistribution.
last release 2023-05-07 (1195 days) · last repo commit 2024-08-15 · 13,170 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,754,134 downloads/mo, #2,239 on PyPI
Alternatives
Verify before relying
pip install pytube
from pytube import YouTube
yt = YouTube('https://youtu.be/2lAe1cqCOXo')
yt.streams.first().download()
# Or via CLI:
# pytube https://youtu.be/2lAe1cqCOXo- Whether the package currently works with YouTube's current authentication and stream-extraction mechanisms
- Whether callback functions (on_progress, on_complete) are fully functional in version 15.0.0
- Support status for DASH stream downloads and caption extraction in current YouTube environment
What it is and what it does
pytube is a lightweight, dependency-free Python library for scripting YouTube video downloads. It exposes a simple API to fetch video metadata, select streams by quality or format, and download them to disk, plus a command-line tool for one-off downloads. The library supports both progressive (single-file) and DASH (separate audio/video) streams, playlists, captions in SubRip format, and thumbnail URLs.
The package is dormant—its last release was in May 2023 and the repository has seen no commits since August 2024. YouTube's streaming infrastructure and authentication mechanisms evolve regularly, so users should expect compatibility issues and should verify that the package still works with current YouTube before relying on it in production. The library has no external dependencies, making installation straightforward, but the lack of active maintenance means bug fixes and API adaptations are unlikely.
Use it for
- Download a single YouTube video at a chosen quality level from a Python script for offline viewing or archival.
- Batch-download an entire YouTube playlist programmatically with custom filtering by resolution or file format.
- Extract and save video captions in SubRip (.srt) format for subtitle use or transcription workflows.
- Retrieve thumbnail images and stream metadata from YouTube videos without downloading the full video file.
- Build a command-line tool or shell script to download videos on demand without writing Python code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a simple, dependency-free way to download YouTube videos and can verify it still works with current YouTube.
No, if you require active maintenance, bug fixes, or assurance of compatibility—the package is dormant and YouTube's API changes frequently, so expect breakage without notice. Consider it a working tool for personal use or one-off scripts, not a production dependency.
Install
pytube on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-05-07 and no commits since 2024-08-15—so expect compatibility issues with YouTube's evolving API and no active bug fixes.
Requires Python 3.7 or later. YouTube's streaming infrastructure changes frequently; this package is dormant and may break without notice.
License in practice
Licensed under The Unlicense (Unlicense), a permissive public-domain-equivalent license that places no restrictions on use, modification, or redistribution.
Quickstart
pip install pytube
from pytube import YouTube
yt = YouTube('https://youtu.be/2lAe1cqCOXo')
yt.streams.first().download()
# Or via CLI:
# pytube https://youtu.be/2lAe1cqCOXo
Verify before relying
- Whether the package currently works with YouTube's current authentication and stream-extraction mechanisms
- Whether callback functions (on_progress, on_complete) are fully functional in version 15.0.0
- Support status for DASH stream downloads and caption extraction in current YouTube environment
Package facts
| License | The Unlicense (Unlicense) permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,195 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,754,134 / month, #2,239 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: The Unlicense (Unlicense)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Multimedia :: VideoTopic :: Software Development :: Libraries :: Python ModulesTopic :: TerminalsTopic :: Utilities |
Evidence: pytube-15.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “download youtube videos programmatically”
- pytubepytube downloads YouTube videos and playlists to local files via…
- youtube_dlCommand-line tool to download videos from YouTube and other video…
- youtube-transcript-apiFetches transcripts and subtitles from YouTube videos via API,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pytubefix · spotdl · streamlink · youtube_dl · subliminal · yt-dlp · casttube · youtube-search-python · twelvelabs · bgutil-ytdlp-pot-provider