# StableMusic – Top Artists for Tag

> StableMusic – Top Artists for Tag is a paid API for AI agents from stablemusic.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Returns the top artists associated with a given Last.fm tag, with pagination support.

## Facts

- Endpoint: POST https://stablemusic.dev/api/tags/top-artists
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablemusic-top-artists-for-tag-04518370
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yEW3obbplqvWOAoEfl_XV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stablemusic-top-artists-for-tag-04518370 -d '<json body>'
```

Example prompt: Can you find the top 20 artists tagged as 'indie rock' on Last.fm? Use StableMusic to pull the ranked list.

## When to prefer this

Use this endpoint when you need to discover or rank artists associated with a specific Last.fm tag or genre label, especially when building music recommendation flows, genre-based playlists, or artist discovery features powered by Last.fm's crowd-sourced tagging data.

## Known failure modes

- Artist name not found on Last.fm — returns empty or error response
- Misspelled artist name with autocorrect disabled — no results returned
- Page number exceeds available results — returns empty list
- Limit exceeds maximum of 100 — validation error
- Payment failure (x402) — request not processed
- Last.fm upstream outage — service unavailable error

## How this service works

Pay-per-request Last.fm music discovery for tags, tracks, artists, albums, charts, and country charts.

## Output

A ranked list of top artists associated with the given Last.fm tag, including artist names and associated metadata, with optional raw Last.fm response payload.

## Example request

```json
{
 "tag": "rock",
 "page": 1,
 "limit": 10,
 "artist": "The Beatles",
 "autocorrect": true,
 "include_raw": false
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tag": {
   "type": "string",
   "minLength": 1,
   "description": "Last.fm tag, genre, or category."
  },
  "page": {
   "type": "integer",
   "default": 1,
   "maximum": 9007199254740991,
   "minimum": 1,
   "description": "Last.fm page number. Defaults to 1."
  },
  "limit": {
   "type": "integer",
   "default": 10,
   "maximum": 100,
   "minimum": 1,
   "description": "Number of results to return. Defaults to 10, max 100."
  },
  "include_raw": {
   "type": "boolean",
   "default": false,
   "description": "Include the upstream Last.fm response payload."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablemusic-top-artists-for-tag-04518370/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablemusic.dev](https://www.zero.xyz/host/stablemusic.dev/llms.txt)
