# Last.fm API — artist, album and track listeners & scrobbles, tags, charts, similar artists, search and public user listening stats

> Search last.fm for artists, albums and tracks by name. `type=all` returns the search overview (artists with listeners, albums, tracks); `artists` / `albums` / `tracks` return that list alone (measured: up to 30 rows each; the site has no further pages — its `page` parameter returns the same rows, so none is offered). Every row's `url` feeds `artist` / `album` / `track`.
> ReefAPI engine `lastfm` · 30 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/lastfm/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/lastfm/v1/search — 1 credit
Search last.fm for artists, albums and tracks by name. `type=all` returns the search overview (artists with listeners, albums, tracks); `artists` / `albums` / `tracks` return that list alone (measured: up to 30 rows each; the site has no further pages — its `page` parameter returns the same rows, so none is offered). Every row's `url` feeds `artist` / `album` / `track`.

**Parameters:**
- `query` (string, required) — Words to search for.
- `type` (enum, optional, default "all") — Which list to return. Singular spellings are accepted. [one of: all, artists, albums, tracks]

**Returns:** artists[]{name, url, listeners, image} + albums[]{name, url, artist, artist_url, image} + tracks[]{name, url, artist, artist_url, album, album_url, image, duration, duration_seconds, youtube_id, youtube_url} + count + duplicate_urls

**Example request body:**
```json
{
  "query": "radiohead",
  "type": "artists"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist — 1 credit
One artist's last.fm page: exact listener and scrobble totals, position in the global Top Artists chart, tags, bio summary, facts (years active, founded in / born), latest release, the track popular this week, top tracks (listeners in the last 7 days), top albums (all-time listeners), similar artists with listeners, the daily listening trend (about 6 months), photos and external links. Events: `artist_events`.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.

**Returns:** name, url, listeners, scrobbles, global_chart_position, image, photo_count, latest_release{}, popular_this_week{}, facts[]{label, value}, bio_summary, tags[]{name, url}, top_tracks_period, top_tracks[]{rank, name, url, listeners, album, album_url, youtube_id}, top_albums[]{name, url, listeners, release_date, track_count, image}, similar_artists[]{name, url, listeners, image}, listener_trend[]{date, listeners}, photos[], external_links[] + canonical_url

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/wiki — 1 credit
The full wiki (biography / album or track description) of an artist, album or track, with the artist factbox (years active, founded in, born, members) and edit history line. Give `artist` alone for the artist, add `album` or `track` for those. Other languages: `lang`.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `album` (string, optional) — Album name as on last.fm (required unless `url` is given).
- `track` (string, optional) — Track name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `lang` (enum, optional, default "en") — Wiki language edition; a missing edition returns `has_wiki: false`. [one of: en, de, es, fr, it, ja, pl, pt, ru, sv, tr, zh]

**Returns:** has_wiki, text, paragraphs[], facts[]{label, value, values[]}, members[], version, edited_by, edited_by_url, edited_at_text, lang + subject{artist, album, track}

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_top_tracks — 1 credit
An artist's tracks ranked by listeners in a time window, 50 per page. The site stops at page 10 (500 tracks); a later page returns `page_beyond_last`.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `period` (enum, optional, default "all") — Time window. Also accepts the official API spellings (7day, 1month, 3month, 6month, 12month, overall). [one of: 7d, 30d, 90d, 180d, 365d, all]
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{rank, name, url, listeners, album, album_url, image, youtube_id, youtube_url} + period + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead",
  "period": "all"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_albums — 1 credit
An artist's albums, 20 per page, by popularity (all-time listeners) or by release date, plus the site's 'Recently Popular' block (albums with the most listeners in the last 7 days — a different listener scope, kept apart).

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `order` (enum, optional, default "most_popular") [one of: most_popular, release_date]
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, artist, listeners, release_date, release_date_text, track_count, image} + recently_popular[] (page 1) + order + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_similar — 1 credit
Artists similar to this one (last.fm's similarity list), 10 per page, each with listeners, top tags and bio summary.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, listeners, tags[], bio_summary, image} + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/tags_of — 1 credit
All tags users gave an artist, album or track, most used first, each with the artists the tag is best known for ('Including …').

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `album` (string, optional) — Album name as on last.fm (required unless `url` is given).
- `track` (string, optional) — Track name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.

**Returns:** rows[]{name, url, including[], image} + subject{}

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_events — 1 credit
An artist's events (concerts, festivals): upcoming by default, or one past year (`year`). Each with date, venue, city/country, line-up and attendance counts. `years_with_events` lists the years the site has.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `year` (integer, optional) — A past year (e.g. 2025). Omit for upcoming events.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{event_id, url, title, date, performers[], venue, location, status, went_or_going, interested} + years_with_events[] + year + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_top_listeners — 1 credit
The last.fm users who listen to this artist the most (as published on the artist's Listeners page), with the track each one plays a lot.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.

**Returns:** rows[]{username, url, listens_to_a_lot, listens_to_a_lot_url, avatar}

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/artist_images — 1 credit
An artist's photo gallery on last.fm, 40 per page (image id, full-size image url, thumbnail, caption, which one is the preferred image).

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{image_id, url, image, thumbnail, caption, preferred} + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead"
}
```

### POST https://api.reefapi.com/lastfm/v1/shouts — 1 credit
Public comments ('shouts') on an artist, album, track, tag or user page, with author, time (ISO with the site's UTC offset), text, vote count and the replies under each, 50 top-level shouts per page, most voted or newest first.

**Parameters:**
- `artist` (string, optional) — Artist name (required unless `url` is given).
- `album` (string, optional) — Album name as on last.fm (required unless `url` is given).
- `track` (string, optional) — Track name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `tag` (string, optional) — A tag instead of an artist.
- `user` (string, optional) — A username instead of an artist.
- `sort` (enum, optional, default "popular") [one of: popular, newest]
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{shout_id, username, user_url, posted_at, posted_text, text, votes, url, avatar, reply_count, total_replies, replies[]{same fields, nested}} + sort + page + last_page + has_next

**Example request body:**
```json
{
  "url": "https://www.last.fm/music/Radiohead/OK+Computer"
}
```

### POST https://api.reefapi.com/lastfm/v1/album — 1 credit
One album: exact listeners and scrobbles, release date, number of tracks and total length, the tracklist (each track's duration and listeners), tags, wiki summary, similar albums with listeners, daily listening trend and the artist's external links.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `album` (string, optional) — Album name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.

**Returns:** name, url, artist, artist_url, listeners, scrobbles, image, release_date, release_date_text, track_count, length, length_seconds, facts[], wiki_summary, tags[], tracklist[]{rank, name, url, track_url, duration, duration_seconds, listeners, youtube_id}, similar_albums[]{name, url, artist, listeners, image}, listener_trend[], external_links[] + canonical_url

**Example request body:**
```json
{
  "artist": "Radiohead",
  "album": "OK Computer"
}
```

### POST https://api.reefapi.com/lastfm/v1/track — 1 credit
One track: exact listeners and scrobbles, duration, tags, wiki summary, the albums it is featured on (with listeners) and how many more there are, similar tracks, YouTube / Spotify / Apple Music links (Spotify track id included) and the daily listening trend.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `track` (string, optional) — Track name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.

**Returns:** name, url, artist, artist_url, listeners, scrobbles, duration, duration_seconds, image, facts[], wiki_summary, tags[], featured_on[]{name, url, artist, listeners, image}, featured_on_more_count, featured_on_total, similar_tracks[]{name, url, artist, album, youtube_id}, play_links{youtube_url, youtube_id, spotify_url, spotify_id, apple_music_url}, listener_trend[], external_links[] + canonical_url

**Example request body:**
```json
{
  "artist": "Radiohead",
  "track": "Creep"
}
```

### POST https://api.reefapi.com/lastfm/v1/track_albums — 1 credit
Every album a track appears on (originals, compilations, live releases), 20 per page, most listened first.

**Parameters:**
- `artist` (string, required) — Artist name as written on last.fm (e.g. `Radiohead`, `AC/DC`, `Björk`), or the artist's last.fm URL. Case is corrected by the site (radiohead → Radiohead).
- `track` (string, optional) — Track name as on last.fm (required unless `url` is given).
- `url` (string, optional) — A last.fm URL (any row's `url` from another action); takes the place of the artist / album / track names.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, artist, listeners, release_date, track_count, image} + page + last_page + has_next

**Example request body:**
```json
{
  "artist": "Radiohead",
  "track": "Creep"
}
```

### POST https://api.reefapi.com/lastfm/v1/tag — 1 credit
A tag (genre) overview: wiki summary, its top artists, top albums (with listeners) and top tracks, and related tags.

**Parameters:**
- `tag` (string, required) — A last.fm tag (genre), e.g. `rock`, `hip-hop`, `turkish`, `90s`.

**Returns:** title, wiki_summary, top_artists[]{rank, name, url, listeners, image}, top_albums[]{rank, name, url, artist, listeners, image}, top_tracks[]{rank, name, url, artist, youtube_id}, related_tags[]{name, url}

**Example request body:**
```json
{
  "tag": "rock"
}
```

### POST https://api.reefapi.com/lastfm/v1/tag_artists — 1 credit
Top artists for a tag, 21 per page, each with listeners and bio summary.

**Parameters:**
- `tag` (string, required) — A last.fm tag (genre), e.g. `rock`, `hip-hop`, `turkish`, `90s`.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, listeners, bio_summary, image} + page + last_page + has_next

**Example request body:**
```json
{
  "tag": "rock"
}
```

### POST https://api.reefapi.com/lastfm/v1/tag_albums — 1 credit
Top albums for a tag, 20 per page, each with artist and listeners.

**Parameters:**
- `tag` (string, required) — A last.fm tag (genre), e.g. `rock`, `hip-hop`, `turkish`, `90s`.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, artist, artist_url, listeners, release_date, track_count, image} + page + last_page + has_next

**Example request body:**
```json
{
  "tag": "rock"
}
```

### POST https://api.reefapi.com/lastfm/v1/tag_tracks — 1 credit
Top tracks for a tag, 50 per page.

**Parameters:**
- `tag` (string, required) — A last.fm tag (genre), e.g. `rock`, `hip-hop`, `turkish`, `90s`.
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{rank, name, url, artist, artist_url, youtube_id, youtube_url} + page + last_page + has_next

**Example request body:**
```json
{
  "tag": "rock"
}
```

### POST https://api.reefapi.com/lastfm/v1/charts — 1 credit
last.fm's daily global charts page: Top Tracks, Top Artists, Top New Releases, Most Loved, and the 'Out Now' list of new releases with release dates. The page publishes ranks only (no counts); the weekly chart with listener and scrobble counts is `charts_weekly`.

**Parameters:** none

**Returns:** top_tracks[]{rank, name, url, artist, artist_url, image, youtube_id}, top_artists[]{rank, name, url, image}, top_new_releases[], most_loved[], out_now[]{name, url, artist, release_date, image}, out_now_range

### POST https://api.reefapi.com/lastfm/v1/charts_weekly — 1 credit
last.fm's weekly global Top Artists chart with each artist's listeners and scrobbles for the week and the movement (up / down) — 50 per page.

**Parameters:**
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{rank, name, url, listeners, scrobbles, change, image} + week + week_start + week_end + page + last_page + has_next

### POST https://api.reefapi.com/lastfm/v1/user — 1 credit
A public last.fm profile: total scrobbles, average per day, artists scrobbled, loved tracks, scrobbling since, display name, status labels, the top track, the most recent scrobbles, and the profile's top artists / albums / tracks in its default windows.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).

**Returns:** username, url, display_name, scrobbles, average_scrobbles_per_day, artists_count, loved_tracks_count, scrobbling_since, status_labels[], avatar, featured_track{}, recent_tracks[], top_artists[] + top_artists_period, top_albums[] + top_albums_period, top_tracks[] + top_tracks_period

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_recent_tracks — 2 credits
A user's latest 50 scrobbles with the time of each (UTC as the page shows it to a logged-out visitor) and whether the user loves the track. last.fm shows a logged-out visitor page 1 only (page 2 redirects to its login).

**Parameters:**
- `user` (string, required) — last.fm username (public profile).

**Returns:** rows[]{name, url, artist, artist_url, album, album_url, timestamp, timestamp_text, now_scrobbling, loved, image, youtube_id} + total (all scrobbles)

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_top_artists — 2 credits
A user's most-scrobbled artists in a time window with scrobble counts (50 rows; `all` also returns the number of artists scrobbled).

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `period` (enum, optional, default "all") — Time window. Also accepts the official API spellings (7day, 1month, 3month, 6month, 12month, overall). [one of: 7d, 30d, 90d, 180d, 365d, all]

**Returns:** rows[]{rank, name, url, scrobbles, image} + period + total

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_top_albums — 2 credits
A user's most-scrobbled albums in a time window with scrobble counts.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `period` (enum, optional, default "all") — Time window. Also accepts the official API spellings (7day, 1month, 3month, 6month, 12month, overall). [one of: 7d, 30d, 90d, 180d, 365d, all]

**Returns:** rows[]{rank, name, url, artist, artist_url, scrobbles, image} + period + total

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_top_tracks — 2 credits
A user's most-scrobbled tracks in a time window with scrobble counts.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `period` (enum, optional, default "all") — Time window. Also accepts the official API spellings (7day, 1month, 3month, 6month, 12month, overall). [one of: 7d, 30d, 90d, 180d, 365d, all]

**Returns:** rows[]{rank, name, url, artist, artist_url, scrobbles, image} + period + total

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_loved_tracks — 2 credits
Tracks a user has loved, newest first, with the date loved, 50 per page.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{name, url, artist, artist_url, album, album_url, timestamp, timestamp_text, image} + total + page + last_page + has_next

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_following — 2 credits
Users this user follows, 30 per page.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{username, url, display_name, about_me, avatar} + total + page + last_page + has_next

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_neighbours — 2 credits
Users last.fm lists as this user's musical neighbours (similar taste), as published on the profile (measured: 50 rows, one page).

**Parameters:**
- `user` (string, required) — last.fm username (public profile).

**Returns:** rows[]{username, url, about_me, avatar}

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_tags — 2 credits
Tags this user has applied, with how many times each was used, 50 per page.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{rank, name, url, uses} + page + last_page + has_next

**Example request body:**
```json
{
  "user": "RJ"
}
```

### POST https://api.reefapi.com/lastfm/v1/user_followers — 2 credits
Users who follow this user, 30 per page.

**Parameters:**
- `user` (string, required) — last.fm username (public profile).
- `page` (integer, optional, default 1) — Page number (1-based).

**Returns:** rows[]{username, url, display_name, about_me, avatar} + total + page + last_page + has_next

**Example request body:**
```json
{
  "user": "RJ"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=lastfm
- Human docs page: https://reefapi.com/docs/lastfm
- Overview page: https://reefapi.com/lastfm-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
