SearchApi

open class SearchApi(api: GenericSpotifyApi) : SpotifyEndpoint

Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string. It is possible to have 0 results and no exception thrown with these methods. Check the size of items returned.

Api Reference

Constructors

SearchApi
Link copied to clipboard
common
fun SearchApi(api: GenericSpotifyApi)

Types

SearchType
Link copied to clipboard
common
enum SearchType : Enum<SearchApi.SearchType>
Describes which object to search forApi Reference

Functions

search
Link copied to clipboard
common
suspend fun search(query: String, vararg searchTypes: SearchApi.SearchType, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null, includeExternal: Boolean? = null): SpotifySearchResult
Get Spotify Catalog information about artists, albums, tracks and/or playlists that match a keyword string.
searchAlbum
Link copied to clipboard
common
suspend fun searchAlbum(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SimpleAlbum>
Get Spotify Catalog information about albums that match the keyword string.
searchAlbumRestAction
Link copied to clipboard
common
fun searchAlbumRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<SimpleAlbum>>
Get Spotify Catalog information about albums that match the keyword string.
searchAllTypes
Link copied to clipboard
common
suspend fun searchAllTypes(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): SpotifySearchResult
Get Spotify Catalog information about any searchable type that match the keyword string.
searchAllTypesRestAction
Link copied to clipboard
common
fun searchAllTypesRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): SpotifyRestAction<SpotifySearchResult>
Get Spotify Catalog information about any searchable type that match the keyword string.
searchArtist
Link copied to clipboard
common
suspend fun searchArtist(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<Artist>
Get Spotify Catalog information about artists that match the keyword string.
searchArtistRestAction
Link copied to clipboard
common
fun searchArtistRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<Artist>>
Get Spotify Catalog information about artists that match the keyword string.
searchEpisode
Link copied to clipboard
common
suspend fun searchEpisode(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): PagingObject<SimpleEpisode>
Get Spotify Catalog information about episodes that match the keyword string.
searchEpisodeRestAction
Link copied to clipboard
common
fun searchEpisodeRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): SpotifyRestAction<PagingObject<SimpleEpisode>>
Get Spotify Catalog information about episodes that match the keyword string.
searchPlaylist
Link copied to clipboard
common
suspend fun searchPlaylist(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SimplePlaylist>
Get Spotify Catalog information about playlists that match the keyword string.
searchPlaylistRestAction
Link copied to clipboard
common
fun searchPlaylistRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<SimplePlaylist>>
Get Spotify Catalog information about playlists that match the keyword string.
searchRestAction
Link copied to clipboard
common
fun searchRestAction(query: String, vararg searchTypes: SearchApi.SearchType, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null, includeExternal: Boolean? = null): SpotifyRestAction<SpotifySearchResult>
Get Spotify Catalog information about artists, albums, tracks and/or playlists that match a keyword string.
searchShow
Link copied to clipboard
common
suspend fun searchShow(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): PagingObject<SimpleShow>
Get Spotify Catalog information about shows that match the keyword string.
searchShowRestAction
Link copied to clipboard
common
fun searchShowRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market): SpotifyRestAction<PagingObject<SimpleShow>>
Get Spotify Catalog information about shows that match the keyword string.
searchTrack
Link copied to clipboard
common
suspend fun searchTrack(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<Track>
Get Spotify Catalog information about tracks that match the keyword string.
searchTrackRestAction
Link copied to clipboard
common
fun searchTrackRestAction(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<Track>>
Get Spotify Catalog information about tracks that match the keyword string.

Properties

api
Link copied to clipboard
common
val api: GenericSpotifyApi
cache
Link copied to clipboard
common
val cache: SpotifyCache

Sources

common source
Link copied to clipboard