One Llama has developed core technologies for searching music related databases and for retrieving recommendations. These recommendations are currently based upon our collaborative filtering service, with acoustical similarity searching also available. The two methods can be used in tandem.
Searching The Radio One Llama Database
One Llama has developed a unique system for searching Internet Radio and developing station recommendations based on track, genre, popularity, and location. The process for accessing the Radio One Llama recommendations consist of a few steps using a standard HTTP/GET request technique with a few parameters.
- The first step is to get an list of artists, tracks, genres, or locations that you are searching for.
- The second step is to query the Radio One Llama algorithm to search for radio stations that are identified by the information retrieved during the first step.
One Llama has expressed its Internet Radio Application in software service APIs that can be easily integrated into almost any online environment. For a summary of One Llama's Internet Radio Search and Recommendation APIs follow this link:
http://www.onellama.com/webservices/v1/help
Search for Artists by Artist Name
Our first step is to get a list of artists that match 'U2'
http://www.onellama.com/webservices/v1/artist?artist_name=U2
The response:
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<artist_id>1528</artist_id>
<artist_name>U2</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>82091</popularity>
<mb_artist_id></mb_artist_id>
</item>
</items>
Stations by Artist
Now that we know the One Llama artist_id for U2, we can now query the API to get a list of stations that have played any U2 track. Those that have played it most recently are at the top.
http://www.onellama.com/webservices/v1/station?artist_id=1528&format=xml
The response (shortened to display better on this page):
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<station_id>63547</station_id>
<station_title>Planet Radio VR</station_title>
<description>Rock</description>
<streams>
<item>
<url>http://66.232.117.225:9100</url>
<bitrate>96000</bitrate>
</item>
</streams>
<shoutcast_number>440732</shoutcast_number>
<currentlyPlaying>
<track_id>6051890</track_id>
<track_title>Original of the Species</track_title>
<artist_id>1528</artist_id>
<artist_name>U2</artist_name>
<album_id>514856</album_id>
<album_title>2005-12-14: Savvis Center, St. Louis, MI, USA (disc 1)</album_title>
<album_art></album_art>
<num_minutes_since>4</num_minutes_since>
<music_brains_id>7321176</music_brains_id>
</currentlyPlaying>
<genres>
<item>
<genre_name>rock</genre_name>
<weight>100</weight>
</item>
<item>
<genre_name>pop</genre_name>
<weight>53</weight>
</item>
<item>
<genre_name>80s</genre_name>
<weight>36</weight>
</item>
<item>
<genre_name>70s</genre_name>
<weight>14</weight>
</item>
</genres>
</item>
</items>
Stations by Genre
Using the genre_name information from the previous query, we can now get additional stations in the same genre as the previous station.
http://www.onellama.com/webservices/v1/station?genre_name=rock
The response (shortened to display better on this page):
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<station_id>2025</station_id>
<station_title>=CRASH RADIO=</station_title>
<description>Rock</description>
<streams>
<item>
<url>http://66.252.20.196:8884</url>
<bitrate>24000</bitrate>
</item>
</streams>
<shoutcast_number>863159</shoutcast_number>
<currentlyPlaying>
<track_id>-1</track_id>
<track_title>Howard 100 [ LIVE ] - The Howard Stern Show</track_title>
<artist_id></artist_id>
<artist_name></artist_name>
<album_id></album_id>
<album_title></album_title>
<album_art></album_art>
<num_minutes_since>1</num_minutes_since>
<music_brains_id>-1</music_brains_id>
</currentlyPlaying>
<genres>
<item>
<genre_name>rock</genre_name>
<weight>100</weight>
</item>
</genres>
</item>
<item>
<station_id>72478</station_id>
<station_title>The Void</station_title>
<description>Various</description>
<streams>
<item>
<url>http://67.202.67.130:8004</url>
<bitrate>128000</bitrate>
</item>
</streams>
<shoutcast_number>232475</shoutcast_number>
<currentlyPlaying>
<track_id>-1</track_id>
<track_title>Hammerfall - Back To Back (Pretty Maids) - DJ MidniteRage @ The Void</track_title>
<artist_id></artist_id>
<artist_name></artist_name>
<album_id></album_id>
<album_title></album_title>
<album_art></album_art>
<num_minutes_since>3</num_minutes_since>
<music_brains_id>-1</music_brains_id>
</currentlyPlaying>
<genres>
<item>
<genre_name>rock</genre_name>
<weight>100</weight>
</item>
</genres>
</item>
</items>
Popular Artists
To find out the most popular artists being played on radio stations, query the API and specify the amount of minutes to look back on.
http://www.onellama.com/webservices/v1/artist?top&minutes=1440
The response (shortened to display better on this page):
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<artist_id>20575</artist_id>
<artist_name>The Beatles</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>4258</popularity>
<mb_artist_id></mb_artist_id>
</item>
<item>
<artist_id>9850</artist_id>
<artist_name>Madonna</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>3239</popularity>
<mb_artist_id></mb_artist_id>
</item>
<item>
<artist_id>933</artist_id>
<artist_name>Elvis Presley</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>3120</popularity>
<mb_artist_id></mb_artist_id>
</item>
<item>
<artist_id>95986</artist_id>
<artist_name>Rihanna</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>2746</popularity>
<mb_artist_id></mb_artist_id>
</item>
<item>
<artist_id>32175</artist_id>
<artist_name>Metallica</artist_name>
<artist_url></artist_url>
<artist_wiki_url></artist_wiki_url>
<artist_myspace_url></artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>2730</popularity>
<mb_artist_id></mb_artist_id>
</item>
</items>
Additional Artist Information
To get the discography, similar artists, genres, and additional artist information, query using the One Llama artist_id found on the search for Artist results.
http://www.onellama.com/webservices/v1/artist?artist_id=1528
The response (shortened to display better on this page):
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<artist_id>1528</artist_id>
<artist_name>U2</artist_name>
<artist_url>http://www.u2.com/</artist_url>
<artist_wiki_url>http://en.wikipedia.org/wiki/U2</artist_wiki_url>
<artist_myspace_url>http://www.myspace.com/u2</artist_myspace_url>
<artist_blog_url></artist_blog_url>
<popularity>82226</popularity>
<mb_artist_id>197</mb_artist_id>
<tags>
<item>irlandais</item>
<item>irlande</item>
<item>classic pop and rock</item>
<item>ireland</item>
<item>rock</item>
<item>irish</item>
</tags>
<genres>
<item>
<genre_name>rock</genre_name>
<weight>100</weight>
</item>
<item>
<genre_name>pop</genre_name>
<weight>89</weight>
</item>
<item>
<genre_name>80s</genre_name>
<weight>87</weight>
</item>
<item>
<genre_name>classic-rock</genre_name>
<weight>73</weight>
</item>
</genres>
<similar_artists>
<item>
<artist_id>11526</artist_id>
<artist_name>It Seemed Like Such a Good Idea</artist_name>
<popularity>0</popularity>
</item>
<item>
<artist_id>9850</artist_id>
<artist_name>Pay</artist_name>
<popularity>0</popularity>
</item>
<item>
<artist_id>6527</artist_id>
<artist_name>Winter Wind</artist_name>
<popularity>0</popularity>
</item>
<item>
<artist_id>20575</artist_id>
<artist_name>One Night In Venice: Second Act: Lasset die Andern tanzen da - Caramello! Schon wieder da</artist_name>
<popularity>0</popularity>
</item>
</similar_artists>
<albums>
<item>
<album_id>572211</album_id>
<album_title>U218 Singles (bonus disc: Vertigo//05: Live From Milan)</album_title>
<album_art>http://images.amazon.com/images/P/B000JJ4GW0.01.MZZZZZZZ.jpg</album_art>
<album_type>own</album_type>
<mb_album_id>567028</mb_album_id>
</item>
<item>
<album_id>149112</album_id>
<album_title>U218 Singles</album_title>
<album_art>http://images-eu.amazon.com/images/P/B000KEG8MK.02.MZZZZZZZ.jpg</album_art>
<album_type>own</album_type>
<mb_album_id>571220</mb_album_id>
</item>
<item>
<album_id>571810</album_id>
<album_title>U218 Singles</album_title>
<album_art>http://images.amazon.com/images/P/B000JJRINY.01.MZZZZZZZ.jpg</album_art>
<album_type>own</album_type>
<mb_album_id>568652</mb_album_id>
</item>
<item>
<album_id>454346</album_id>
<album_title>The Best of 1990-2000</album_title>
<album_art>http://images-eu.amazon.com/images/P/B00006LIRI.03.MZZZZZZZ.jpg</album_art>
<album_type>own</album_type>
<mb_album_id>564335</mb_album_id>
</item>
</albums>
</item>
</items>
Album Details
Once we have the One Llama album_id, we can query to get additional album information and track list.
http://www.onellama.com/webservices/v1/album?album_id=129960
The response:
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<album_id>129960</album_id>
<album_title>All That You Can't Leave Behind</album_title>
<album_art>http://images-eu.amazon.com/images/P/B00004ZE8D.02.MZZZZZZZ.jpg</album_art>
<artist_id>1528</artist_id>
<artist_name>U2</artist_name>
<review_url></review_url>
<album_wiki_url>http://en.wikipedia.org/wiki/All_That_You_Can%27t_Leave_Behind</album_wiki_url>
<release_date>2000-00-00</release_date>
<mb_album_id>18317</mb_album_id>
<mb_artist_id>197</mb_artist_id>
<tracks>
<item>
<track_id>5368967</track_id>
<track_title>Beautiful Day</track_title>
<mb_track_id>160245</mb_track_id>
</item>
<item>
<track_id>6724862</track_id>
<track_title>Stuck in a Moment You Can't Get Out Of</track_title>
<mb_track_id>160246</mb_track_id>
</item>
<item>
<track_id>5368968</track_id>
<track_title>Elevation</track_title>
<mb_track_id>160247</mb_track_id>
</item>
<item>
<track_id>5368969</track_id>
<track_title>Walk On</track_title>
<mb_track_id>160248</mb_track_id>
</item>
<item>
<track_id>5368970</track_id>
<track_title>Kite</track_title>
<mb_track_id>160249</mb_track_id>
</item>
<item>
<track_id>5368971</track_id>
<track_title>In a Little While</track_title>
<mb_track_id>160250</mb_track_id>
</item>
<item>
<track_id>5368972</track_id>
<track_title>Wild Honey</track_title>
<mb_track_id>160251</mb_track_id>
</item>
<item>
<track_id>5368973</track_id>
<track_title>Peace on Earth</track_title>
<mb_track_id>160252</mb_track_id>
</item>
<item>
<track_id>5368974</track_id>
<track_title>When I Look at the World</track_title>
<mb_track_id>160253</mb_track_id>
</item>
<item>
<track_id>5368975</track_id>
<track_title>New York</track_title>
<mb_track_id>160254</mb_track_id>
</item>
<item>
<track_id>5368976</track_id>
<track_title>Grace</track_title>
<mb_track_id>160255</mb_track_id>
</item>
<item>
<track_id>6724860</track_id>
<track_title>The Ground Beneath Her Feet</track_title>
<mb_track_id>160256</mb_track_id>
</item>
</tracks>
</item>
</items>