The YES Developer API
You can do all sorts of things with the API - you can search for stations (by call letter, by location, by style of music etc.), find out what a particular station is playing, find out which artists or tracks are popular etc.
For instance, to find the stations near me I can just search using my zipcode:
http://api.yes.com/1/stations?loc=03064
This yields a bunch of json (JavaScript Object Notation) that describes the local radio stations.
The API lets you get all sorts of interesting data, including:
- The log of all songs played on any station in the last week
- The top songs on any station (based on plays or user voting)
- Overall popularity of a song or artist
- Related songs (based upon playlist co-occurrence)
Some more examples:
- Top tracks on local radio station WBCN
- All the songs played yesterday on WBCN.
- Info about 'stairway to heaven'.
- Songs 'related' to 'stairway to heaven' (there's more Eddie Money on this list than I would have expected).
The API is full featured, is very fast and seems quite solid. My biggest gripe is that it serves up JSON and not XML (which is what just about every other music api serves), so it means incorporating another parser in my code. The folks at YES are thinking about making an XML version, so even this gripe may be short-lived.
The API terms of use are quite reasonable - if you use their data on a web site, you must link back to YES.com. Commercial use is "available and often immediately granted by just ensuring proper linking."
This API has lots of data that hasn't been easily available before - data that can be used to enable music discovery, playlist generation, trend spotting. Well done to the Yes.com developers for providing such a clean and easy to use API - and well done to the Yes.com business folk who realize the value in making this data available. (And, by the way, the Yes.com site itself is pretty cool).
IMO, XML is extremely ill-suited for web APIs. JSON is amazing for Javascript implementation, and SOAP is better for just about everything else.
Posted by dt on November 24, 2008 at 09:41 AM EST #