Search Spotify (v1)
Returns one page of up to 50 Spotify results of one type, with IDs to pass to the lookup endpoints. Spotify matches loosely, so a query with no exact match still returns its closest results.
1 credit / requestBilled only on success
Authorization
ApiKeyAuth x-api-key<token>
In: header
Query Parameters
query*string
What to search for: a song, artist, album or playlist name, as typed into Spotify.
Length
1 <= length <= 200type?string
Which kind of result to return. Defaults to track.
Default
"track"Value in
- "track"
- "artist"
- "album"
- "playlist"
offset?|
Zero-based position of the first result. Pass the next_offset of the previous page. Spotify reports at most 1,000 track results.
Range
0 <= value <= 1000Default
0curl -X GET "https://example.com/v1/spotify/search?query=never+gonna+give+you+up" \ -H "x-api-key: YOUR_API_KEY"{ "data": { "query": "never gonna give you up", "type": "track", "total": 1000, "count": 50, "offset": 0, "page_size": 50, "next_offset": null, "has_more": false, "results": [ { "type": "track", "id": "4cOdK2wGLETKBW3PvgPWqT", "uri": "spotify:track:4cOdK2wGLETKBW3PvgPWqT", "url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT", "name": "Never Gonna Give You Up", "image_url": "https://i.scdn.co/image/ab67616d0000b273baf89eb11ec7c657805d2da0", "artists": [ { "id": "0gxyHStUsqpMadRV0Di1Qt", "name": "Rick Astley", "uri": "spotify:artist:0gxyHStUsqpMadRV0Di1Qt" } ], "album": { "id": "5Z9iiGl2FcIfa3BMiv6OIw", "name": "Whenever You Need Somebody", "uri": "spotify:album:5Z9iiGl2FcIfa3BMiv6OIw", "image_url": "https://i.scdn.co/image/ab67616d0000b273baf89eb11ec7c657805d2da0" }, "duration_ms": 213573, "explicit": false, "album_type": null, "release_year": null, "verified": null, "description": null, "owner_name": null } ] }, "details": { "reason": "string", "message": "string" }}