# Last.fm

> Look up artists, albums, and tracks on Last.fm, and read what a listener has been playing.

App · Music & Podcasts · 5 actions. Web page: https://docs.lodol.com/docs/integrations/lastfm

## Actions

### Get a user's recent tracks

List what a Last.fm user has scrobbled most recently, newest first, including anything playing right now.

**Inputs**

- Last.fm username (`username`, text, required): The Last.fm username to read, for example 'rj'.
- How many results (`limit`, number): How many results to return (1-200). From 1 to 200. Default: `20`.

**Outputs**

- `total_scrobbles` (number): How many tracks the user has scrobbled in total
- `tracks` (list): The user's recent scrobbles, newest first

**Example output**

```json
{
  "total_scrobbles": 84213,
  "tracks": [
    {
      "album": "OK Computer",
      "artist": "Radiohead",
      "image_url": "https://lastfm.freetls.fastly.net/i/u/64s/def.png",
      "name": "Paranoid Android",
      "now_playing": false,
      "played_at": "31 Jul 2026, 09:14",
      "url": "https://www.last.fm/music/Radiohead/_/Paranoid+Android"
    }
  ]
}
```

### Get a user's top artists

List a Last.fm user's most-played artists over a chosen period, most played first.

**Inputs**

- Last.fm username (`username`, text, required): The Last.fm username to read, for example 'rj'.
- Over what period (`period`, text): Which window to rank over. Defaults to all time. One of: `overall` (All time), `7day` (Last 7 days), `1month` (Last month), `3month` (Last 3 months), `6month` (Last 6 months), `12month` (Last 12 months). Default: `overall`.
- How many results (`limit`, number): How many results to return (1-200). From 1 to 200. Default: `20`.

**Outputs**

- `artists` (list): The user's top artists, most played first
- `period` (text): The window these rankings cover

**Example output**

```json
{
  "artists": [
    {
      "image_url": "https://lastfm.freetls.fastly.net/i/u/300x300/abc.png",
      "mbid": "a74b1b7f-71a5-4011-9441-d0b5e4122711",
      "name": "Radiohead",
      "playcount": 1842,
      "rank": 1,
      "url": "https://www.last.fm/music/Radiohead"
    }
  ],
  "period": "overall"
}
```

### Get album info

Look up an album's track listing, tags, artwork, and listener counts.

**Inputs**

- Artist (`artist`, text, required): The artist's name, for example 'Radiohead'.
- Album (`album`, text, required): The album title, for example 'OK Computer'.

**Outputs**

- `artist` (text): The artist who released it
- `image_url` (text): Link to the album artwork
- `listeners` (number): How many people have listened to it
- `mbid` (text): The album's MusicBrainz ID, when known
- `name` (text): The album title
- `playcount` (number): How many times it has been played
- `tags` (list): The genre tags listeners apply most
- `tracks` (list): The album's track listing, in order
- `url` (text): Link to the album's Last.fm page

**Example output**

```json
{
  "artist": "Radiohead",
  "image_url": "https://lastfm.freetls.fastly.net/i/u/300x300/def.png",
  "listeners": 1638274,
  "mbid": "0b6b4ba0-d36f-47bd-b4ea-6a5f91842d29",
  "name": "OK Computer",
  "playcount": 62847362,
  "tags": [
    "alternative",
    "rock",
    "britpop"
  ],
  "tracks": [
    {
      "duration": 284,
      "name": "Airbag",
      "rank": 1,
      "url": "https://www.last.fm/music/Radiohead/_/Airbag"
    },
    {
      "duration": 383,
      "name": "Paranoid Android",
      "rank": 2,
      "url": "https://www.last.fm/music/Radiohead/_/Paranoid+Android"
    }
  ],
  "url": "https://www.last.fm/music/Radiohead/OK+Computer"
}
```

### Get artist info

Look up an artist's biography, listener and play counts, tags, and similar acts.

**Inputs**

- Artist (`artist`, text, required): The artist's name, for example 'Radiohead'.
- Last.fm username (`username`, text): Optional. Include this user's own play count for the artist alongside the global figures.

**Outputs**

- `biography` (text): A short summary of the artist's biography
- `image_url` (text): Link to the artist's image
- `listeners` (number): How many people have listened to them
- `mbid` (text): The artist's MusicBrainz ID, when known
- `name` (text): The artist's name
- `playcount` (number): How many times their music has been played
- `similar_artists` (list): Names of artists Last.fm considers similar
- `tags` (list): The genre tags listeners apply most, for example 'alternative rock'
- `url` (text): Link to the artist's Last.fm page

**Example output**

```json
{
  "biography": "Radiohead are an English rock band from Abingdon, Oxfordshire, formed in 1985.",
  "image_url": "https://lastfm.freetls.fastly.net/i/u/300x300/abc.png",
  "listeners": 5920184,
  "mbid": "a74b1b7f-71a5-4011-9441-d0b5e4122711",
  "name": "Radiohead",
  "playcount": 605783246,
  "similar_artists": [
    "Thom Yorke",
    "Atoms for Peace",
    "Blur"
  ],
  "tags": [
    "alternative",
    "rock",
    "alternative rock",
    "indie"
  ],
  "url": "https://www.last.fm/music/Radiohead"
}
```

### Search tracks

Search Last.fm's catalogue for tracks by name, optionally narrowed to one artist.

**Inputs**

- Track title (`track`, text, required): The track title to search for, for example 'Creep'.
- Artist (`artist`, text): Optional. Only return tracks by this artist.
- How many results (`limit`, number): How many results to return (1-200). From 1 to 200. Default: `20`.

**Outputs**

- `total_results` (number): How many tracks match in total
- `tracks` (list): The matching tracks, most relevant first

**Example output**

```json
{
  "total_results": 4382,
  "tracks": [
    {
      "artist": "Radiohead",
      "image_url": "https://lastfm.freetls.fastly.net/i/u/64s/ghi.png",
      "listeners": 2418755,
      "name": "Creep",
      "url": "https://www.last.fm/music/Radiohead/_/Creep"
    }
  ]
}
```
