Announcements

Help Wizard

Step 1

NEXT STEP

Pagination error while consuming the API: https://api.spotify.com/v1/artists/{spotifyId}/albums

Pagination error while consuming the API: https://api.spotify.com/v1/artists/{spotifyId}/albums

Plan

Premium

Country

Brazil

Device

DELL-G15

Operating System

Windows 11

 

My Question or Issue

When using the API responsible for searching for an artist's albums. Having the pathVariable spotfyId as a parameter. The pagination is not bringing all the items. Below is a request that was used as a base. Its return should be 10 items. However, it only brings 5 ​​items. Also passing the OFFSET equal to 40 based on the same request, it only brings 3 items instead of 10. You must insert the access token to complete the request.

Requests Examples:

curl --location 'https://api.spotify.com/v1/artists/2ye2Wgw4gimLv2eAKyk1NB/albums?limit=10&offset=40' \
--header 'Authorization: Bearer <TOKEN>

curl --location 'https://api.spotify.com/v1/artists/2ye2Wgw4gimLv2eAKyk1NB/albums?limit=10&offset=20' \
--header 'Authorization: Bearer <TOKEN>

 

Reply
0 Replies

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