Last.fm API: Get artist
Looks up a Last.fm artist by name and returns listening statistics, profile, top tracks and albums, similar artists, and upcoming events.
Unofficial. Not affiliated with or endorsed by Last.fm.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Artist, required
artist Artist or band name, such as Taylor Swift.
The xx
- Max Results optional
max_results Maximum items in each top tracks, top albums, and similar artists list, such as 10.
12
Whole number from 1 to 50. Default
10.
Input as JSON
{ "artist": "The xx", "max_results": 12}Output
{ "link": "https://www.last.fm/music/The%20xx" , "artist": "The xx", "short_bio": "The xx are an English alternative rock band from Wandsworth, London, formed in 2005. The band consists of Romy Madley Croft (guitar, vocals), Oliver Sim (bass guitar, vocals), Jamie Smith, also known as Jamie xx (beats, MPC, record production), and formerly Baria Qureshi (keyboard, guitar).", "genre_tags": [ "indie", "electronic", "british" ], "image_link": "https://lastfm-img.freetls.fastly.net/i/u/ar0/45cdc7157b9241f3855e81348c194842.jpg" , "top_albums": [ { "link": "https://www.last.fm/music/The+xx/xx" , "rank": 1, "title": "xx", "listener_count": 2106471 }, { "link": "https://www.last.fm/music/The+xx/Coexist" , "rank": 2, "title": "Coexist", "listener_count": 1011872 }, { "link": "https://www.last.fm/music/The+xx/I+See+You" , "rank": 3, "title": "I See You", "listener_count": 462844 } ], "top_tracks": [ { "link": "https://www.last.fm/music/The+xx/_/Intro" , "rank": 1, "title": "Intro", "listener_count": 1665392 }, { "link": "https://www.last.fm/music/The+xx/_/Crystalised" , "rank": 2, "title": "Crystalised", "listener_count": 1403472 }, { "link": "https://www.last.fm/music/The+xx/_/Islands" , "rank": 3, "title": "Islands", "listener_count": 1203669 } ], "listener_count": 2803528, "scrobble_count": 189821286, "similar_artists": [ { "link": "https://www.last.fm/music/Oliver+Sim" , "name": "Oliver Sim" }, { "link": "https://www.last.fm/music/Lykke+Li" , "name": "Lykke Li" }, { "link": "https://www.last.fm/music/alt-J" , "name": "alt-J" } ], "upcoming_events": [ { "city": "Mexico City", "date": "2026-11-20", "link": "https://www.last.fm/festival/5023242+Corona+Capital+2026" , "venue": "Autódromo Hermanos Rodríguez", "country": "Mexico", "event_name": "Corona Capital 2026" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"last.fm/get_artist","input":{"artist":"The xx","max_results":12}}' # 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/get_artist" , "input": { "artist": "The xx", "max_results": 12 }})# 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/get_artist" , "input": { "artist": "The xx", "max_results": 12 } }), 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/get_artist# with {"artist":"The xx","max_results":12}"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, such as Taylor Swift." }, "max_results": { "type": "integer", "default": 10, "maximum": 50, "minimum": 1, "description": "Maximum items in each top tracks, top albums, and similar artists list, such as 10." } }}Output schema
{ "type": "object", "required": [ "artist", "link", "image_link", "listener_count", "scrobble_count", "genre_tags", "short_bio", "top_tracks", "top_albums", "similar_artists", "upcoming_events" ], "properties": { "link": { "type": "string" }, "artist": { "type": "string" }, "short_bio": { "type": [ "string", "null" ] }, "genre_tags": { "type": "array", "items": { "type": "string" } }, "image_link": { "type": [ "string", "null" ] }, "top_albums": { "type": "array", "items": { "type": "object", "required": [ "rank", "title", "listener_count", "link" ], "properties": { "link": { "type": "string" }, "rank": { "type": "integer" }, "title": { "type": "string" }, "listener_count": { "type": [ "integer", "null" ] } }, "additionalProperties": false } }, "top_tracks": { "type": "array", "items": { "type": "object", "required": [ "rank", "title", "listener_count", "link" ], "properties": { "link": { "type": "string" }, "rank": { "type": "integer" }, "title": { "type": "string" }, "listener_count": { "type": [ "integer", "null" ] } }, "additionalProperties": false } }, "listener_count": { "type": [ "integer", "null" ] }, "scrobble_count": { "type": [ "integer", "null" ] }, "similar_artists": { "type": "array", "items": { "type": "object", "required": [ "name", "link" ], "properties": { "link": { "type": "string" }, "name": { "type": "string" } }, "additionalProperties": false } }, "upcoming_events": { "type": "array", "items": { "type": "object", "required": [ "date", "event_name", "venue", "city", "country", "link" ], "properties": { "city": { "type": [ "string", "null" ] }, "date": { "type": "string", "format": "date" }, "link": { "type": "string" }, "venue": { "type": [ "string", "null" ] }, "country": { "type": [ "string", "null" ] }, "event_name": { "type": "string" } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
last.fm/get_artist- Returns
- artist name, listeners, scrobbles, genre tags, bio, top tracks, top albums, similar artists, upcoming events
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/get_artist with the inputs above.
Ask your agent
- How many listeners and scrobbles does Radiohead have on Last.fm?
- Show me the genre tags and bio for Fleetwood Mac, plus their top 15 tracks.
- What are the top albums and similar artists to Daft Punk? Give me up to 8 of each.
- Any upcoming concerts or events listed for Tame Impala?
- On last.fm, pull up Kendrick Lamar's profile with his top 20 songs and similar artists.
See more
All Last.fm methodsFinds artists similar to a named artist on Last.fm, ordered by similarity. Similarity percentages are null because public pages do not show them.
last.fm/list_similar_artistsGets 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 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_tracksGets an Apple Music artist profile by name or artist link. The profile includes the latest release, top songs and albums.
music.apple.com/get_artistLooks 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_datesGet one artist's concert details and songs from setlist.fm by date or city. With only a city, returns the most recent matching concert there. Start times are local clock times because the pages do not supply a timezone.
setlist.fm/get_concert_setlistLists 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_songs