Blip.fm is often described as a twitter for music. Blip users post ‘blips’ to tracks – and as with Twitter, others can follow your Blips and listen to what you’ve posted. It’s micro-music-blogging. Now that Twitter has become so popular, there is a whole micro-economy built around Twitter – with multiple companies providing every different style of twitter client that you could possibly want, for just about any platform. Twitter has enabled this economy by providing a rich set of web services around their system that any client can tap into. Blip is hoping to do the same thing. They are providing a rich set of web services around their core that allows any third party to interact with the Blip service.
The current Blip web services are in private beta – and are likely to be extended and modified as the service matures. To use the web services you need to get an API key from blip.fm (via email). Despite the private beta nature of the API – there’s already quite a bit a functionality in the API. Here’s a quick rundown of what you can already do with the API:
- Post a blip
- Delete a blip
- Get a blip by ID
- Get all public blips that occurred over a range of time
- Search for by song or artist name
- User Related Blips
- Get blips for a user ordered by recency
- Get blips for users that a user is following
- Get a user’s playlist blips
- Get blips that have replies
- Get a user by name
- Get a user’s listeners
- Get a user’s preferences
- Get a user’s stats
- Give a user ‘props’
- Save a user’s preferences
- Sign up a new user
- Add a user as a ‘favorite’ dj
- add a blip to a user’s playlist
- remove a user as a a ‘favorite’ dj
- remove a blip from a user’s playlist
- Get a user’s favorite DJs
These services seem to be pretty all inclusive, covering every thing that any 3rd party client would want to do with the blip service.
The Blip services provide output in XML, JSON or serialized PHP. There’s a sample return for a getUserProfile request that returns my most recent blips at the end of this post.
Authentication – In general, any of the Blip web services that are related to a specific user require the call to be authenticated. Creating an authenticated call involves taking a hash of your blip secret key along with a few other fields (such as the timestamp) to create a signature that is appended to the request. (Does anyone else have problems trying to manage these secret keys in an open source project?, they really belong with the code, but if you check them into your open source code repository, they are not secret anymore!).
Terms-of-service – As far as I can tell, the Blip folks haven’t published a terms-of-service for the API. Not surprising since the API is still in private beta. Still, I like to know the rules of the road before I invest too much in an API. In particular, I’d like to know whether or not commercial use of the API is allowed. Blip does have rate limits – no more than one call every 30 seconds per API key for authenticated calls (there are some calls that are excluded from this rate limit).
Documentation – the documentation for the blip service is quite good for a private beta. I especially like the API Tool that lets you play with the API in the browser. They could improve the documentation a bit around what happens with failures – all they say for right now is Error message on failure – which is really not that helpful. In particular, it would be nice if they published a set of status codes that one could expect on error – so I can programmatically tell the difference between an authentication error (a user gave me the wrong password) and a rate limit exceeded error.
Sample Blip return XML <?xml version="1.0" encoding="UTF-8"?> <BlipApiResponse> <status> <code>200</code> <message>OK</message> <requestTime>1234265571</requestTime> <responseTime>1234265571</responseTime> <rateLimit>0</rateLimit> </status> <result> <total>2</total> <offset>0</offset> <limit>25</limit> <count>2</count> <collection> <Blip> <id>16946</id> <url>http://centralvillage.blogs.com/cv/files/vampireweekend_oxford_comma.mp3</url> <ownerId>37237</ownerId> <artist>Vampire Weekend</artist> <title>Oxford Comma</title> <insTime>2008-06-17 12:12:38</insTime> <message>vw</message> <unixTime>1213704758</unixTime> <toId /> <type>songUrl</type> <status>active</status> <reblipId /> <thumbplayLink /> <via /> <viaUrl /> <owner> <id>37237</id> <urlName>plamere</urlName> <profilePic>http://blip.fm/_/images/nousericon.gif</profilePic> <status>active</status> <propsCount>0</propsCount> <countryAbbr>us</countryAbbr> <name /> <website /> <timeZone>US/Pacific</timeZone> <lastBlipTime>0000-00-00 00:00:00</lastBlipTime> <insTime>2008-06-17 09:18:28</insTime> <updateTime>2009-02-05 12:40:39</updateTime> </owner> </Blip> <Blip> <id>16919</id> <url>http://www.notontheguestlist.com/MynameIsjonas.mp3</url> <ownerId>37237</ownerId> <artist>Weezer</artist> <title>My Name Is Jonas</title> <insTime>2008-06-17 09:19:26</insTime> <message>weezer in the morning</message> <unixTime>1213694366</unixTime> <toId /> <type>songUrl</type> <status>active</status> <reblipId /> <thumbplayLink /> <via /> <viaUrl /> <owner> <id>37237</id> <urlName>plamere</urlName> <profilePic>http://blip.fm/_/images/nousericon.gif</profilePic> <status>active</status> <propsCount>0</propsCount> <countryAbbr>us</countryAbbr> <name /> <website /> <timeZone>US/Pacific</timeZone> <lastBlipTime>0000-00-00 00:00:00</lastBlipTime> <insTime>2008-06-17 09:18:28</insTime> <updateTime>2009-02-05 12:40:39</updateTime> </owner> </Blip> </collection> </result> </BlipApiResponse>