Following the SoundCloud API Documentation at https://developers.soundcloud.com/docs/api/reference#tracks, I started to write an implementation of the SoundCloud API in one of my projects. I tried to get 50 tracks of a specific genre with a minimum length of 120000ms using this code:
def get_starttracks(genres="Rock"):
return client.get("/tracks", genres=genres, duration={
'from': 120000
}, limit='50')
SoundCloud responds with a valid list of tracks, but their durations don't match the given Filter.
Example:
print(get_starttracks(genres="Pop")[0].fields()['duration'])
> 30000
Is the api ignoring the 'duration'-parameter or is there an error in the filter inside of my code?
Ps.: Could be related to soundcloud search api ignoring duration filter?, if error isn't inside of the python code.