Last.fm API: List similar artists
Finds artists similar to a named artist on Last.fm, ordered by similarity. Similarity percentages are null because public pages do not show them.
Unofficial. Not affiliated with or endorsed by Last.fm.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Artist, required
artist Artist or band name, for example Radiohead.
Daft Punk
- Max Results optional
max_results Most similar artists to return, for example 20.
4
Whole number from 1 to 100. Default
20.
Input as JSON
{ "artist": "Daft Punk", "max_results": 4}Output
{ "artists": [ { "genre_tags": [ "electronic", "french", "electro" ], "image_link": "https://lastfm-img.freetls.fastly.net/i/u/300x300/c6b7f7341be1a9e2ae68a76b0b70e66d.jpg" , "artist_name": "Justice", "last_fm_link": "https://www.last.fm/music/Justice" , "listener_count": 2888080, "similarity_percent": null }, { "genre_tags": [ "house", "electronic", "dance" ], "image_link": "https://lastfm-img.freetls.fastly.net/i/u/300x300/b1cb5257d113cf2f62031c3dc2c76f98.jpg" , "artist_name": "Modjo", "last_fm_link": "https://www.last.fm/music/Modjo" , "listener_count": 1726073, "similarity_percent": null }, { "genre_tags": [ "house", "electronic", "dance" ], "image_link": "https://lastfm-img.freetls.fastly.net/i/u/300x300/983b09e46b5cfee7184bf164a808f5e2.jpg" , "artist_name": "Stardust", "last_fm_link": "https://www.last.fm/music/Stardust" , "listener_count": 1251635, "similarity_percent": null } ], "matched_artist": "Daft Punk"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"last.fm/list_similar_artists","input":{"artist":"Daft Punk","max_results":4}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "last.fm/list_similar_artists" , "input": { "artist": "Daft Punk", "max_results": 4 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "last.fm/list_similar_artists" , "input": { "artist": "Daft Punk", "max_results": 4 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run last.fm/list_similar_artists# with {"artist":"Daft Punk","max_results":4}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "artist" ], "properties": { "artist": { "type": "string", "minLength": 1, "description": "Artist or band name, for example Radiohead." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Most similar artists to return, for example 20." } }}Output schema
{ "type": "object", "required": [ "matched_artist", "artists" ], "properties": { "artists": { "type": "array", "items": { "type": "object", "required": [ "artist_name", "similarity_percent", "listener_count", "genre_tags", "image_link", "last_fm_link" ], "properties": { "genre_tags": { "type": "array", "items": { "type": "string" } }, "image_link": { "type": [ "string", "null" ] }, "artist_name": { "type": "string" }, "last_fm_link": { "type": "string" }, "listener_count": { "type": [ "integer", "null" ] }, "similarity_percent": { "type": [ "number", "null" ], "description": "Similarity from 0 to 100 when shown, otherwise null." } }, "additionalProperties": false }, "description": "Artists in the order Last.fm lists them, most similar first." }, "matched_artist": { "type": "string", "description": "Name of the matched Last.fm artist." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
last.fm/list_similar_artists- Returns
- matched artist, similar artists with listener counts, genre tags, image and Last.fm link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method last.fm/list_similar_artists with the inputs above.
Ask your agent
- Find me 10 artists that sound like Phoebe Bridgers, with their listener counts and genre tags
- Who are the bands most similar to Tame Impala on Last.fm? Give me the top 25.
- I love Burial — what other artists should I check out? Include links and genres.
- Pull the Last.fm related-artist list for Fleetwood Mac, up to 50 names
- List artists comparable to Khruangbin ordered by how close they are, with images and listener numbers
See more
All Last.fm methodsLooks up a Last.fm artist by name and returns listening statistics, profile, top tracks and albums, similar artists, and upcoming events.
last.fm/get_artistLists a SoundCloud artist's public tracks in latest or SoundCloud popular order, with profile and track details. SoundCloud's popular list may contain fewer than 100 tracks (currently at most 30).
soundcloud.com/list_artist_tracksLists an artist's songs on Genius by popularity or newest release date, with featured artists, release dates, page views and song art. The artist can be given by name or by Genius artist link; dates or views may be unavailable.
genius.com/list_artist_songsLooks up an artist or band on MusicBrainz by name, optionally narrowed by country, and returns reference details, recorded members, aliases, genres and official links.
musicbrainz.org/get_artistGets an artist's upcoming concerts and tour dates on Songkick, optionally filtered by country, with ticket links and start times when listed.
songkick.com/get_artist_tour_datesGets an Apple Music artist profile by name or artist link. The profile includes the latest release, top songs and albums.
music.apple.com/get_artistGets a Spotify artist's public profile from their name, artist link or ID: listeners, followers, world rank, top cities, popular tracks, latest release and release counts.
open.spotify.com/get_artistLists an artist's albums, singles, EPs and compilations on Discogs, grouped by master release and ordered oldest first.
discogs.com/get_artist_discography