user1347619
user1347619

Reputation: 21

Soundcloud - searching for more than term?

How do you do an OR search for multiple terms with the Soundcloud API?

Separating by comma seems to do an AND search:

e.g.

http://api.soundcloud.com/tracks.json?client_id=CLIENTKEY&q=chicago,parks&limit=50

On Google API you can use %7C to do an OR search but that doesn't seem to work with Soundcloud?

e.g. http://api.soundcloud.com/tracks.json?client_id=CLIENTKEY&q=chicago%7Cparks&limit=50

Thanks for any help.

Upvotes: 2

Views: 4183

Answers (1)

Hannes Tydén
Hannes Tydén

Reputation: 41

Currently it is not possible to do "OR" queries against the /tracks resource.

Our proposed solution is to do two request and combine the results and remove any duplicates.

http://api.soundcloud.com/tracks.json?client_id=CLIENTKEY&q=chicago&limit=50

http://api.soundcloud.com/tracks.json?client_id=CLIENTKEY&q=parks&limit=50

The combined result will of course not be ordered by the combined relevance of the two search terms, though you could take the duplicates and move them "on top" of the rest.

HTH Hannes

Upvotes: 4

Related Questions