The Search API lets you query YouTube Music for songs, videos, albums, artists, and playlists. All methods areDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/innertube-v2/llms.txt
Use this file to discover all available pages before exploring further.
suspend functions on the YouTube singleton and return a Result<T> wrapping the parsed response.
YouTube.search()
Performs a filtered search and returns a single page of typed results.
The search query string (e.g.
"Bohemian Rhapsody").A
SearchFilter constant that restricts results to a specific content type. See SearchFilter Constants below.Returns
Result<SearchResult>
Parsed results for the current page. Each element is one of
SongItem, VideoItem, AlbumItem, ArtistItem, or PlaylistItem, depending on the filter applied.An opaque continuation token. Pass this to
searchContinuation() to fetch the next page. null when there are no more results.Example
YouTube.searchContinuation()
Fetches the next page of a previous search() call using a continuation token.
The opaque continuation token returned by a prior
search() or searchContinuation() call.Returns
Result<SearchResult>
The next page of results. Will be empty on the last page.
The next continuation token, or
null when items is empty (last page).When
items is empty the library automatically returns continuation = null, so a while (token != null) loop is safe.YouTube.searchSuggestions()
Returns type-ahead search suggestions for a partial query.
Partial or full query string (e.g.
"blind" to get completions like "Blinding Lights").Returns
Result<SearchSuggestions>
Plain-text query completions suggested by YouTube Music.
Pre-parsed recommended items (songs, artists, etc.) surfaced alongside textual suggestions.
Example
YouTube.searchSummary()
Performs an unfiltered search and groups results into labelled sections (Top Result, Songs, Videos, Albums, Artists, Playlists).
The search query string.
Returns
Result<SearchSummaryPage>
An ordered list of result groups. Each group surfaces a different content category.
Example
SearchFilter Constants
SearchFilter is a Kotlin value class wrapping a URL-encoded protobuf param string. All constants live in YouTube.SearchFilter.Companion.
| Constant | Filters for | Encoded value |
|---|---|---|
FILTER_SONG | Audio tracks | EgWKAQIIAWoKEAkQBRAKEAMQBA%3D%3D |
FILTER_VIDEO | Music videos | EgWKAQIQAWoKEAkQChAFEAMQBA%3D%3D |
FILTER_ALBUM | Albums & EPs | EgWKAQIYAWoKEAkQChAFEAMQBA%3D%3D |
FILTER_ARTIST | Artist channels | EgWKAQIgAWoKEAkQChAFEAMQBA%3D%3D |
FILTER_FEATURED_PLAYLIST | YouTube-curated playlists | EgeKAQQoADgBagwQDhAKEAMQBRAJEAQ%3D |
FILTER_COMMUNITY_PLAYLIST | User-created playlists | EgeKAQQoAEABagoQAxAEEAoQCRAF |
Use
searchSummary() rather than search() when you want a cross-category overview — it fires a single unfiltered request and groups results automatically.