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·stringreqLast.fm username (for user/recent/nowplaying/top).
limit·integerItems to return, 1–50 (default 10).
type·stringFor /top: artists | tracks | albums (default artists).
period·stringFor /top: overall | 7day | 1month | 3month | 6month | 12month.
artist·stringArtist name (for /track and /artist).
track·stringTrack name (for /track).
Endpoints
GET
/api/lastfm/nowplayingWhat 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/recentRecent 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/userProfile: playcount, country, registration date, avatar
AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringuser (required)
GET
/api/lastfm/topA 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/trackTrack metadata: listeners, playcount, tags, summary
AuthHeader: Authorization: Bearer YOUR_API_KEY
URL pathNo path parameters
Query stringartist (required), track (required)
GET
/api/lastfm/artistArtist 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"
}
}