soundcloud / api

A public repo for our Developer Community to engage about bugs and feature requests on our Public API
143 stars 22 forks source link

Endpoint /tracks changes without prior notice its behaviour -> 400 Bad Request #249

Open starfrosch opened 11 months ago

starfrosch commented 11 months ago

Title: Endpoint /tracks changes without priour notice its behaviour -> 400 Bad Request

Issue found of: July 14th, 2023

Endpoint(s):

Scope(s):

Steps to reproduce:

Pseudo Code
loop1
loop2
https://api.soundcloud.com/tracks?q=&license=to_share&duration[from]=180000&duration[to]=720000&created_at='.$date.'&limit=200&offset='.$offset.'';
offset = offset + 200
end loop1
date = date + 1
end loop2

Expected behaviour:

A list of 200 tracks licensed Creative Commons CC-BY and CC-BY-SA

Actual behaviour:

400 Bad Request

I used to fetch all Creative Commons shareable tracks from SoundCloud and iterated through them 200 tracks at the time (every day) from the last 30 days to create the Creative Commons #hot111 charts.

Since today, I haven't changed the code on my side, the /tracks endpoint returns a 400 Bad Request. Have you changed the API endpoint without prior notice? Checking with the Open API explorer I do no longer find the &license=to_share parameter, the &offset parameter is deprecated and the &q is mandatory. Did I miss something? This destroys my approach of creating the #hot111 charts. Any help or confirmation would be appreciated.

jal648 commented 11 months ago

I am also getting 400 Bad Request on the /tracks endpoint for some requests. It seems that any of the 'object' type params do not work. https://developers.soundcloud.com/docs/api/explorer/open-api#/search/get_tracks. ids, genres, tags, seem fine, but not bpm, duration, or created_at.

I've tried both the exploded style eg. bpm[from]=120 and bpm[to]=130, and also as a url encoded json object, bpm={"from": 120,"to":130} but neither works.

Seems like an issue on the API end of things?