Announcements

Help Wizard

Step 1

NEXT STEP

Artist albums endpoint ignores market parameter

Artist albums endpoint ignores market parameter

I've been using the Artist Albums endpoint for a long time but it is now returning duplicates as it is ignoring the "market" parameter.

eg https://api.spotify.com/v1/artists/5GxyeQagayzZOg4UwffQlD/albums?offset=0&limit=10&include_groups=al...

This is currently returning several duplicate albums (which is a specific reason given in the docs to include the market parameter!). Could this be fixed please?

Reply
9 Replies

Edit: the important part of the URL has been truncated! Can be seen if you hover it.

Sorry to bump this - but this is still occurring. Can it be looked at please?

Yes please! I can confirm the issue. Eg. with the artist "Seefeel" I'd get the following two records which produce duplicate entries:

 

        {
            "album_group": "album",
            "album_type": "album",
            "artists": [
                {
                    "external_urls": {
                        "spotify": "https://open.spotify.com/artist/0jyH4jtanxaysaxwDVhR6f"
                    },
                    "href": "https://api.spotify.com/v1/artists/0jyH4jtanxaysaxwDVhR6f",
                    "id": "0jyH4jtanxaysaxwDVhR6f",
                    "name": "Seefeel",
                    "type": "artist",
                    "uri": "spotify:artist:0jyH4jtanxaysaxwDVhR6f"
                }
            ],
            "external_urls": {
                "spotify": "https://open.spotify.com/album/1Q6ES6AJFAz2N5LQWlPdh7"
            },
            "href": "https://api.spotify.com/v1/albums/1Q6ES6AJFAz2N5LQWlPdh7",
            "id": "1Q6ES6AJFAz2N5LQWlPdh7",
            "images": [
                {
                    "height": 640,
                    "url": "https://i.scdn.co/image/ab67616d0000b273ccceb451e00131c952cf5111",
                    "width": 640
                },
                {
                    "height": 300,
                    "url": "https://i.scdn.co/image/ab67616d00001e02ccceb451e00131c952cf5111",
                    "width": 300
                },
                {
                    "height": 64,
                    "url": "https://i.scdn.co/image/ab67616d00004851ccceb451e00131c952cf5111",
                    "width": 64
                }
            ],
            "name": "(Ch-Vox) Redux",
            "release_date": "2021-05-14",
            "release_date_precision": "day",
            "total_tracks": 12,
            "type": "album",
            "uri": "spotify:album:1Q6ES6AJFAz2N5LQWlPdh7"
        },
        {
            "album_group": "album",
            "album_type": "album",
            "artists": [
                {
                    "external_urls": {
                        "spotify": "https://open.spotify.com/artist/0jyH4jtanxaysaxwDVhR6f"
                    },
                    "href": "https://api.spotify.com/v1/artists/0jyH4jtanxaysaxwDVhR6f",
                    "id": "0jyH4jtanxaysaxwDVhR6f",
                    "name": "Seefeel",
                    "type": "artist",
                    "uri": "spotify:artist:0jyH4jtanxaysaxwDVhR6f"
                }
            ],
            "external_urls": {
                "spotify": "https://open.spotify.com/album/5YMZC087G8jIy4d4qzCwuf"
            },
            "href": "https://api.spotify.com/v1/albums/5YMZC087G8jIy4d4qzCwuf",
            "id": "5YMZC087G8jIy4d4qzCwuf",
            "images": [
                {
                    "height": 640,
                    "url": "https://i.scdn.co/image/ab67616d0000b2736177549409699fa475c38600",
                    "width": 640
                },
                {
                    "height": 300,
                    "url": "https://i.scdn.co/image/ab67616d00001e026177549409699fa475c38600",
                    "width": 300
                },
                {
                    "height": 64,
                    "url": "https://i.scdn.co/image/ab67616d000048516177549409699fa475c38600",
                    "width": 64
                }
            ],
            "name": "(Ch-Vox) Redux",
            "release_date": "2021-05-14",
            "release_date_precision": "day",
            "total_tracks": 12,
            "type": "album",
            "uri": "spotify:album:5YMZC087G8jIy4d4qzCwuf"
        },

There is no availability info in there. 

The responses are lacking the "available countries" lists, too. But if I look up the albums using the albums/id query, I'd get that info. And it would show that the first copy was only available in Japan. There's a problem with artist/albums specifically.

Finding same issue.   Example API call https://api.spotify.com/v1/artists/6mdiAmATAx73kdx…?offset=0&limit=20&include_groups=album&market=GB

Well this remains an issue, 6 months on with no reply from Spotify. These things used to be quite attentively looked at by Spotify staff. Have they stopped responding to issues? We are supposed to restrict access to albums outside the user's market, but this issue prevents the ability to do that.

It doesn't work again! "Get Artist's Albums" request ignores market parameter! No matter which market I choose, only albums available in my country will be shown.

Get Artist's Albums: https://developer.spotify.com/documentation/web-api/reference/get-an-artists-albums

Although the same endpoint is affected as the original issue (which was since fixed - but Spotify staff couldn't be bothered to reply, so neither could I!), the behaviour you describe is a bit different to the one I logged.

From the docs: "If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter."

My app doesn't use user access tokens, and calls to that endpoint are returning different albums depending on which market I specify - so at the moment I can't repeat your issue. If I was using user access tokens I'd expect it to behave exactly as you describe (and that also helps make it compliant with Spotify's requirements).

Sorry, I'm new here. Your topic title perfectly matched my problem, so I posted it here.

 

However, "If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter." and an access token is required to get the data, how am I supposed to use the market parameter? It doesn't make any sense. The access token will always override the market parameter, and I will never be able to get artist albums from different countries.

It didn't work like that. For the last few years, it worked the opposite way - the market parameter overrode the access token country.

Suggested posts