Question

I want to get all tracks with 0 to 1 plays and am looking at the playback_count stats from http://api.soundcloud.com/tracks/90891876.json?client_id=XXX URL, where playback_count is included in the json response. We have almost 1500 sound snippets, is it possible to make a script that fetches this data ~1500 times or will I get throttled for spamming the connection to the API? We will only use this stats a couple of times to measure how our campaign is going trying to increase plays. Or is it possible to get this data in just one request?

Was it helpful?

Solution

I saw this question just earned the "Tumbleweed" badge and I felt bad.

If the tracks are all owned by the same user, you can use this endpoint:

http://api.soundcloud.com/users/{id}/tracks

If you just have a list of tracks, you can use this endpoint:

http://api.soundcloud.com/tracks?ids=123,234,765,456,etc

See the "filters" section of the docs here: http://developers.soundcloud.com/docs/api/reference#tracks

But keep in mind that although the HTTP spec does not impose a limit on the length of the querystring, the default apache settings will return an error somewhere around 4000 characters. That's probably around 400 tracks for this endpoint. Play around with it. Maybe soundcloud has a limit on the number of tracks per query.

OTHER TIPS

You could put your players embedded on a website (server) and track them with Analytics. I made a script for that: http://vitorventurin.com/tracking-soundcloud-with-google-analytics/

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