API music genre?

Does anyone know any music APIs that allow you to query for a song name and return a genre?

i.e. http://foo.bar/api/?song=Baby&artist=Justin+Bieber and do you have "Pop"?

I am building an application based on the only interesting feature of Prediction, but I need a genre to define some additional data!

+6
source share
5 answers

You can use the last.fm API: http://www.last.fm/api/show?service=356

The following is an example of the returned XML: http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=b25b959554ed76058ac220b7b2e0a026&artist=cher&track=believe

You should give him at least the name of the artist and track, and you will get the tags back, they are very similar to the 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, such as implementation, when you spelled the artist name incorrectly.

+14
source

You can watch EchoNest, but I don’t know if it will be useful to you: http://developer.echonest.com/docs/v4/song.html

+4
source

you can try last.fm api on request for a song and subsequently get information about the artist for the result of the request. artist-info contains not quite a genre, but a list of tags that will be used as categorization for the track

+3
source

Gracenote has a program for developers that provides genre information for artists and tracks https://developer.gracenote.com/

0
source

http://www.TheAudioDB.com can do this through their api

  http://www.theaudiodb.com/api/v1/json/{APIKEY}/searchtrack.php?s={Artist_Name}&t={Single_Name} 

Should provide you with a lot of information, including one genre.

0
source

Source: https://habr.com/ru/post/901709/


All Articles