Last.fm API

Now playing, recent scrobbles, listening stats, and profile info for any Last.fm user.

Use cases

  • Show what a user is currently listening to ("now playing")
  • Display recent scrobbles or top artists/tracks over a period
  • Pull a user's Last.fm profile and total playcount

Limits

API key requiredYes (Auralink API key with the "lastfm" scope)
Server setupThe server owner must set LASTFM_API_KEY (free from last.fm/api)
SourceOfficial Last.fm API
Periodsoverall, 7day, 1month, 3month, 6month, 12month
Rate limitStrict tier: 30 req/min

Parameters

user·stringreq

Last.fm username (for user/recent/nowplaying/top).

limit·integer

Items to return, 1–50 (default 10).

type·string

For /top: artists | tracks | albums (default artists).

period·string

For /top: overall | 7day | 1month | 3month | 6month | 12month.

artist·string

Artist name (for /track and /artist).

track·string

Track name (for /track).

Endpoints

GET/api/lastfm/nowplaying

What the user is currently scrobbling (or their most recent track)

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringuser (required)
GET/api/lastfm/recent

Recent scrobbles, flagged with now-playing where applicable

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringuser (required), limit (1–50, default 10)
GET/api/lastfm/user

Profile: playcount, country, registration date, avatar

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringuser (required)
GET/api/lastfm/top

A user's top artists, tracks, or albums over a period

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringuser (required), type (artists|tracks|albums), period (overall|7day|1month|3month|6month|12month), limit
GET/api/lastfm/track

Track metadata: listeners, playcount, tags, summary

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringartist (required), track (required)
GET/api/lastfm/artist

Artist metadata: listeners, playcount, tags, similar artists

AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringartist (required)

Example request

Request
{
  "method": "GET",
  "path": "https://api.auralink.dev/api/lastfm/nowplaying?user=rj",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  },
  "query": {
    "user": "rj"
  }
}