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

Get Artist's Albums API not returning all results for certain pages

Get Artist's Albums API not returning all results for certain pages

The end point Get Artist's Albums https://api.spotify.com/v1/artists/{id}/albums when ID is 0blbVefuxOGltDBa00dspv and include_groups is album,single,compilation, returns a total of 85 albums. On the first page, it properly lists the default limit of 20 items. However, if you go to the next page link (or just add offset of 20) it only returns 1 album instead of 20. The page after that (offset 40) returns the expected 20. After that (offset 60) only returns 2. On the last page, it returns 0. Advice on how to get all albums?

 

Reply
3 Replies

Similar issues here. Artist ID 0jNDKefhfSbLR9sFvcPLHo tells me there are 114 albums in total, but all results past the first 62 are empty. If I request an individual include_group, it will return 6 "album"s, 63 "single"s, 45 "appears_on"s and 0 "compilation"s, which does add up to 114. Things get weird as soon as I try combining two or more groups; with "album,appears_on" it tells me there are 51, but if I load with "limit=50&offset=50" it gives me nothing. With "limit=50&offset=1", weirdly enough, it does include the 51st entry.

 

Maybe for now, simply put in separate requests for each include_group and combine the results together? This seems to fix the problem for all artists I've tried it on.

 

Edit: also weird that all compilations appear simply as "appears_on", with album_type="compilation" in the resulting JSON object. Dunno if this was an intentional choice that just hasn't been reflected in the docs yet or if this is also a bug.

Yeah, this is royally disappointing because the entire premise of my website is based on albums being returned and it's completely unreliable.

 

That said, your comment "simply put in separate requests for each include_group and combine the results together" @eth3792 worked for me as well

Edit: deleted post

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