/lastfm-latest-song

A simple api to grab the latest listened-to song from last.fm

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

lastfm-latest-song

This API is designed to return the last song that someone listened to, based on last.fm username.

It was designed for use on my site lukec.me - the code implementation of that is here.

Environment Variables

API_KEY - your last.fm API key

Response

The response is sent as a JSON object with the following parameters:

  • song - This is the title of the song you were last listening to.

  • artist - This is the first artist or band listed on the label. The order is generally up to the publisher.

Generally it will look something like this:

{
    "artist": "Arcade Fire",
    "song": "Suburban war"
}

Please let me know if you have any questions! Feel free to reach out via email at me@lukec.me.