Plan
Free/Premium
Country
USA
Device
iMac Late 2014
Operating System
macOS Big Sir 11.6.4 (20G417)
My Question or Issue
When I attempt to execute the following query, either with Python or with the Spotify Developer Console, I get a 404 error. Does this error occur because of a query string length? If YES, what is the limit? Below is the code from the console:
curl -X "GET" "https://api.spotify.com/v1/search?q=artist:Porridge Radio track:Waterslide, Diving Board, Ladder to the Sky album:Waterslide, Diving Board, Ladder to the Sky&type=track" -H "Accept: application/json" -H "Content-Type: application/json" -H
And this is the output:
{
"error": {
"status": 404,
"message": "Not found."
}
}
If I run this query without the Album Name, I do not get the error, but I get no results:
curl -X "GET" "https://api.spotify.com/v1/search?q=artist:Porridge Radio track:Waterslide, Diving Board, Ladder to the Sky&type=track&market=US" -H "Accept: application/json" -H "Content-Type: application/json" -H
Result:
{
"tracks": {
"href": "https://api.spotify.com/v1/search?query=artist:Porridge+Radio+track:Waterslide,+Diving+Board,+Ladder+to+the+Sky&type=track&market=US&locale=en-US,en;q=0.5&offset=0&limit=20",
"items": [
{
"album": {
"album_type": "album",
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4vAQ4M7vgItwBtmBTgRu48"
},
"href": "https://api.spotify.com/v1/artists/4vAQ4M7vgItwBtmBTgRu48",
"id": "4vAQ4M7vgItwBtmBTgRu48",
"name": "Porridge Radio",
"type": "artist",
"uri": "spotify:artist:4vAQ4M7vgItwBtmBTgRu48"
}
],
"external_urls": {
"spotify": "https://open.spotify.com/album/6wdThJ2V58nkaWfv1jA4B5"
},
"href": "https://api.spotify.com/v1/albums/6wdThJ2V58nkaWfv1jA4B5",
"id": "6wdThJ2V58nkaWfv1jA4B5",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ab67616d0000b27303a583cc04f4005d5c81623d",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e0203a583cc04f4005d5c81623d",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/ab67616d0000485103a583cc04f4005d5c81623d",
"width": 64
}
],
"name": "Waterslide, Diving Board, Ladder To The Sky",
"release_date": "2022-05-20",
"release_date_precision": "day",
"total_tracks": 13,
"type": "album",
"uri": "spotify:album:6wdThJ2V58nkaWfv1jA4B5"
},
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4vAQ4M7vgItwBtmBTgRu48"
},
"href": "https://api.spotify.com/v1/artists/4vAQ4M7vgItwBtmBTgRu48",
"id": "4vAQ4M7vgItwBtmBTgRu48",
"name": "Porridge Radio",
"type": "artist",
"uri": "spotify:artist:4vAQ4M7vgItwBtmBTgRu48"
}
],
"disc_number": 1,
"duration_ms": 202720,
"explicit": false,
"external_ids": {
"isrc": "US38W2145013"
},
"external_urls": {
"spotify": "https://open.spotify.com/track/0on6oBOc1ZpX8FoeKSl8yK"
},
"href": "https://api.spotify.com/v1/tracks/0on6oBOc1ZpX8FoeKSl8yK",
"id": "0on6oBOc1ZpX8FoeKSl8yK",
"is_local": false,
"is_playable": true,
"name": "Waterslide, Diving Board, Ladder To The Sky",
"popularity": 37,
"preview_url": "https://p.scdn.co/mp3-preview/b71b236a8359ef63e1bee616c78d075fd0b2fbfd?cid=774b29d4f13844c495f206cafdad9c86",
"track_number": 13,
"type": "track",
"uri": "spotify:track:0on6oBOc1ZpX8FoeKSl8yK"
}
],
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total": 1
}
}