spotify - Spoitfy and Echo Nest API Mismatches, How to Fix? -
i using spotify , echo nest apis audio information songs. basic flow is:
- search song spotify's api using track title , artist name
- get spotify url track response
- query echo nest api audio summary, using spotify id
this has been working long time. in past few months have noticed more , more tracks cannot found in echo nest api given spotify id.
here's example today. sufjan stevens's track "chicago"
search on spotify.http://ws.spotify.com/search/1/track.json?q=artist:sufjan%20track:chicago first result gives spotify id: spotify:track:7bo0xlcxwx3pdhqwthqgaz
query echo nest spotify id: http://developer.echonest.com/api/v4/song/profile?api_key=v91crteb0ifmajbmb&track_id=spotify:track:7bo0xlcxwx3pdhqwthqgaz&bucket=audio_summary
(for url used example api key, can see result. of course in app using own api key.)
the response "the identifier specified not exist: spotifyv2-zz:track:spotify:track:7bo0xlcxwx3pdhqwthqgaz"
but echo nest does have track in database, because can search it, , spotify ids: http://developer.echonest.com/api/v4/song/search?api_key=v91crteb0ifmajbmb&format=json&results=1&artist=sufjan&title=chicago&bucket=id:spotify&bucket=tracks (but spotify id returned echo nest not same 1 returned spotify.)
is there way me fix this?
im noticing same issue- did use echo nest's search instead, allows both @ once. 1 less api call!
for track in search_tracks: results = nest.get('song/search', artist=track['artist'], title=track['title'], bucket='audio_summary') if results['songs']: tracks.append(results['songs'][0])
Comments
Post a Comment