New Genre APIs
Today at the Echo Nest we are pushing out an update to our Genre APIs. The new APIs lets you get all sorts of information about any of over 800 genres including a description of the genre, representative artists in the genre, similar genres, and links to web resources for the genre (such as a wikipedia page, if one exists for a genre). You can also use the genres to create various types of playlists. With these APIs you build all sorts of music exploration apps like Every Noise At Once, Music Popcorn and Genre-A-Day.
The new APIs are quite simple to use. Here are a few python examples created using pyen.
List all of the available genres with a description
https://gist.github.com/plamere/8454130
This outputs text like so:
https://gist.github.com/plamere/8454170
We can get the top artists for any genre like so:
https://gist.github.com/plamere/8454269
Here are the top artists for 'cool jazz'
https://gist.github.com/plamere/5c7897563a09f22a3dd9
We can find similar genres to any genre with this bit of code:
https://gist.github.com/plamere/8454347
Sample output:
% python sim_genres.py cool jazz
bebop
jazz
hard bop
contemporary post-bop
soul jazz
big band
jazz christmas
stride
jazz funk
jazz fusion
avant-garde jazz
free jazz
We can use the genres to create excellent genre playlists. To do so, create a playlist of type 'genre-radio' and give the genre name as a seed. We've also added a new parameter called 'genre_preset' that, if specified will control the type of songs that will be added to the playlist. You can chose from core, in_rotation, and emerging. Core genre playlists are great for introducing a new listener to the genre. Here's a bit of code that generates a core playlist for any genre:
https://gist.github.com/plamere/8454435
The core classic rock playlist looks like this:
Simple Man by Lynyrd Skynyrd
Born To Be Wild by Steppenwolf
All Along The Watchtower by Jimi Hendrix
Kashmir by Led Zeppelin
Sunshine Of Your Love by Cream
Let's Work Together by Canned Heat
Gimme Shelter by The Rolling Stones
It's My Life by The Animals
30 Days In The Hole by Humble Pie
Midnight Rider by The Allman Brothers Band
The Joker by Steve Miller Band
Fortunate Son by Creedence Clearwater Revival
Black Betty by Ram Jam
Heart Full Of Soul by The Yardbirds
Light My Fire by The Doors
The 'in rotation' classic rock playlist looks like this:
Heaven on Earth by Boston
Doom And Gloom by The Rolling Stones
Little Black Submarines by The Black Keys
I Gotsta Get Paid by ZZ Top
Fly Like An Eagle by Steve Miller Band
Blue On Black by Kenny Wayne Shepherd
Driving Towards The Daylight by Joe Bonamassa
When A Blind Man Cries by Deep Purple
Over and Over (Live) by Joe Walsh
The Best Is Yet To Come by Scorpions
World Boss by Gov't Mule
One Way Out by The Allman Brothers Band
Corned Beef City by Mark Knopfler
Bleeding Heart by Jimi Hendrix
My Sharona by The Knack
While the emerging 'classic rock' playlist looks like this:
If You Were in Love by Boston
Beggin' by Shocking Blue
Speak Now by The Answer
Mystic Highway by John Fogerty
Hell Of A Season by The Black Keys
No Reward by Gov't Mule
Pretty Wasted by Tito & Tarantula
The Battle Of Evermore by Page & Plant
I Got All You Need by Joe Bonamassa
What You Gonna Do About Me by Buddy Guy
I Used To Could by Mark Knopfler
Wrecking Ball by Joe Walsh
The Circle by Black Country Communion
You Could Have Been a Lady by April Wine
15 Lonely by Walter Trout
The new Genre APIs are really quite fun to use. I'm looking forward to seeing a whole new world of music exploration and discovery apps built around these APIs.