1

Is there a way to export all loved tracks from my LastFM user account into a new playlist on Spotify?

I found three non-satisfying online tools:

  • Spotibot is useless for my over 700 loved tracks.
  • LastFM-to-CSV includes unloved scrobble-d tracks.
  • lastexplort.py is not a WebApp.
  • The below suggested JavaScript Spreadsheet imports maximum 1000 loved tracks. This limitation doesn't allow me to import the oldest tracks from my lastfm tracklist.

The less favorised method is to edit the exported CSV scrobbles tracklist with a spreadsheet application, and then upload it to the WebApp called Playlist Converter. But, as I mentioned, this CSV list now contains all automatically scrobbled tracks - which mostly are not my loved tracks from LastFM.

3

So heres the solution - navigate to this page and create yourself an API key for free: https://www.last.fm/api/account/create

Then go to this sheet I made you - https://docs.google.com/spreadsheets/d/11n8fgt2Q9lo2w6VKylSg2uwyxsQ_GXzDw1OWAVl83Ms/edit#gid=0

The underlying magic is simply that I added the ImportJson script sourced from here https://github.com/bradjasper/ImportJSON/blob/master/ImportJSON.gs to the app script - which fetches the same api as your LastFM-to-CSV page - except it calls on the method that you actually want - which is loved tracks not recent tracks

Then paste your api key in cell F1 and put your username in cell B1 and voila - there you have a unique spreadsheet of the data.

You can then download or export as a csv which i suggest doing right away so you dont keep trying to fetch the API everytime you refresh the page.

enter image description here

| improve this answer | |
  • Thank you :) ..but I get this Error: Unknown function: 'ImportJSON'. This error already occured on google spreadsheet: stackoverflow.com/q/50982025/4287572 – gloschtla Jul 18 '18 at 16:05
  • did you make a full copy of my sheet or did you just copy the first page - because you need to include the importJSON script that is in the apps scrips @gloschtla – Aurielle Perlmann Jul 19 '18 at 3:13
  • I also copied the content of your excel sheet cell A2: =if(And(istext(B1),istext(F1)),unique(query(ImportJSON("http://ws.audioscrobbler.com/2.0/?method=user.getlovedtracks&user="&B1&"&api_key="&F1&"&format=json&limit="&D1), "Select Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8")),"Please enter your username in B1 and api key in F1") Only the correct script called ImportJSON.gs I could not find yet. Tools --> Script Editor --> Create Script --> But which script to insert here? I guess, not this one: lastfm_to_gmusic.py – gloschtla Jul 21 '18 at 19:59
  • no the ONLY script you need add under Tools > script editor > create script is this one: github.com/bradjasper/ImportJSON/blob/master/ImportJSON.gs – Aurielle Perlmann Jul 21 '18 at 21:49
  • Great, it works. But it imports only up to 1000 of the latest added tracks. This is less than one third of my collection of loved tracks :) – gloschtla Jul 22 '18 at 16:01
1

Spotlistr.com can do this, too.

| improve this answer | |
  • Hi Jeremy, I guess this answers the question to some extent but it would be better if you could expand it out with some instructions/screeenshots as to how you would do this. Thanks! – codingbadger Jan 10 at 7:45
  • As you can read on Spotlistr web service cannot a user's "LOVED" playlist, but only Similar Tracks, Top Tracks Similar, and Tag Top Tracks. – gloschtla Jan 10 at 20:25
  • @gloschtla Source? This would indicate otherwise ? spotlistr.com/search/lastfm-loved-tracks – codingbadger Jan 13 at 7:51
  • @codingbadger, this tool unly takes up-to 500 of my loved tracks on lastfm. – gloschtla Jan 30 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.