Announcements

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

Reply
Highlighted

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

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
Highlighted

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

Regular

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.

Highlighted

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

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. 

Highlighted

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

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)
Highlighted

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

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?

Highlighted

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

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

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

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