freeapis
Authentication
API Key
HTTPS
Yes
CORS
Unknown
Category
Music
Data source
public-apis + marcelscruz
Documentation / URL
https://www.last.fm/api

Overview

The Last.fm API serves music metadata — artists, albums, tracks, and user scrobbles. Public reads use an API key; user actions need a session token.

Note (verified 2026-08): invalid keys return HTTP 403 with {"message":"Invalid API key...","error":10} — not 401. Check the error code in the JSON.

Quick Start

Artist search (replace YOUR_KEY):

curl "https://ws.audioscrobbler.com/2.0/?method=artist.search&artist=queen&api_key=YOUR_KEY&format=json"
{
  "results": {
    "artistmatches": {
      "artist": [
        { "name": "Queen", "url": "https://www.last.fm/music/Queen", "image": [{ "#text": "https://..." }] }
      ]
    }
  }
}

Top tracks:

curl "https://ws.audioscrobbler.com/2.0/?method=chart.gettoptracks&api_key=YOUR_KEY&format=json"

Authentication

  • Register at last.fm/api → create an API account → API key.
  • Send it as the api_key parameter (format=json for JSON).
  • Invalid keys → 403 with error: 10 (verified).

Rate Limits & Notes

  • Free: ~5 requests/second per key (check docs); no paid requirement for reads.
  • Methods: artist.*, album.*, track.*, user.*, chart.*.
  • User scrobbling requires a session key from the auth flow.

FAQ

Is Last.fm API free? Yes — free key with rate limits.

Why 403 with error 10? Invalid API key returns 403 + error: 10 (verified).

How do I get user scrobbles? The auth flow gives a session key for user.* methods.

More in Music

APIAuthHTTPSCORS
7digital

Api of Music store 7digital

OAuthYesUnknown↗
AI Mastering

Automated Music Mastering

API KeyYesYes↗
AudD

Music recognition from audio files, URLs, and live streams

API KeyunknownUnknown↗
Audiomack

Api of the streaming music hub Audiomack

OAuthYesUnknown↗
Bandcamp

API of Music store Bandcamp

OAuthYesUnknown↗