The Last.fm API provides rich music metadata from a 20+ year database of artist information, track metadata, album art, fan-curated tags, and music recommendations. Retrieve top tracks and albums for any artist, get personalized music stats (what users are listening to now), find similar artists, explore music recommendations by tag, and scrobble (record) user listening history. Loved by music apps, recommendation engines, and audio players.
https://ws.audioscrobbler.com/2.0
Auth type
API Key Header
Auth header
?api_key=YOUR_API_KEY&format=json
Rate limit
5 requests/sec (unofficial fair-use limit)
Pricing
Free tier available
Free quota
Unlimited requests (rate limits apply)
Documentation
https://www.last.fm/api
Endpoint status
Server online — HTTP 400 — server is online but path returned an error (may require auth)627ms
(checked Mar 29, 2026)
Builder score
B
73%
builder-friendly
Pass your API key as the api_key query parameter. User-write operations require OAuth-style session tokens. Register at last.fm/api/account/create.
?api_key=YOUR_API_KEY&format=json
The Last.fm API is free for non-commercial use. Commercial use requires a license agreement. Fair-use rate limits are enforced but not publicly published.
| Method | Path | Description |
|---|---|---|
| GET | ?method=artist.getinfo |
Get artist biography, tags, and listener stats |
| GET | ?method=artist.getSimilar |
Get artists similar to a given artist |
| GET | ?method=artist.getTopTracks |
Get the most popular tracks for an artist |
| GET | ?method=chart.getTopArtists |
Get the top artists chart globally |
| GET | ?method=tag.getTopTracks |
Get top tracks for a genre tag |
| GET | ?method=user.getRecentTracks |
Get a user's scrobble history |
curl "https://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=Radiohead&api_key=$LASTFM_API_KEY&format=json&limit=5"
{
"toptracks": {
"track": [{
"name": "Creep",
"playcount": "71234567",
"listeners": "3456789",
"artist": { "name": "Radiohead" },
"url": "https://www.last.fm/music/Radiohead/_/Creep"
}]
}
}
Data sourced from API Map. Always verify pricing and rate limits against the official Last.fm documentation.