Why is the limit of 'user.getLovedTracks' restricted to 50 Loved tracks?

  • 0
  • 2
  • Question
  • Updated 3 years ago
  • Answered
 It says in http://www.last.fm/api/show/user.getLovedTracks that the method gets the last 50 tracks loved by a user.  Why is it limited to 50 tracks? Is it related with privacy issues? Or is it possible to fetch more than 50 loved tracks? 
Photo of fooooooo

fooooooo

  • 19 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 0
  • 2
Photo of Jon

Jon, Community & Customer Services

  • 5077 Posts
  • 3739 Reply Likes
Hi,

As far as I know, this method is limited to 50 tracks per call, but not necessarily the last 50 tracks.  Thanks for pointing this out, the documentation should be updated to reflect this.

To get tracks 50 - 100, and beyond, use the parameter page and the page number you want to request.  totalPages and total should be returned as part of the response so you can work out how many iterations are required to get all loved tracks for a given user.

e.g.  ws.audioscrobbler.com/2.0/?method=user.getlovedtracks&user=rj&api_key=YOUR_API_KEY&format=json&page=2

Hope this helps!
(Edited)