Last.fm
App · Music & Podcasts · 5 actions
Look up artists, albums, and tracks on Last.fm, and read what a listener has been playing.
Actions
| Action | What it does |
|---|---|
| Get a user's recent tracks | List what a Last.fm user has scrobbled most recently, newest first, including anything playing right now. |
| Get a user's top artists | List a Last.fm user's most-played artists over a chosen period, most played first. |
| Get album info | Look up an album's track listing, tags, artwork, and listener counts. |
| Get artist info | Look up an artist's biography, listener and play counts, tags, and similar acts. |
| Search tracks | Search Last.fm's catalogue for tracks by name, optionally narrowed to one artist. |
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
usernametextRequired - The Last.fm username to read, for example 'rj'.
- How many results
limitnumber - How many results to return (1-200).From 1 to 200. Default:
20.
Outputs
total_scrobblesnumber- How many tracks the user has scrobbled in total
trackslist- The user's recent scrobbles, newest first
Example output
{
"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
usernametextRequired - The Last.fm username to read, for example 'rj'.
- Over what period
periodtext - 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
limitnumber - How many results to return (1-200).From 1 to 200. Default:
20.
Outputs
artistslist- The user's top artists, most played first
periodtext- The window these rankings cover
Example output
{
"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
artisttextRequired - The artist's name, for example 'Radiohead'.
- Album
albumtextRequired - The album title, for example 'OK Computer'.
Outputs
artisttext- The artist who released it
image_urltext- Link to the album artwork
listenersnumber- How many people have listened to it
mbidtext- The album's MusicBrainz ID, when known
nametext- The album title
playcountnumber- How many times it has been played
tagslist- The genre tags listeners apply most
trackslist- The album's track listing, in order
urltext- Link to the album's Last.fm page
Example output
{
"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
artisttextRequired - The artist's name, for example 'Radiohead'.
- Last.fm username
usernametext - Optional. Include this user's own play count for the artist alongside the global figures.
Outputs
biographytext- A short summary of the artist's biography
image_urltext- Link to the artist's image
listenersnumber- How many people have listened to them
mbidtext- The artist's MusicBrainz ID, when known
nametext- The artist's name
playcountnumber- How many times their music has been played
similar_artistslist- Names of artists Last.fm considers similar
tagslist- The genre tags listeners apply most, for example 'alternative rock'
urltext- Link to the artist's Last.fm page
Example output
{
"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
tracktextRequired - The track title to search for, for example 'Creep'.
- Artist
artisttext - Optional. Only return tracks by this artist.
- How many results
limitnumber - How many results to return (1-200).From 1 to 200. Default:
20.
Outputs
total_resultsnumber- How many tracks match in total
trackslist- The matching tracks, most relevant first
Example output
{
"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"
}
]
}