skillfed

pytubefix

Python3 library for downloading YouTube Videos.

pytubefix v10.11.0 322.3K downloads/30d#7,614 on PyPI1,604
Permissive license MIT Active released

What it is and what it does

Pytubefix is a Python library that wraps YouTube's web interface to download videos, audio, playlists, and channel content without requiring API keys. It offers both synchronous and asynchronous interfaces, allowing you to fetch video metadata (title, views, likes, author, thumbnail), retrieve captions, extract chapters and key moments, and download streams in various resolutions and formats. The library depends on aiohttp for async HTTP operations and nodejs-wheel-binaries for underlying JavaScript execution, and supports Python 3.7 through 3.14.

Typical usage involves instantiating a YouTube object with a video URL, querying available streams, and downloading a specific stream to disk. The library provides convenience methods like get_highest_resolution() and get_audio_only() to simplify common tasks, progress callbacks to track downloads, and OAuth support to handle age-restricted content. For bulk operations, the asynchronous AsyncYouTube interface allows non-blocking downloads and metadata fetches within an event loop.

Use it for:

  • Download individual YouTube videos in highest resolution or as audio-only files for offline viewing or archival.
  • Batch-download entire playlists or all videos from a channel with minimal code.
  • Extract and save video captions or subtitles in SRT format for accessibility or transcription.
  • Fetch video metadata (title, view count, likes, author, thumbnail URL) without downloading the full video.
  • Build asynchronous download pipelines that handle multiple videos concurrently without blocking.
  • Search YouTube and filter results by upload date, duration, or features like 4K or Creative Commons licensing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Downloads YouTube videos, playlists, and channels in multiple formats and resolutions, with support for subtitles, metadata extraction, and asynchronous operations.

Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. It covers a clear use case (YouTube content download) with both sync and async APIs. Verify that your intended use complies with YouTube's terms of service before deploying in production.

Install

pytubefix on PyPI

pip

pip install pytubefix

uv

uv add pytubefix

poetry

poetry add pytubefix

Installing pytubefix

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance with recent commits and a stable release cycle; the project shows 1604 stars and receives regular updates.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.

Quickstart

pip install pytubefix

from pytubefix import YouTube
from pytubefix.cli import on_progress

yt = YouTube('https://www.youtube.com/watch?v=...', on_progress_callback=on_progress)
stream = yt.streams.get_highest_resolution()
stream.download()

Requires nodejs-wheel-binaries as a runtime dependency; YouTube may block or rate-limit automated downloads depending on usage patterns and account status.

Verify before relying

  • Whether YouTube's terms of service permit automated video downloads for your intended use case
  • Whether OAuth authentication actually bypasses age-restricted content restrictions or merely handles authentication
  • Performance characteristics of AsyncYouTube relative to synchronous YouTube for bulk downloads

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — aiohttp, nodejs-wheel-binaries
Maintenance actively maintained — 16 days since the last release
Last repo commit
First released
Downloads 322,348/month — #7,614 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytubefix-10.11.0-py3-none-any.whl

Keywords: youtube, download, video, stream

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Multimedia :: VideoTopic :: Software Development :: Libraries :: Python ModulesTopic :: TerminalsTopic :: Utilities

Tags

youtube video downloader pythondownload youtube mp4youtube playlist downloaderextract youtube audioyoutube channel downloaderasync youtube downloadyoutube metadata extraction
video-downloadasync-capableyoutube

More Python Modules packages