API reference

Build on the data Music24 runs on.

One API over Music24’s chart, playlist and follow data — the same endpoints the product itself calls. JSON in, JSON out, across every service Music24 tracks. Included with the Pro plan.

Start here

Overview

Every route lives under https://api.musicapi.com/trpc/. Each endpoint is a tRPC procedure reached over plain HTTP, so you need no client library: a GET reads, a POST writes, and both speak JSON. The API is included with the Pro plan.

  • Charts — the daily leaderboards: who is gaining, who is on top, which playlists are growing.
  • Details — one artist, track or playlist at a time, with its playlist history and visibility score.
  • Your data — what the authenticated user follows, plus their daily and weekly digest reports.
  • Insights — statistical signals on top of the daily data: acceleration and anomalies.

Prefer an AI client to a script? The same data is exposed over an MCP server that connects with OAuth instead of a personal access token.

Two hosts, one token. Everything documented here answers on https://api.musicapi.com. Tokens are minted in the Music24 app, which runs on its own host — nothing on this page lives there, so that host is not one you need to call. Your m24_ token works here from the moment it is created.
curl 'https://api.musicapi.com/trpc/artists.topGaining?input=%7B%22json%22%3A%7B%22limit%22%3A5%7D%7D' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx'
200 · application/json
{
  "result": {
    "data": {
      "json": {
        "artists": [
          {
            "artistMaid": "2ab91f6e-...",
            "mainArtistName": "Role Model",
            "imageUrl": "https://.../role-model.jpg",
            "addedToPlaylists": { "current": 0.42, "previous": 0.31 },
            "removedFromPlaylists": { "current": 0.02, "previous": 0.05 }
          }
        ],
        "pagination": { "limit": 5, "offset": 0 }
      }
    }
  }
}
Start here

Authentication

Send a personal access token in an Authorization header. There is no other mechanism — no query-string keys, no cookies, no basic auth. Both schemes are accepted: Token and Bearer behave identically.

Create a token in Settings → API access in the Music24 app. The plaintext is shown exactly once, at creation — Music24 stores only its hash — so write it down before you close the dialog. You can hold five active tokens; revoke one to make room for another.

Revocation is not instant everywhere. Revoking takes effect immediately against Music24’s own servers, but the API layer caches token lookups for five minutes. Assume a revoked token can still read for up to five minutes, and rotate rather than rely on revocation for an emergency.
Every request
Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx
Missing or revoked token
{
  "error": {
    "message": "UNAUTHORIZED",
    "code": -32001,
    "data": {
      "code": "UNAUTHORIZED",
      "httpStatus": 401,
      "path": "artists.topGaining"
    }
  }
}
Start here

Requests & responses

A query (any read) is a GET. Its arguments travel in an input query parameter as URL-encoded JSON, wrapped in { "json": … }:

GET /trpc/artists.topGaining?input=%7B%22json%22%3A%7B%22limit%22%3A5%7D%7D

A mutation (follow and unfollow) is a POST with the same { "json": … } shape as the request body and Content-Type: application/json.

Conventions worth knowing

  • Every success is wrapped identically: { "result": { "data": { "json": … } } }. Read through to json and ignore the envelope.
  • List endpoints page with limit and offset, and tell you where you are in a pagination or hasMore field.
  • Ids are opaque strings — maid for artists and tracks, playlistId for playlists. Store them as given.
  • Dates are ISO YYYY-MM-DD in UTC, and a date argument always means the day the data is for, not the day you asked.
Batching buys you nothing. tRPC can pack several procedures into one HTTP request, but the rate limit counts procedure calls, not requests. The examples here are unbatched, one call per endpoint, which is also the easiest shape to debug.
curl -X POST 'https://api.musicapi.com/trpc/artists.follow' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{"json":{"artistId":"2ab91f6e-..."}}'
200 · application/json
{
  "result": {
    "data": {
      "json": { "success": true, "message": "Successfully followed artist" }
    }
  }
}
The GET input parameter, decoded
{"json":{"limit":5}}
Start here

Errors

A failed call returns a non-2xx status and a single, consistent body. Branch on error.data.code — the string is stable. error.code is the JSON-RPC number tRPC maps it to, and error.message is written for engineers, not for your end users.

CodeWhen you see it
BAD_REQUESTHTTP 400 · -32600
The input failed validation — a missing argument, a wrong type, or malformed JSON.
UNAUTHORIZEDHTTP 401 · -32001
No token, an unparseable one, or a token that has been revoked.
FORBIDDENHTTP 403 · -32003
The token is valid but your plan does not allow the call — wrong plan, a date or offset past your history window, or no browse credits left.
NOT_FOUNDHTTP 404 · -32004
No artist, track or playlist with that id.
TOO_MANY_REQUESTSHTTP 429 · -32029
Over 30 requests in the last minute. The message names the seconds to wait.
INTERNAL_SERVER_ERRORHTTP 500 · -32603
Our fault. Retry a read; retry a follow/unfollow too — both are idempotent.
Error body
{
  "error": {
    "message": "Rate limit exceeded. Please try again in 60 seconds.",
    "code": -32029,
    "data": {
      "code": "TOO_MANY_REQUESTS",
      "httpStatus": 429,
      "path": "artists.topGaining"
    }
  }
}
Start here

Limits & credits

The rate limit is 30 requests per minute per user, whether you call the endpoints directly or go through an MCP tool: the two share one budget. Splitting work across several tokens does not buy headroom, because the limit is counted per user, not per token.

Two arguments are bounded by your plan rather than by the API. How far back date can go, and how deep offset pagination can reach, both depend on the plan you are on. Asking for a date or an offset past your limit returns FORBIDDEN, and the message names the limit you hit.

Looking up details for an artist, track or playlist you do not already follow spends one of your plan’s daily browse credits. Anything you follow is free to browse as often as you like — so if a job polls the same catalogue every day, follow it once from the app instead of paying a credit each morning.

Two credentials, two lifetimes. A personal access token lives until you revoke it (with the five-minute cache described under Authentication). An OAuth access token simply expires after an hour — revoke the connection in Settings to kill its refresh token sooner.
LimitValue
Plan
Pro. Tokens and MCP connections on any other plan are rejected.
Rate
30 requests per minute, per user — shared by the API and MCP.
History
How far back date may reach. Plan-dependent.
Pagination
How deep offset may reach. Plan-dependent.
Browse credits
Daily. Spent on anything you do not already follow.
Endpoints · Charts

Charts

Music24's daily leaderboards: who is gaining, who is on top, right now.

EndpointMethodWhat it returns
artists.topGaining
GET
Artists with the biggest playlist-add gains today.
artists.topOverall
GET
Artists ranked by total playlist visibility.
tracks.topGaining
GET
Tracks with the biggest playlist-add gains today.
tracks.topOverall
GET
Tracks ranked by total playlist visibility.
playlists.topByFollowers
GET
The largest playlists Music24 tracks, by follower count.
playlists.trending
GET
Playlists with the biggest follower-count gains today.
curl 'https://api.musicapi.com/trpc/playlists.trending?input=%7B%22json%22%3A%7B%22limit%22%3A3%7D%7D' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx'
200 · application/json
{
  "result": {
    "data": {
      "json": {
        "playlists": [
          {
            "playlistId": "b6b6a1e2-...",
            "name": "Rap Caviar",
            "curatorName": "Spotify",
            "followersGain": 18420,
            "position": 1,
            "integrationType": "spotify"
          }
        ],
        "pagination": { "offset": 0, "limit": 3 }
      }
    }
  }
}
Endpoints · Details

Details

One artist, track, or playlist at a time — profile plus history.

EndpointMethodWhat it returns
artists.details
GET
An artist's profile (name, image).
artists.positionChange
GET
An artist's chart-position history.
artists.playlistAdditions
GET
Playlists that added this artist recently.
artists.playlistAppearances
GET
Playlists this artist currently appears on.
artists.playlistScoreChart
GET
An artist's visibility score over time.
tracks.details
GET
A track's profile, including audio features.
tracks.positionChange
GET
A track's chart-position history.
tracks.playlistAdditions
GET
Playlists that added this track recently.
tracks.playlistAppearances
GET
Playlists this track currently appears on.
tracks.playlistScoreChart
GET
A track's visibility score over time.
tracks.recentPlaylistChanges
GET
Recent add/remove events across this track’s playlists.
playlists.details
GET
A playlist's profile (name, curator, followers).
playlists.songs
GET
The tracks currently on a playlist.
playlists.changes
GET
A single playlist’s track add/remove history.
playlists.followersTimeSeries
GET
A playlist's follower count over time.
curl 'https://api.musicapi.com/trpc/artists.details?input=%7B%22json%22%3A%7B%22artistId%22%3A%222ab91f6e-...%22%7D%7D' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx'
200 · application/json
{
  "result": {
    "data": {
      "json": {
        "maid": "2ab91f6e-...",
        "mainName": "Role Model",
        "imageUrl": "https://.../role-model.jpg"
      }
    }
  }
}
Endpoints · Your data

Your data

The artists, tracks, and playlists the authenticated user follows on Music24, plus that same user’s daily and weekly digest reports.

EndpointMethodWhat it returns
artists.followedArtists
GET
Followed artists, paginated, with images.
artists.listFollowed
GET
Followed artist ids only — fast, no stats.
artists.follow
POST
Follow an artist.
artists.unfollow
POST
Unfollow an artist.
tracks.followedTracks
GET
Followed tracks, paginated, with images.
tracks.listFollowed
GET
Followed track ids only — fast, no stats.
tracks.follow
POST
Follow a track.
tracks.unfollow
POST
Unfollow a track.
playlists.listFollowed
GET
Followed playlist ids.
playlists.follow
POST
Follow a playlist.
playlists.unfollow
POST
Unfollow a playlist.
reports.getMyDailyReport
GET
The caller's daily digest: top movers today vs. yesterday, plus the AI trends summary.
reports.getMyWeeklyReport
GET
The caller's weekly digest: top movers this week vs. last week.
curl 'https://api.musicapi.com/trpc/artists.followedArtists?input=%7B%22json%22%3A%7B%22limit%22%3A10%7D%7D' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx'
200 · application/json
{
  "result": {
    "data": {
      "json": {
        "artists": [
          { "id": 501, "maid": "2ab91f6e-...", "mainName": "Role Model", "imageUrl": "https://.../role-model.jpg" }
        ],
        "total": 37,
        "hasMore": true
      }
    }
  }
}
Endpoints · Insights

Insights

Statistical signals computed on top of the daily chart data.

EndpointMethodWhat it returns
insights.trendingUp
GET
Artists or tracks accelerating fastest right now.
insights.anomalies
GET
Artists or tracks with a statistically unusual jump.
curl 'https://api.musicapi.com/trpc/insights.trendingUp?input=%7B%22json%22%3A%7B%22entityType%22%3A%22artist%22%2C%22limit%22%3A3%7D%7D' \
  -H 'Authorization: Token m24_xxxxxxxxxxxxxxxxxxxxxxxx'
200 · application/json
{
  "result": {
    "data": {
      "json": {
        "rows": [
          {
            "date": "2026-08-28",
            "entityType": "artist",
            "id": "2ab91f6e-...",
            "name": "Role Model",
            "value": 41200,
            "pctChange7d": 0.18,
            "pctChange30d": 0.44
          }
        ],
        "hasMore": false
      }
    }
  }
}
AI clients

MCP server

Music24 runs a remote MCP server over Streamable HTTP at https://api.musicapi.com/mcp. Point any MCP-compatible client — Claude, Cursor or your own agent — at that URL and it connects with OAuth, not with a personal access token. Like the rest of the API, this needs the Pro plan.

The client discovers everything itself. It reads the two well-known endpoints, registers itself under RFC 7591 with no manual setup, then runs the standard authorization-code + PKCE (S256) flow requesting scope music24:read. A completed flow returns an access token good for one hour and a refresh token good for 30 days, rotating on use — the old refresh token dies the moment a new one is issued.

Tools

ToolWhat it does
music24_top_artists
Top artists on Music24's chart, overall or gaining.
music24_top_tracks
Top tracks on Music24's chart, overall or gaining.
music24_artist_details
An artist's profile plus playlist-addition and visibility stats.
music24_track_details
A track's profile plus playlist-addition and visibility stats.
music24_my_follows
The caller’s followed artists, tracks, and playlists.
music24_daily_report
Daily digest for the caller's follows, today vs. yesterday.
music24_weekly_report
Weekly digest for the caller's follows, this week vs. last.
music24_playlist_changes
Recent track add/remove events for one playlist, by id.

music24_playlist_changes is scoped to the one playlist you give it by id — it is not a feed across everything you follow. Call music24_my_follows first to get the ids worth asking about.

Log in before you connect. The consent screen that approves an MCP client needs an existing Music24 browser session. If you get signed out mid-flow, sign back in and start the connection again.
Server URL
https://api.musicapi.com/mcp
Discovery
GET https://api.musicapi.com/.well-known/oauth-protected-resource
  → points at the authorization server:
GET https://api.freeyourmusic.com/.well-known/oauth-authorization-server
Base URL · https://api.musicapi.com/trpcAuth · Authorization: Token m24_…Plan · Pro