Get multiple songs by foreing_ids

47 views Asked by At

I'm building an spotify-echonest app using the web apis from both. I'm using spotify api to get as many songs as I can from user input, what I need now is to get information about these songs from echonest but as far as I can see you can only set one filter as foreing_id in the rest service.

http://developer.echonest.com/api/v4/artist/similar?api_key=YOUR_API_KEY&id=spotify:artist:4Z8W4fKeB5YxbusRsdQVPb&bucket=id:spotify

I'm using the Java API from Echonest, anyway any help is usefull.

1

There are 1 answers

0
kevguy On

You should query audio features from Spotify's Web API instead as Spotify doesn't support echonest anymore. I think you've already known how to get track IDs from the API, all you need to do is use the track IDs to query audio features.

Example:

Step 1: Get track id

curl -X GET "https://api.spotify.com/v1/search?q=track%3Anumb+artist%3Alinkin+park&type=track" -H "Accept: application/json"

Step 2: Get access token

curl H "Authorization: Basic YOUR_CLIENT_CREDENTIALS" -d grant_type=client_credentials https://accounts.spotify.com/api/token

Step 3: Get audio features

curl -X GET "https://api.spotify.com/v1/audio-features/YOUR_TRACK_ID" -H "Authorization: Bearer {YOUR_ACcess-TOKEN}"