Has anybody tried scrobbling spinitron data to Last.fm?

Just something I was curious about. I thought it might be fun to make a last.fm account for our station. While I suppose I could technically just have a machine listen to it and scrobble icecast metadata all day with a media player, it looks like Last.fm supports scrobbling via POST requests. I thought I would ask if anybody’s tried, save myself some of the brain cells.

1 Like

Hi Hunter, thanks for joining the forum.

I don’t know if anybody has tried. I guess it’s very likely.

In all these years I have never understood what last.fm is for. It’s a bit like Twitter in that regard. I know that people use it but not why.

Anyway, we have APIs for that kind of thing. Perhaps Spinitron’s metadata push can be used. It can make POST HTTP requests. Failing that, or perhaps in combination to profit from the push efficiency, you could use the REST API to get data to post to last.fm.

Thanks Tom! Admittedly for a radio station in particular it seems pretty frivolous and would be somewhat duplicating what we’re already doing with spinitron, but it’s another platform to get us out there. I figure why not.

I was thinking the metadata push feature would be an elegant solution as well. I’ve used your api for our website and I’m fairly comfortable with how it functions, but unfortunately I haven’t found last.fm’s documentation to be as generous – I’ve searched pretty deep and had a hard time finding a nice “hello world” for “scrobbling” a song. I figured first I’d try metadata push to last.fm, if that fails maybe try a middle-man script receiving from the metadata push and sending off to last.fm… or maybe just shrug it all off and do the inelegant solution of running a media player on a machine somewhere that scrobbles our icecast metadata.

This is more of a curiosity than a priority, we were chatting about it in the college radio discord. I figured I’d float it out in case somebody’s already done it.

1 Like

Can you show what a POST to last.fm might be like. Maybe I can provide a HELO WORD on that basis.

That’s exactly what I’m trying to find myself :-\

These are the most helpful pages I’ve found

I was going to go ahead and just give a try and see what results, but I hadn’t made the station page yet when I posted this and still need to request API access.

This is working currently for me:

https://post.audioscrobbler.com/2.0/?method=track.scrobble&api_key=xxxx&artist=%an%&track=%sn%&album=%dn%&timestamp=%sp%

https://post.audioscrobbler.com/2.0/?method=track.scrobble&api_key=xxxx&artist=%an%&track=%sn%&album=%dn%&timestamp=%sp%
2 Likes

Thank you, Eric. That’s wonderful. And simple, which I like.

Amazing. Thanks, Eric!

Hmm, I get a code 200 when I look at the logs, looks OK but nothing happens. I tried logging into


https://www.last.fm/api/auth?token=(our api key)

but it said invalid API key. I’m guessing there’s another authentication step that I’m missing/bungling.

same here. Would really love to know what’s going wrong.

1 Like

Yeah, I never quite figured this out. I eventually just ran foobar with a last.fm plugin on silent listening to our stream and that worked well enough (doesn’t get album information though).

1 Like

I’ve no idea what LastFM is for and haven’t used it so I probably can’t help but did you try the URL that Eric described above?

Hi Hunter, I just got finished working on a Spinitron scrobbler that takes any Spinitron address and scrobbles the most recently played track to a last.fm account, continuously. If this is something you’re still looking for, SpinLast may be of interest. It’s open source, and any improvements or suggestions are welcome!

That looks awesome, Jack. It’s definitely pretty low on station priority (it’s basically only my own priority) but I’ll give a try at some point.

1 Like

Omg, thanks so much for asking this question. WKNC had a Lastfm for several years but it died in 2013… we’ve been talking about bringing it back, this would be a super fun project!

How are they scrobbling currently? I’ve been running SpinLast from @MxJackNelson but it frequently crashes/doesn’t run reliably for more than a few days at a time. Plus, we’d like to have “scrobbling now” data which SpinLast doesn’t provide (so that we can have a TV running Descent, like this: Descent)

Oops, meant that for @cowball

My partner set it up, not me, so if you have any questions, let me know and I can ask them.

GitHub: GitHub - elijahwe/wknc-scrobbler: Takes live track info from Spinitron and scrobbles to Last.fm

Our page: last.fm/user/wknc881

this is fantastic, thank you! got it working smoothly.

Please send our thanks for laying such a good foundation! Forked that and made some QOL updates that should hopefully make it easier for more stations to implement (namely, dockerizing the app to compartmentalization of dependencies and to allow it to automatically restart scrobbling upon restart).