SoundCloud API - genres and endpoint filter option / tracks

I am using the SoundCloud API for a web application. With the endpoint / tracks , I have two problems below.

1. When I send a request with invalid genre parameters, does the endpoint / track 503 (Service Unavailable) return?

When I intentionally use a condition that will not match the tracks with the q parameter , for example

http://api.soundcloud.com/tracks?q=ewkqtieorak&client_id=MY_CLIENT_ID&format=json&_status_code_map%5B302%5D=200 

the answers are an empty array, as I expect, but with a genres parameter like

 http://api.soundcloud.com/tracks?genres=hoge&client_id=MY_CLIENT_ID&format=json&_status_code_map%5B302%5D=200 

the answers are always 503 (I tried about 500 times).

The endpoint state / endpoint / track returns 503 so often even with existing genres that I'm not sure if this means that there are no such genres, or SoundCloud is having server problems. Are there any ways to distinguish them?


2. It appears that the filter parameter is not working properly.

The following are sample queries. I need stream tracks and added "streamable" as a filter parameter, but the response tracks include some unused tracks. Am I using it incorrectly?

 http://api.soundcloud.com/tracks?filter=streamable&genres=electronica&client_id=MY_CLIENT_ID&format=json 
 http://api.soundcloud.com/tracks?filter=streamable&order=hotness&genres=jazz%2Cclassical&bpm[from]=0&bpm[to]=100&created_at[from]=2011-11-24%2000%3A00%3A00&created_at[to]=2012-02-22%2000%3A00%3A00&limit=5&client_id=MY_CLIENT_ID&format=json&_status_code_map[302]=200 
 http://api.soundcloud.com/tracks?filter=streamable&order=hotness&genres=jazz%2Cclassical&bpm[from]=0&bpm[to]=100&created_at[from]=2012-01-03%2000%3A00%3A00&created_at[to]=2012-04-02%2000%3A00%3A00&limit=30&client_id=MY_CLIENT_ID&format=json&_status_code_map[302]=200 
+6
source share

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


All Articles