Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top