Last.fm API: Sultan of Musical APIs

Ajay Ohri
Sep. 12 2012, 10:00AM EDT

We have listed 219 Mashups for the Last.fm API . But we do have 189 APIs related to music. Ladies and Gentlemen, is it too early to declare the emperor in musical APIs? After all, one developer's favorite API may be other developer's nightmare. Well , judging by it's popularity Last.fm sure is a sultan of swinging music APIs.

You can see all the extras built by the community at Build.Last.fm There are 49 tools for the Desktop, 93 mashups for the web, 19 social apps and 79 apps for submitting tracks (called Scrobblers). What exactly is scrobbling? Scrobbling is a way to send information about the music a user is listening to. A client is anything that plays music, such as desktop music players, mobile apps, websites, etc.

It is quite simple to craft REST calls to this API. The API root URL is located at http://ws.audioscrobbler.com/2.0/. The following parameters are required for all calls:

  • api_key : A Last.fm API Key
  • method : An API method expressed as package.method

The Radio API can also stream radio- though it is currently limited to paid subscribers of Last.fm. All tracks streamed are encoded as 128kbps mp3 files. You can also review the Playlists API.  The playlist.fetch method call is used to fetch XSPF playlists. XSPF is a web standard for sharable playlists.

Some small issues we noticed in the official beautifully and aesthetically designed API documentation-

  • lack of a console for easily crafting REST requests
  • lack of in-house support to libraries in Python , Javascript or other languages to create the requests.

We did find one Python library here but we are not sure if that is the best or the only Python library for Last.fm api .Again we were needed to Google for crafting API requests from Javascript. However  the github repository of last.fm is available here. We did notice some third-party things on the same here and there, but unlike other API documentation websites which kind of prominently point you to language support, we guess the last.fm API is doing rather well on its own.

Rock and roll! Music for all seasons. Just another API call away!

Ajay Ohri is the author of R for Business Analytics and likes to write on Enterprise ,Cloud and Statistical APIs with an emphasis on interviews. Follow Ajay on Google+ and connect on LinkedIn

Comments