Inner exposesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/inner/llms.txt
Use this file to discover all available pages before exploring further.
YouTube.search(), YouTube.searchSummary(), YouTube.searchSuggestions(), and YouTube.searchContinuation() for querying YouTube Music content. All methods are suspend functions that return a Result<T>, which you can unwrap with .getOrThrow(), .getOrNull(), or .getOrElse {}.
Basic search
YouTube.search(query, filter) returns Result<SearchResult>. The SearchResult data class contains:
items: List<YTItem>— the matching content items (songs, albums, artists, or playlists depending on the filter applied)continuation: String?— an opaque token for fetching the next page, ornullif there are no more results
Search filters
Pass one of theSearchFilter constants as the second argument to YouTube.search() to restrict results to a specific content type.
| Filter constant | Description |
|---|---|
SearchFilter.FILTER_SONG | Songs only |
SearchFilter.FILTER_VIDEO | Music videos |
SearchFilter.FILTER_ALBUM | Albums and EPs |
SearchFilter.FILTER_ARTIST | Artist profiles |
SearchFilter.FILTER_FEATURED_PLAYLIST | YouTube-curated playlists |
SearchFilter.FILTER_COMMUNITY_PLAYLIST | User-created playlists |
@JvmInline value class SearchFilter(val value: String) wrapping the InnerTube filter parameter string.
Pagination
SearchResult.continuation holds the token for the next page. Pass it to YouTube.searchContinuation() to fetch subsequent pages. The continuation is null when there are no more results, or when the next page returns an empty item list.
searchContinuation sets continuation to null in the returned SearchResult when the returned item list is empty, so the loop terminates naturally.
Search suggestions
YouTube.searchSuggestions(query) returns Result<SearchSuggestions>. The SearchSuggestions data class contains:
queries: List<String>— autocomplete query strings matching what the user typedrecommendedItems: List<YTItem>— fully resolved content items (songs, artists, etc.) recommended for the current input
Search summary
YouTube.searchSummary(query) returns Result<SearchSummaryPage>. Instead of filtering by a single content type, it returns a SearchSummaryPage containing a summaries: List<SearchSummary> — one entry per category found in the results (e.g. “Top result”, “Songs”, “Albums”, “Artists”). Each SearchSummary has a title: String and items: List<YTItem>.
This is the method to use when you need a quick cross-category overview rather than a deep, paginated single-category result list.
SearchSummaryPage also exposes filterExplicit(enabled: Boolean) and filterVideo(enabled: Boolean) methods that return a new SearchSummaryPage with the matching items removed from each summary group.
Filtering explicit content
ThefilterExplicit() extension is available on any List<T : YTItem>. Set enabled = true to drop items whose explicit flag is true.
filterVideo(enabled: Boolean) on List<YTItem> removes SongItem entries whose endpoint.watchEndpointMusicSupportedConfigs indicates an official music video (OMV) or user-generated content (UGC) type.