# teamnewpipe/newpipeextractor architecture

> Architecture diagram of the GitHub repository teamnewpipe/newpipeextractor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teamnewpipe/newpipeextractor
- Repository: https://github.com/teamnewpipe/newpipeextractor

## Overview

NewPipe Extractor is a Java library that turns streaming-site URLs and queries into structured metadata and media information. A typical client selects a site service, resolves a URL or search query into a handler, obtains the corresponding extractor, and consumes extracted results; pagination and other listing features extend that workflow. The tree and README document several content types and five site adapters. Source excerpts are limited, so edges between unsampled components are omitted rather than inferred; documented service capabilities are retained as distinct branches.

Main entry points: [`extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java) (Service API), [`extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java`](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java) (Link handlers), [`extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java`](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java) (Search handler), [`extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java`](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java) (Stream details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Core API"]
  node_service["Service API"]
  node_handlers["Link handlers"]
  node_searchhandler["Search handler"]
end

subgraph group_content["Content extraction"]
  node_stream["Stream details"]
  node_search["Search results"]
  node_channel["Channel details"]
  node_playlist["Playlist details"]
  node_kiosk["Kiosk listings<br/>[KioskList.java]"]
  node_comments["Comments"]
  node_feed["Feeds<br/>[FeedExtractor.java]"]
  node_tabs["Channel tabs"]
end

subgraph group_sites["Site adapters"]
  node_youtube["YouTube adapter"]
  node_soundcloud["SoundCloud adapter"]
  node_bandcamp["Bandcamp adapter"]
  node_peertube["PeerTube adapter"]
  node_mediaccc["media.ccc.de adapter"]
end

subgraph group_shared["Shared services"]
  node_downloader["HTTP downloader<br/>[Downloader.java]"]
  node_localization["Localization<br/>[Localization.java]"]
  node_timeago["Time-ago patterns"]
end

node_client(("Library client"))

node_client -->|"selects service"| node_service
node_service -->|"provides factories"| node_handlers
node_service -->|"accepts query handler"| node_searchhandler
node_service -->|"creates extractor"| node_stream
node_service -->|"creates extractor"| node_search
node_service -->|"creates extractor"| node_playlist
node_service -->|"creates extractor"| node_channel
node_service -->|"creates extractor"| node_comments
node_service -->|"provides kiosks"| node_kiosk
node_client -->|"uses supported site"| node_youtube
node_client -->|"uses supported site"| node_soundcloud
node_client -->|"uses supported site"| node_bandcamp
node_client -->|"uses supported site"| node_peertube
node_client -->|"uses supported site"| node_mediaccc
node_service -->|"supports feed extraction"| node_feed
node_service -->|"supports channel tabs"| node_tabs

click node_service "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java"
click node_handlers "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java"
click node_searchhandler "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java"
click node_stream "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java"
click node_search "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchExtractor.java"
click node_channel "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/channel/ChannelExtractor.java"
click node_playlist "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistExtractor.java"
click node_kiosk "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java"
click node_comments "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsExtractor.java"
click node_feed "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/feed/FeedExtractor.java"
click node_tabs "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/channel/tabs/ChannelTabExtractor.java"
click node_youtube "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java"
click node_soundcloud "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudService.java"
click node_bandcamp "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampService.java"
click node_peertube "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java"
click node_mediaccc "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCService.java"
click node_downloader "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/downloader/Downloader.java"
click node_localization "https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java"
click node_timeago "https://github.com/teamnewpipe/newpipeextractor/blob/dev/timeago-parser/src/main/java/org/schabi/newpipe/extractor/timeago/PatternsHolder.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_service,node_handlers,node_searchhandler,node_client toneBlue
class node_stream,node_search,node_channel,node_playlist,node_kiosk,node_comments,node_feed,node_tabs toneAmber
class node_youtube,node_soundcloud,node_bandcamp,node_peertube,node_mediaccc toneMint
class node_downloader,node_localization,node_timeago toneRose
```

## Components

### Core API

- [Service API](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`
- [Link handlers](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java): `extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java`
- [Search handler](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java): `extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java`

### Content extraction

- [Stream details](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamExtractor.java`
- [Search results](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchExtractor.java`
- [Channel details](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/channel/ChannelExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/channel/ChannelExtractor.java`
- [Playlist details](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistExtractor.java`
- [Kiosk listings](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java): `extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java`
- [Comments](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsExtractor.java`
- [Feeds](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/feed/FeedExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/feed/FeedExtractor.java`
- [Channel tabs](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/channel/tabs/ChannelTabExtractor.java): `extractor/src/main/java/org/schabi/newpipe/extractor/channel/tabs/ChannelTabExtractor.java`

### Site adapters

- [YouTube adapter](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java`
- [SoundCloud adapter](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudService.java`
- [Bandcamp adapter](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampService.java`
- [PeerTube adapter](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java`
- [media.ccc.de adapter](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCService.java): `extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCService.java`

### Shared services

- [HTTP downloader](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/downloader/Downloader.java): `extractor/src/main/java/org/schabi/newpipe/extractor/downloader/Downloader.java`
- [Localization](https://github.com/teamnewpipe/newpipeextractor/blob/dev/extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java): `extractor/src/main/java/org/schabi/newpipe/extractor/localization/Localization.java`
- [Time-ago patterns](https://github.com/teamnewpipe/newpipeextractor/blob/dev/timeago-parser/src/main/java/org/schabi/newpipe/extractor/timeago/PatternsHolder.java): `timeago-parser/src/main/java/org/schabi/newpipe/extractor/timeago/PatternsHolder.java`

### Other components

- **Library client**

## Connections

- Library client → Service API: selects service
- Service API → Link handlers: provides factories (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Search handler: accepts query handler (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Stream details: creates extractor (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Search results: creates extractor (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Playlist details: creates extractor (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Channel details: creates extractor (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Comments: creates extractor (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Kiosk listings: provides kiosks (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Library client → YouTube adapter: uses supported site
- Library client → SoundCloud adapter: uses supported site
- Library client → Bandcamp adapter: uses supported site
- Library client → PeerTube adapter: uses supported site
- Library client → media.ccc.de adapter: uses supported site
- Service API → Feeds: supports feed extraction (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
- Service API → Channel tabs: supports channel tabs (evidence: `extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java`)
