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 Offset not working as expected

Get Artist's Albums Offset not working as expected

Plan

Free

Country

GB

Device

Lenovo Thinkpad

Operating System

Windows 10

 

My Question or Issue

Trying to get the second page of albums using limit and offset on the endpoint:

https://api.spotify.com/v1/artists/{artist_id}/albums

results in an invalid response with no data.

 

This behaviour happens on all artists that have more than 50 albums total and therefore require the offset to be set to 50. For example, the artist: 

 

07CimrZi5vs9iEao47TNQ4

 

has 53 albums but when I try to access the second page of results with the following link:

https://api.spotify.com/v1/artists/07CimrZi5vs9iEao47TNQ4/albums?include_groups=single%2Calbum%2Ccompilation&market=GB&limit=50&offset=50

  The response is empty:

 

{
  "href": "https://api.spotify.com/v1/artists/07CimrZi5vs9iEao47TNQ4/albums?include_groups=album,single,compilation&offset=50&limit=50&market=GB&locale=en-GB,en-US;q=0.9,en;q=0.8",
  "items": [],
  "limit": 50,
  "next": null,
  "offset": 50,
  "previous": "https://api.spotify.com/v1/artists/07CimrZi5vs9iEao47TNQ4/albums?include_groups=album,single,compilation&offset=0&limit=50&market=GB&locale=en-GB,en-US;q=0.9,en;q=0.8",
  "total": 53
}

 

 

I can work with the top 50 results for now but this is clearly a bug.

Reply
0 Replies

Suggested posts