Announcements

Web API Browse API Get Categories returns duplicates in pagination

Reply
Highlighted

Web API Browse API Get Categories returns duplicates in pagination

Casual Listener

In my web app I let the user browse categories, that I fetch via pagination:


https://api.spotify.com/v1/browse/categories?offset=0

https://api.spotify.com/v1/browse/categories?offset=20

https://api.spotify.com/v1/browse/categories?offset=40

Every now and then I get duplicates from such a succession of requests. So the very same category is returned by for instance the first and 2nd request, both requests being done with only a few seconds between them. It often affects not only one but 1 to 3 categories in that list.

I also noticed that this endpoint does not return a somewhat constant list. No 4 refreshes return the same full list.

Last but not least the language is not as described by the docs always american english by default. It seems the server tries to guess my language what leads to me getting this list in about 4 different languages.

1 Reply
Highlighted

Re: Web API Browse API Get Categories returns duplicates in pagination

Casual Listener
It seems that all three issues relate to each other as by explicitly setting the locale I can work around them altogether. Still a bug but one I can work around.
SUGGESTED POSTS