newpipeextractor_dart library

Classes

AudioOnlyStream
Audio-only stream with bitrate, format, and multi-audio track metadata.
ChannelExtractor
Extracts YouTube channel information, uploads, and tab-based content with stateless token pagination.
ChannelInfoItem
Lightweight channel item used in search results.
CommentsExtractor
Extracts YouTube comments with pagination and reply thread support.
CommentsPage
A page of comments with a flag indicating whether more pages are available.
ContentCountry
A country a service supports for region-specific content (ISO 3166-1 alpha-2).
CookieExtractor
Manages cookies for the native HTTP client used by NewPipe Extractor.
ExtractorHttpClient
Low-level HTTP utilities for stream downloading and content inspection.
Frameset
Storyboard preview thumbnail grid used for video scrubbing previews.
Localization
A language/country pair a service supports for content extraction (e.g. languageCode: 'en', countryCode: 'GB', localizationCode: 'en-GB').
LocalizationExtractor
Controls the language and country for content extraction, and exposes the localizations/countries each service supports.
PageToken
Opaque continuation token for a paginated list.
PlaylistExtractor
Extracts YouTube playlist details and paginated video listings with stateless token pagination.
PlaylistInfoItem
Lightweight playlist item used in search results.
ReCaptchaPage
WebView page for solving YouTube reCAPTCHA challenges.
SearchExtractor
YouTube and YouTube Music search with stateless token pagination and autocomplete.
SearchResult
Combined search results containing videos, playlists, and channels.
ServiceExtractor
Generic extractor that works across all supported services (YouTube, SoundCloud, Bandcamp, PeerTube, media.ccc.de). Use ServiceId enum for the serviceId parameter.
ServiceInfo
Describes an available extraction service (YouTube, SoundCloud, etc.).
StreamInfoItem
Lightweight video item used in lists (search results, trending, playlists, channel uploads).
StreamSegment
A video chapter/segment with title, preview image, and start time.
SubscriptionExtractor
Reads subscription lists from any service that supports it.
SubscriptionItem
A single subscribed channel/artist extracted from a public subscription list or an imported export file.
SubtitleStream
Subtitle/caption track with language, format, and auto-generation flag.
TrendingExtractor
Extracts YouTube trending content and kiosk browsing with stateless token pagination.
UrlExtractor
Parses and validates YouTube URLs.
VideoExtractor
Extracts video information and media streams from YouTube URLs.
VideoInfo
Complete metadata for a video/stream.
VideoOnlyStream
Video-only stream (no audio). Must be combined with an audio stream for playback.
VideoStream
Muxed stream containing both video and audio. Capped at 720p by YouTube.
YoutubeChannel
YouTube channel metadata with subscriber count, verified status, and available tabs.
YoutubeComment
A YouTube comment with author info, engagement metrics, and reply metadata.
YoutubePlaylist
YouTube playlist with metadata, thumbnail URLs, and playlist type classification.
YoutubeVideo
Complete video with metadata, media streams, subtitles, chapters, and storyboard frames.

Enums

ChannelTab
Available channel tabs for browsing channel content.
PlaylistType
Classifies the playlist origin.
Privacy
Video privacy status.
SearchFilter
Search content type filters for YouTube and YouTube Music.
ServiceId
NewPipe Extractor service identifiers.
StreamType
Identifies the type of media stream.

Extensions

YoutubeVideoHelpers on YoutubeVideo
Convenience getters for selecting the best quality streams from a YoutubeVideo.

Functions

setReCaptchaNavigator(ReCaptchaNavigator navigator) → void
Registers the callback for handling reCAPTCHA challenges. Call this once at app startup. See ReCaptchaPage for a ready-made widget.

Typedefs

SearchPage = ({PageToken? next, SearchResult result})
A search result (videos + channels + playlists) plus the continuation token.
StreamPage = ({List<StreamInfoItem> items, PageToken? next})
A page of stream items plus the continuation token for the next page. next == null means there are no more pages.

Exceptions / Errors

BadUrlException
Thrown when a URL is null, empty, or malformed.
ExtractorException
Base class for all extraction errors. Use pattern matching for exhaustive handling.
FatalFailureException
Thrown on HTTP 4xx errors. Usually means YouTube changed their API.
ReCaptchaRequiredException
Thrown when YouTube requires CAPTCHA verification. In practice, reCAPTCHA challenges are handled automatically via setReCaptchaNavigator. This exception is available for consumers who need to handle reCAPTCHA in custom ways.
RequestLimitExceededException
Thrown on HTTP 429 or Google rate-limiting. Wait before retrying.
StreamIsNullException
Thrown when attempting to access streams that weren't loaded.
TransientFailureException
Thrown on HTTP 5xx errors. Retry later -- the issue is on YouTube's side.