1

I'm trying to use Deezer API and when I use GET "http://api.deezer.com/playlist/(some_playlist_id)/tracks", I only get the first 400 songs from the playlist. (in reality, there are around 900 songs)

Is it possible to somehow get a list of ALL the songs in a playlist?

Thanks in advance, Martin

1 Answer 1

2

Most of the time, large lists in Deezer API are split in several page to avoid using too much network at a time.

If you look in the json result, you'll see it looks like this :

{
    "checksum": "c468607e7bb46ddae60548860b76c6b1", 
    "data": [ /* ... lots of tracks here ... */ ], 
    "next": "http://api.deezer.com/playlist/821789631/tracks?index=50", 
    "total": 879
}

You can use the "next" url to fetch the next page, which will in turn include the next page link.

2
  • Thanks for your answer. The problem is I don't get any field called "next" or anything similar (look at api.deezer.com/playlist/547789765 ). Any more ideas? Mar 31, 2014 at 18:12
  • Okay, that's because you're looking at the playlist global informations, which includes some of the tracks, but also the playlist metadata (id, title, description, owner, ...). To get the full list of tracks, you should call the api.deezer.com/playlist/547789765/tracks url instead.
    – XGouchet
    Apr 1, 2014 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.