Order by playbacks when fetching tracks from SoundCloud -


i fetching list of tracks soundcloud's api using following query retrieve 5 popular tracks:

https://api.soundcloud.com/tracks?client_id=xxx&order=hotness&limit=5

but soundcloud removed hotness order. in blog post tracks can instead sorted playback_count. can done in query or suggest pull down whole soundcloud library , order them in client? following doesn't seem work:

https://api.soundcloud.com/tracks?client_id=xxx&order=playback_count&limit=5

so how 1 retrieve top tracks on soundcloud?

the solution use undocumented calls explorer feature soundcloud uses (i used dev tools in chrome check ajax calls).

https://api.soundcloud.com/explore/sounds/category?limit=l&client_id=xxx

this appears use sort of sorting on popularity of songs. songs can filtered on music checking "grouping" attribute. have resolve list of ids actual songs can done (documented, official) api call:

https://api.soundcloud.com/tracks?ids=1,2,3&client_id=xxx

this seems work , added benefit of distribution among genres. of course, can stop working @ moment since api calls undocumented , perhaps not meant public use.


Comments