Question

Is API returning incorrect values for Playback Count?

  • 18 January 2017
  • 5 replies
  • 668 views

code:
http://api.soundcloud.com/users/4521252/tracks.json?client_id=...

returns (this is a first array element, note keys with bold formatting)

[{"kind":"track","id":299399044,"created_at":"2016/12/24 06:33:38 +0000","user_id":4521252,"duration":2917497,"commentable":true,"state":"finished","original_content_size":117481781,"last_modified":"2017/01/02 14:27:00 +0000","sharing":"public","tag_list":"Neurofunk Eatbrain Podcast \"MC Fly DJ\" \"Contest Winner\" \"Eatbrain Contest\" \"Mind Vortex\" Pythius Neonlight Mefjus Hazard Misanthrop Signal Apex Prolix Gridlok \"The Clamps\" \"Bl4ck Owlz\" \"L 33\" Netsky Dimension Matrix Futurebound \"Sub Focus\" Friction \"The Prototypes\" \"Black Sun Empire\" \"State Of Mind\" \"The Upbeats\" Wilkinson","permalink":"eatbrain-podcast-045-by-mc-fly-dj","streamable":true,"embeddable_by":"all","downloadable":true,"purchase_url":null,"label_id":null,"purchase_title":null,"genre":"neurofunk","title":"EATBRAIN Podcast 045 by Mc Fly Dj","description":"The Eatbrain DJ Contest 2016 winner's mix is here! \n\n// artist\n@ mcflydj\nfacebook.com/McFlyDjTLC\n\n// label\nfacebook.com/Eatbra1n\ntwitter.com/eatbra1n\n\n// tracklist\nMind Vortex - Catapult // Ram Records\nPythius & Neonlight - Tarkin // Blackout\n--> Hazard - Bricks don't roll // Playaz\nMefjus & Misanthrop - Stutter // Critical Music \n--> War & Sk4nz - Bismuth // Metnem\nMind Vortex - Overture // Ram Records\n--> Signal - Indirect // Lifestyle Music\nApex - Same Old Blues // Lifted Music\n--> Prolix & Gridlok - Mode M // Project Trendkill\nThe Clamps & Bl4ck Owlz - Face Scraper // Eatbrain\nBmotion - Eutopia // Viper Recordings\n--> Logam & Mayhem - Centuria (Amoss Remix) // Santoku Records\nOriginal Sin - Red Mist // Viper Recordings\nL 33 - Clublife // Eatbrain\nNetsky ft. Jauz - Higher (The Prototypes Remix) // Hospital Records\nL 33 - Strange things // Eatbrain\n--> Vacuum - Fadeout // Animated\nDimension - Automatik // MTA Records\nMatrix & Futurebound - Glow Worm // Viper Recordings\nSub Focus - Deep Space // Ram Records\nFriction ft. Stylo G - Bring it Back (Tantrum Desire Remix) // Shogun Audio\nL Plus - Creatures Must Die // Technique Recordings\n--> Hazard - Time Tripping // Playaz\nThe Prototypes - Transmission // UKF\nBlack Sun Empire & State of Mind - Until the world Ends (Mind Vortex Remix) // Blackout\nEd Rush - Scarabs // Piranha Pool\nThe Upbeats - Dungeon // Vision\n--> Ruffstuff & Friller - Sleezy // Low Down Deep\nBlack Sun Empire & State of mind - Heresy // Blackout\nWilkinson - Half Light // Ram Records\nMefjus - Blitz // Neosignal\nInsideinfo, Mefjus & The Upbeats - Footpath // Virus Recordings\n--> ID - ID\nThe Clamps - Nerves // Trendkill\n--> Mohican Sun - Dead Sea // Integral Records\nNickbee - Third Entity // Invisible\nPhentix - Pitch Black // Cyberfunk\nDimension - International // MTA Records\nBreak & Total Science - Betamax // Symmetry Recordings\nVoltage - How it should be done // Co-lab\nScar - Caged // Metalheadz\n--> Voltage & Serum - Break it Down // Low Down Deep\nAdam F & Kokiri - Harmony (feat. Rae) (The Prototypes Remix)\nAudio - Headroom // Virus Recordings\n--> Bmotion - Ignition // Viper Recordings","label_name":"Eatbrain","release":null,"track_type":null,"key_signature":null,"isrc":null,"video_url":null,"bpm":null,"release_year":2016,"release_month":12,"release_day":24,"original_format":"mp3","license":"all-rights-reserved","uri":"https://api.soundcloud.com/tracks/299399044","attachments_uri":"https://api.soundcloud.com/tracks/299399044/attachments","permalink_url":"http://soundcloud.com/eatbrain/eatbrain-podcast-045-by-mc-fly-dj","artwork_url":"https://i1.sndcdn.com/artworks-000199921774-e31ve2-large.jpg","waveform_url":"https://w1.sndcdn.com/9kWhEu7FynXP_m.png","stream_url":"https://api.soundcloud.com/tracks/299399044/stream","download_url":"https://api.soundcloud.com/tracks/299399044/download","playback_count":264,"download_count":377,"favoritings_count":620,"comment_count":37,"user":{"id":4521252,"kind":"user","permalink":"eatbrain","username":"EATBRAIN","last_modified":"2016/12/24 06:49:32 +0000","uri":"https://api.soundcloud.com/users/4521252","permalink_url":"http://soundcloud.com/eatbrain","avatar_url":"https://i1.sndcdn.com/avatars-000215428769-ucvrv1-large.jpg","followers_count":34395,"followings_count":62,"public_favorites_count":30}},
{...}]


now, if permalink_url of the track from previous array is resolved using /resolve endpoint
code:
http://api.soundcloud.com/resolve?url=http://soundcloud.com/eatbrain/eatbrain-podcast-045-by-mc-fly-dj&client_id=...

API returns (note keys with bold formatting)

{"kind":"track","id":299399044,"created_at":"2016/12/24 06:33:38 +0000","user_id":4521252,"duration":2917497,"commentable":true,"state":"finished","original_content_size":117481781,"last_modified":"2017/01/02 14:27:00 +0000","sharing":"public","tag_list":"Neurofunk Eatbrain Podcast \"MC Fly DJ\" \"Contest Winner\" \"Eatbrain Contest\" \"Mind Vortex\" Pythius Neonlight Mefjus Hazard Misanthrop Signal Apex Prolix Gridlok \"The Clamps\" \"Bl4ck Owlz\" \"L 33\" Netsky Dimension Matrix Futurebound \"Sub Focus\" Friction \"The Prototypes\" \"Black Sun Empire\" \"State Of Mind\" \"The Upbeats\" Wilkinson","permalink":"eatbrain-podcast-045-by-mc-fly-dj","streamable":true,"embeddable_by":"all","purchase_url":null,"purchase_title":null,"label_id":null,"genre":"neurofunk","title":"EATBRAIN Podcast 045 by Mc Fly Dj","description":"The Eatbrain DJ Contest 2016 winner's mix is here! \n\n// artist\n@ mcflydj\nfacebook.com/McFlyDjTLC\n\n// label\nfacebook.com/Eatbra1n\ntwitter.com/eatbra1n\n\n// tracklist\nMind Vortex - Catapult // Ram Records\nPythius & Neonlight - Tarkin // Blackout\n--> Hazard - Bricks don't roll // Playaz\nMefjus & Misanthrop - Stutter // Critical Music \n--> War & Sk4nz - Bismuth // Metnem\nMind Vortex - Overture // Ram Records\n--> Signal - Indirect // Lifestyle Music\nApex - Same Old Blues // Lifted Music\n--> Prolix & Gridlok - Mode M // Project Trendkill\nThe Clamps & Bl4ck Owlz - Face Scraper // Eatbrain\nBmotion - Eutopia // Viper Recordings\n--> Logam & Mayhem - Centuria (Amoss Remix) // Santoku Records\nOriginal Sin - Red Mist // Viper Recordings\nL 33 - Clublife // Eatbrain\nNetsky ft. Jauz - Higher (The Prototypes Remix) // Hospital Records\nL 33 - Strange things // Eatbrain\n--> Vacuum - Fadeout // Animated\nDimension - Automatik // MTA Records\nMatrix & Futurebound - Glow Worm // Viper Recordings\nSub Focus - Deep Space // Ram Records\nFriction ft. Stylo G - Bring it Back (Tantrum Desire Remix) // Shogun Audio\nL Plus - Creatures Must Die // Technique Recordings\n--> Hazard - Time Tripping // Playaz\nThe Prototypes - Transmission // UKF\nBlack Sun Empire & State of Mind - Until the world Ends (Mind Vortex Remix) // Blackout\nEd Rush - Scarabs // Piranha Pool\nThe Upbeats - Dungeon // Vision\n--> Ruffstuff & Friller - Sleezy // Low Down Deep\nBlack Sun Empire & State of mind - Heresy // Blackout\nWilkinson - Half Light // Ram Records\nMefjus - Blitz // Neosignal\nInsideinfo, Mefjus & The Upbeats - Footpath // Virus Recordings\n--> ID - ID\nThe Clamps - Nerves // Trendkill\n--> Mohican Sun - Dead Sea // Integral Records\nNickbee - Third Entity // Invisible\nPhentix - Pitch Black // Cyberfunk\nDimension - International // MTA Records\nBreak & Total Science - Betamax // Symmetry Recordings\nVoltage - How it should be done // Co-lab\nScar - Caged // Metalheadz\n--> Voltage & Serum - Break it Down // Low Down Deep\nAdam F & Kokiri - Harmony (feat. Rae) (The Prototypes Remix)\nAudio - Headroom // Virus Recordings\n--> Bmotion - Ignition // Viper Recordings","label_name":"Eatbrain","release":null,"track_type":null,"key_signature":null,"isrc":null,"video_url":null,"bpm":null,"release_year":2016,"release_month":12,"release_day":24,"original_format":"mp3","license":"all-rights-reserved","uri":"https://api.soundcloud.com/tracks/299399044","user":{"id":4521252,"kind":"user","permalink":"eatbrain","username":"EATBRAIN","last_modified":"2016/12/24 06:49:32 +0000","uri":"https://api.soundcloud.com/users/4521252","permalink_url":"http://soundcloud.com/eatbrain","avatar_url":"https://i1.sndcdn.com/avatars-000215428769-ucvrv1-large.jpg"},"permalink_url":"https://soundcloud.com/eatbrain/eatbrain-podcast-045-by-mc-fly-dj","artwork_url":"https://i1.sndcdn.com/artworks-000199921774-e31ve2-large.jpg","stream_url":"https://api.soundcloud.com/tracks/299399044/stream","download_url":"https://api.soundcloud.com/tracks/299399044/download","playback_count":10064,"download_count":377,"favoritings_count":624,"reposts_count":142,"comment_count":39,"downloadable":true,"waveform_url":"https://w1.sndcdn.com/9kWhEu7FynXP_m.png","attachments_uri":"https://api.soundcloud.com/tracks/299399044/attachments"}

5 replies

Per http://status.soundcloud.com there have been some recent maintence changes regarding stats and play count.
Per http://status.soundcloud.com there have been some recent maintence changes regarding stats and play count.
Even though this may be the cause of the issue, I don't think it is, because I noticed this behaviour some time ago. First, I thought it was me who was doing something wrong, had no time to revise it. But today I managed to check my project and discovered what I posted above.
Hmm... try asking at http://stackoverflow.com/tags/soundcloud as I don't think much API support is provided here. Good luck!
Also check ---> "SoundCloud API - Playback Count is smaller than actual count" http://stackoverflow.com/questions/36393423/soundcloud-api-playback-count-is-smaller-than-actual-count
Also check ---> "SoundCloud API - Playback Count is smaller than actual count" http://stackoverflow.com/questions/36393423/soundcloud-api-playback-count-is-smaller-than-actual-count

I found some more info http://stackoverflow.com/questions/36976285/soundcloud-api-playback-count-different-than-on-website/36985629#36985629 but https://api-v2.soundcloud.com/users/1076327/tracks.json?client_id=... returns "Not found", and api-v2 shouldn't be used according to this http://stackoverflow.com/questions/37221510/is-soundcloud-api-v2-being-deprecated/37224955#37224955

It seems like the only way to get proper playback_count stats, when getting all tracks for a user by id, is to extract tracks' ids and query API /tracks endpoint separately for playback_count for each track.

Thank you.

Reply