Search for Item
search().query(SearchQueryParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : SearchQueryResponse
GET/search
Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
Parameters
Returns
Search for Item
package dev.cjav.spotted.example
import dev.cjav.spotted.client.SpottedClient
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient
import dev.cjav.spotted.models.search.SearchQueryParams
import dev.cjav.spotted.models.search.SearchQueryResponse
fun main() {
val client: SpottedClient = SpottedOkHttpClient.fromEnv()
val params: SearchQueryParams = SearchQueryParams.builder()
.q("remaster%20track:Doxy%20artist:Miles%20Davis")
.addType(SearchQueryParams.Type.ALBUM)
.build()
val response: SearchQueryResponse = client.search().query(params)
}{
"albums": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
}
],
"published": true
},
"artists": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"followers": {
"href": "href",
"published": true,
"total": 0
},
"genres": [
"Prog rock",
"Grunge"
],
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"popularity": 0,
"published": true,
"type": "artist",
"uri": "uri"
}
],
"published": true
},
"audiobooks": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"authors": [
{
"name": "name",
"published": true
}
],
"available_markets": [
"string"
],
"copyrights": [
{
"published": true,
"text": "text",
"type": "type"
}
],
"description": "description",
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"html_description": "html_description",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"languages": [
"string"
],
"media_type": "media_type",
"name": "name",
"narrators": [
{
"name": "name",
"published": true
}
],
"publisher": "publisher",
"total_chapters": 0,
"type": "audiobook",
"uri": "uri",
"edition": "Unabridged",
"published": true
}
],
"published": true
},
"episodes": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "5Xt5DXGzch68nYYamXrNxZ",
"audio_preview_url": "https://p.scdn.co/mp3-preview/2f37da1d4221f40b9d1a98cd191f4d6f1646ad17",
"description": "A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.\n",
"duration_ms": 1686230,
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "https://api.spotify.com/v1/episodes/5Xt5DXGzch68nYYamXrNxZ",
"html_description": "<p>A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.</p>\n",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"is_externally_hosted": true,
"is_playable": true,
"languages": [
"fr",
"en"
],
"name": "Starting Your Own Podcast: Tips, Tricks, and Advice From Anchor Creators\n",
"release_date": "1981-12-15",
"release_date_precision": "day",
"type": "episode",
"uri": "spotify:episode:0zLhl3WsOCQHbe1BPTiHgr",
"language": "en",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"resume_point": {
"fully_played": true,
"published": true,
"resume_position_ms": 0
}
}
],
"published": true
},
"playlists": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"collaborative": true,
"description": "description",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"owner": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "user",
"uri": "uri",
"display_name": "display_name"
},
"published": true,
"snapshot_id": "snapshot_id",
"tracks": {
"href": "href",
"published": true,
"total": 0
},
"type": "type",
"uri": "uri"
}
],
"published": true
},
"shows": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"available_markets": [
"string"
],
"copyrights": [
{
"published": true,
"text": "text",
"type": "type"
}
],
"description": "description",
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"html_description": "html_description",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"is_externally_hosted": true,
"languages": [
"string"
],
"media_type": "media_type",
"name": "name",
"publisher": "publisher",
"total_episodes": 0,
"type": "show",
"uri": "uri",
"published": true
}
],
"published": true
},
"tracks": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
}
],
"published": true
}
}Returns Examples
{
"albums": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
}
],
"published": true
},
"artists": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"followers": {
"href": "href",
"published": true,
"total": 0
},
"genres": [
"Prog rock",
"Grunge"
],
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"popularity": 0,
"published": true,
"type": "artist",
"uri": "uri"
}
],
"published": true
},
"audiobooks": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"authors": [
{
"name": "name",
"published": true
}
],
"available_markets": [
"string"
],
"copyrights": [
{
"published": true,
"text": "text",
"type": "type"
}
],
"description": "description",
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"html_description": "html_description",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"languages": [
"string"
],
"media_type": "media_type",
"name": "name",
"narrators": [
{
"name": "name",
"published": true
}
],
"publisher": "publisher",
"total_chapters": 0,
"type": "audiobook",
"uri": "uri",
"edition": "Unabridged",
"published": true
}
],
"published": true
},
"episodes": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "5Xt5DXGzch68nYYamXrNxZ",
"audio_preview_url": "https://p.scdn.co/mp3-preview/2f37da1d4221f40b9d1a98cd191f4d6f1646ad17",
"description": "A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.\n",
"duration_ms": 1686230,
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "https://api.spotify.com/v1/episodes/5Xt5DXGzch68nYYamXrNxZ",
"html_description": "<p>A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.</p>\n",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"is_externally_hosted": true,
"is_playable": true,
"languages": [
"fr",
"en"
],
"name": "Starting Your Own Podcast: Tips, Tricks, and Advice From Anchor Creators\n",
"release_date": "1981-12-15",
"release_date_precision": "day",
"type": "episode",
"uri": "spotify:episode:0zLhl3WsOCQHbe1BPTiHgr",
"language": "en",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"resume_point": {
"fully_played": true,
"published": true,
"resume_position_ms": 0
}
}
],
"published": true
},
"playlists": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"collaborative": true,
"description": "description",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"owner": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "user",
"uri": "uri",
"display_name": "display_name"
},
"published": true,
"snapshot_id": "snapshot_id",
"tracks": {
"href": "href",
"published": true,
"total": 0
},
"type": "type",
"uri": "uri"
}
],
"published": true
},
"shows": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"available_markets": [
"string"
],
"copyrights": [
{
"published": true,
"text": "text",
"type": "type"
}
],
"description": "description",
"explicit": true,
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"html_description": "html_description",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"is_externally_hosted": true,
"languages": [
"string"
],
"media_type": "media_type",
"name": "name",
"publisher": "publisher",
"total_episodes": 0,
"type": "show",
"uri": "uri",
"published": true
}
],
"published": true
},
"tracks": {
"href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",
"limit": 20,
"next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"offset": 0,
"previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",
"total": 4,
"items": [
{
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
}
],
"published": true
}
}