Extractors are the components that handle site-specific logic for extracting video information from URLs. yt-dlp includes over 1,700 extractors for different websites.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yt-dlp/yt-dlp/llms.txt
Use this file to discover all available pages before exploring further.
What is an Extractor?
An extractor is a class that:- Determines if it can handle a given URL
- Extracts video metadata (title, description, formats, etc.)
- Provides download URLs for the video content
InfoExtractor base class.
Using Extractors
List Available Extractors
Get a Specific Extractor
Force a Specific Extractor
InfoExtractor Base Class
All extractors inherit from theInfoExtractor class, which provides common functionality.
Key Attributes
The extractor’s unique identifier (e.g., ‘youtube’, ‘vimeo’)
Human-readable description of the extractor
Regular expression pattern matching URLs this extractor can handle
Whether the extractor is currently working
Age limit for content from this extractor
Common Methods
suitable()
Check if the extractor can handle a URL.working()
Check if the extractor is currently working.Information Dictionary Format
Extractors return information dictionaries with standardized fields:Required Fields
Unique video identifier
Video title (empty string if unavailable, not None)
Format Information
List of available formats, ordered from worst to best quality. Each format dict contains:
url: Media URLformat_id: Format identifierext: File extensionwidth,height: Video dimensionstbr,abr,vbr: Bitratesacodec,vcodec: Codec namesfilesize: File size in bytes
Optional Metadata Fields
Video description
Name of the video uploader
Uploader’s unique identifier
URL to uploader’s profile
Video duration in seconds
Number of views
Number of likes
Upload date in YYYYMMDD format
Unix timestamp of upload time
List of thumbnail dictionaries with ‘url’, ‘width’, ‘height’
Dictionary mapping language codes to lists of subtitle format dicts
List of video categories
List of tags
Working with Playlists
Some extractors handle playlists or channels. These return a different structure:Type of result: ‘video’, ‘playlist’, ‘multi_video’, or ‘url’
For playlists: list of video info dictionaries
Title of the playlist
Total number of videos in playlist
Extractor Arguments
Some extractors accept additional arguments to customize their behavior:Common Extractor Examples
YouTube
Generic Extractor
The generic extractor can handle many sites by detecting embedded videos:List Supported Sites
Extractor Plugins
You can create custom extractors as plugins. Place them in:~/.yt-dlp/plugins/extractor/${XDG_CONFIG_HOME}/yt-dlp/plugins/extractor/