Does anyone know of any Music APIs that let you query with a song name, and return a genre?
i.e. http://foo.bar/api/?song=Baby&artist=Justin+Bieber
and have the return be 'Pop'?
I'm making an app that relies on the sole interesting feature being Prediction, yet I need the Genre to determine some extra data!
You could use the last.fm API: http://www.last.fm/api/show?service=356
Here is an example of the XML returned: http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=b25b959554ed76058ac220b7b2e0a026&artist=cher&track=believe
You have to give it at least the artist and track name & you get tags back, these are very similar to genre but not the same, they are also created by users.
artist=cher&track=believe gives:
<toptags>
<tag>
<name>pop</name>
<url>http://www.last.fm/tag/pop</url>
</tag>
<tag>
<name>dance</name>
<url>http://www.last.fm/tag/dance</url>
</tag>
<tag>
<name>90s</name>
<url>http://www.last.fm/tag/90s</url>
</tag>
<tag>
<name>cher</name>
<url>http://www.last.fm/tag/cher</url>
</tag>
<tag>
<name>female vocalists</name>
<url>http://www.last.fm/tag/female%20vocalists</url>
</tag>
</toptags>
It has some great features like realising when you spelled an artist's name wrong.
You could look at EchoNest, but I don't know whether it will be useful to you: http://developer.echonest.com/docs/v4/song.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With