Open symeshan opened 4 years ago
@symeshan : I just had the same issue. I believe that it has something to do with the available markets.
In my case this request leads to the same empty result as yours:
https://api.spotify.com/v1/search?type=album&query=upc:4061798422036
{
"albums": {
"href": "https://api.spotify.com/v1/search?query=upc%3A4061798422036&type=album&offset=0&limit=20",
"items": [],
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total": 0
}
}
As this release is not available in all markets i tried to add the market
parameter and got a correct result:
https://api.spotify.com/v1/search?type=album&query=upc:4061798422036&market=DE
"albums": {
"href": "https://api.spotify.com/v1/search?query=upc%3A4061798422036&type=album&market=DE&offset=0&limit=20",
"items": [
{
"album_type": "album",
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4QjY2fD869F1fnJadkjPGM"
},
"href": "https://api.spotify.com/v1/artists/4QjY2fD869F1fnJadkjPGM",
"id": "4QjY2fD869F1fnJadkjPGM",
"name": "Jeez",
"type": "artist",
"uri": "spotify:artist:4QjY2fD869F1fnJadkjPGM"
}
],
"external_urls": {
"spotify": "https://open.spotify.com/album/17BEmad45O5cGj9mW2MNao"
},
"href": "https://api.spotify.com/v1/albums/17BEmad45O5cGj9mW2MNao",
"id": "17BEmad45O5cGj9mW2MNao",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ab67616d0000b273749d8d751db5151adefc55c3",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02749d8d751db5151adefc55c3",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/ab67616d00004851749d8d751db5151adefc55c3",
"width": 64
}
],
"name": "Säg mau",
"release_date": "2019-12-15",
"release_date_precision": "day",
"total_tracks": 7,
"type": "album",
"uri": "spotify:album:17BEmad45O5cGj9mW2MNao"
}
],
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total": 1
}
}
Issue found on February 6th 2020, after previously working consistently.
Endpoint(s):
GET https://api.spotify.com/v1/search
Scope(s):
Steps to reproduce:
search
endpoint withq
upc:886443671584
andtype
album
Expected behaviour:
Reference to album id
4aawyAB9vmqN3uQ7FjRGTy
.When going the other way, calling
https://api.spotify.com/v1/albums/4aawyAB9vmqN3uQ7FjRGTy
(the sample id in theget-album
call in the documentation) it returns an album object with the above UPC886443671584
in itsexternal_ids
.Actual behaviour:
No results found.