API Doc

API Methods

user.getRecentTracks

Get a list of the recent tracks listened to by this user. Also includes the currently playing track with the nowplaying="true" attribute if the user is currently listening.

e.g. http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=rj&api_key=b25b959554ed76058...

Params

user (Required) : The last.fm username to fetch the recent tracks of.
limit (Optional) : An integer used to limit the number of tracks returned.
page (Optional) : An integer used to fetch a specific page of tracks
api_key (Required) : A Last.fm API key.

Auth

This service does not require authentication.

Sample Response

<recenttracks user="RJ" page="1" perPage="10" totalPages="3019">
  <track nowplaying="true">
    <artist mbid="2f9ecbed-27be-40e6-abca-6de49d50299e">Aretha Franklin</artist>
    <name>Sisters Are Doing It For Themselves</name>
    <mbid/>
    <album mbid=""/>
    <url>www.last.fm/music/Aretha+Franklin/_/Sisters+Are+Doing+It+For+Themselves</url>
    <date uts="1213031819">9 Jun 2008, 17:16</date>
    <streamable>1</streamable>
  </track>
  ...
</recenttracks>

Other Formats

Also available as a feed in rss format

e.g. http://ws.audioscrobbler.com/2.0/user/rj/recenttracks.rss

Errors

  • 2 : Invalid service -This service does not exist
  • 3 : Invalid Method - No method with that name in this package
  • 4 : Authentication Failed - You do not have permissions to access the service
  • 5 : Invalid format - This service doesn't exist in that format
  • 6 : Invalid parameters - Your request is missing a required parameter
  • 7 : Invalid resource specified
  • 9 : Invalid session key - Please re-authenticate
  • 10 : Invalid API key - You must be granted a valid key by last.fm
  • 11 : Service Offline - This service is temporarily offline. Try again later.
  • 12 : Subscription Error - The user needs to be subscribed in order to do that
  • 13 : Invalid method signature supplied
  • 18 : This user has no free radio plays left. Subscription required.