Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

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

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

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.



 

Reply
6 Replies

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.

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. 

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)

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?

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

Thanks Josh - yes, this seems to be fixed now.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random