https://api.spotify.com/v1/search cannot return the correct number of total results

Reply

https://api.spotify.com/v1/search cannot return the correct number of total results

flask12
Visitor

https://api.spotify.com/v1/search cannot return the correct number of total results

when using the https://api.spotify.com/v1/search endpoint to search, with limit and offset set to be 20 and 0 respectively, the "total" will always be 20. 
But if the offset is set to be 21 or more, the "total" will be more than 20.



 

6 Replies

felix-hilden
Music Fan

Hi, here to say that I've had the same problem for a few days now. Glad to see it posted here!

 

To add to the problem of the result's total being off, the paging navigation is also broken.

noidontwantto
Casual Listener

Same problem here! I just tweeted at the Spotify Platform account about it... 

 

On calls to /search endpoint, the "total" number of search results when offset=0 is always equal to my supplied "limit" value. 

 

It seems to go up on subsequent offset pages.

 

Weird bug! Has been happening in my case at least since last night, possibly longer. 

 

Screen Shot 2020-10-17 at 12.20.18 PM.png

For example, a search for "asdf" usually returns dozens of results... right now it's only 3, because my limit is 3. If I increase my limit, the total will go up correspondingly. 

kkhal
Music Fan
Same here, just noticed today, certainly not a problem more than 2 or 3 days ago.
no pagination/total: limit=20, offset=20
no pagination/total: limit=10, offset=10 (or 20 or anything)
OK: limit=50, offset=0
OK: limit=20, offset>=20 (offset of 20 seems to be OK as well as 21+)
OK: limit=25, offset>=7 (no pagination with offset=5 and invalid offset error with offset=6)

spotifyjosh
Spotify
Spotify

Thanks for letting us know about this, folks! We resolved an issue involving the Search API earlier today. Are you still seeing problems with this now?

noidontwantto
Casual Listener
Seems to be working for me now. Thanks for the update!

kkhal
Music Fan
Thanks Josh - yes, this seems to be fixed now.
SUGGESTED POSTS