Forums » General Discussion Search

Trying to retrieve tempo data with song ID (or artist/title) New Reply

Author Post
Posts: 2
Registered: May 28, 2010

I was able to make a simple beta (v4) search request to get a song ID from a search on artist and title. However, my attempts to retrieve tempo data with that ID are all failing. Should I be able to use a song ID returned from the v4 search method in a call to get_tempo in v3? Is there a way to get tempo data in a single search on artist and title without having to make a second call using the song ID?

Posts: 666
Registered: Sep 08, 2008

dbradly:

You can get the tempo data directly from the song/search call be adding the 'audio_summary' bucket like so:

http://beta.developer.echonest.com/api/v4/song/search?api_key=8TPE3VC60ODJTNTFE&format=xml&results=1&artist=radiohead&title=karma%20police&bucket=audio_summary

This returns song data that will include summary about the song audio:

{"response": {"status": {"version": "4.1", "code": 0, "message": "Success"}, "songs": [{"id": "SOBNAPI12812D05E98", "title": "Karma Police", "artist_id": "ARH6W4X1187B99274F", "artist_name": "Radiohead", "audio_summary": {"key": 7, "analysis_url": "https://echonest-analysis.s3.amazonaws.com:443/TR/TRBYCNQ127D51E6908/3/full.json?Signature=GPPK7kWJInkBWIpDqbzw%2Bo6KNoc%3D&Expires=1275044494&AWSAccessKeyId=AKIAJTEJGOTDLQY2E77A", "tempo":148.94399999999999, "mode": 1, "time_signature": 4, "duration": 264.14974999999998, "loudness": -9.2390000000000008}}]}}

Posts: 2
Registered: May 28, 2010

That worked great, thanks. Now I'm puzzled by the album/release. It doesn't look like the search api supports those parameters. How can I be sure I'm getting data about the correct version/recording of a song?

Posts: 666
Registered: Sep 08, 2008

dbradly - Right now, in the current version of the beta APIs, there is no way to disambiguate between different performances of tracks by the same artist. However, we will be adding support for doing this in the near future. You'll be able to qualify your searches with album/release info as well as take advantage of the Echo Nest Fingerprinter to identify the exact performance of any particular track.

Paul

Reply to this Thread

You must log in to post a reply.