Sort by playback when extracting tracks from SoundCloud

I am extracting a list of tracks from the soundcloud API using the following query to retrieve the 5 most popular tracks:

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

But recently SoundCloud has removed the hotness setting . In a blog post, they say that tracks can be sorted using play_count. But can this be done in the request, or do they offer me to pull out the entire SoundCloud library and order them in the client? The following does not work:

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

So, how would you get the best tracks in SoundCloud?

+6
source share
3 answers

The solution was to use undocumented calls for the explorer function that SoundCloud uses (I used dev tools in Chrome to test AJAX calls).

https://api.soundcloud.com/explore/sounds/category?limit=L&client_id=XXX

It seems to use some sort of sorting by song popularity. Then the songs can be filtered only for music, checking the attribute "grouping". Then I need to allow a list of identifiers for real songs that can be done using a (documented, official) API call:

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

This seems to work just fine, and I also get the added benefit of even distribution among genres. But, of course, this may stop working at any time, as the API calls are undocumented and may not be intended for public use.

+4
source

I just want to provide an update. Soundcloud seems to have moved to v2 API call.

Use this to get a list of categories:
https://api.soundcloud.com/explore/v2

And this is to get tracks from the category:
https://api-v2.soundcloud.com/explore/metal?limit=10&offset=0

So far this seems to be keyless, although I have no idea how long it will last.

EDIT: Thus, the second URL does not allow cross-happening, but for now it works, although it does not return TRIDID complete information

https://api.soundcloud.com/explore/v2/metal?limit=50&consumer_key=XXX

+4
source

check here, soundcloud removed the order on hotness .

Thirsty order removed from Soundclouds API

therefore, at the moment, only order by date possible.

0
source

Source: https://habr.com/ru/post/944349/


All Articles