API reference

Musicstax Public API

REST endpoints for popularity scores, audio features, and cross-platform social stats on the artists and tracks you've upgraded.

Base URL

https://metrics-api.musicstax.com

Auth header

X-API-Key

Format

application/json

Authentication

Include your API key on every request (except the two public demo endpoints below). Create a key from your dashboard once your trial period is over. Keys start with msx_live_ and are shown in full only once at creation.

Request header

NameInTypeDescription
X-API-KeyheaderstringYour Musicstax API key.

Example

curl https://metrics-api.musicstax.com/public/v1/artist/{uid}.json \
  -H "X-API-Key: msx_live_your_key_here"

Access control

Your key can only read data for artists you've upgraded, and tracks where at least one artist is yours. All other UIDs return 403 Forbidden.

Demo exceptions. Artist 4gzpq5DPGxSnKTe4SA8HAU and track 3AJwUDP919kvQ9QcozQPxg are publicly accessible for testing — no real key required. Demo key msx_demo_try_it_on_docs is for illustration only.

Interactive

Try it live

Send a real request to the demo artist or track. No account needed.

No auth required

Demo API key

Shown for illustration — not required for demo endpoints.

msx_demo_try_it_on_docs

Endpoint

uid=4gzpq5DPGxSnKTe4SA8HAU

Endpoints

Get artist

GET/public/v1/artist/{uid}.jsonX-API-Key required

Returns the latest snapshot for an upgraded artist: Spotify popularity, followers, monthly listeners, overall rank, and cross-platform social counts.

Parameters

NameInTypeDescription
uidpathstringSpotify artist ID.
lookbackqueryintegerDays of daily history to include in history (1–365). Omit for latest snapshot only.

Example request

GET /public/v1/artist/4gzpq5DPGxSnKTe4SA8HAU.json?lookback=7
X-API-Key: msx_live_...

Example response

200 OK
{
  "uid": "4gzpq5DPGxSnKTe4SA8HAU",
  "popularity": 98,
  "followers": 98123456,
  "monthlyListeners": 84200000,
  "overallRank": 3,
  "instagramFollowers": 281000000,
  "asOf": "2026-07-04",
  "history": [
    {
      "date": "2026-06-28",
      "popularity": 97,
      "followers": 97800000
    }
  ]
}

Get track

GET/public/v1/track/{uid}.jsonX-API-Key required

Returns popularity score, stream counts, and audio features for a track by one of your upgraded artists. Audio features are always the current snapshot; use lookback for historical popularity/streams only.

Parameters

NameInTypeDescription
uidpathstringSpotify track ID.
lookbackqueryintegerDays of daily history to include in history (1–365). Omit for latest snapshot only.

Example request

GET /public/v1/track/3AJwUDP919kvQ9QcozQPxg.json
X-API-Key: msx_live_...

Example response

200 OK
{
  "uid": "3AJwUDP919kvQ9QcozQPxg",
  "popularity": 87,
  "maxPopularity": 94,
  "streams": 512340987,
  "asOf": "2026-07-04",
  "audioFeatures": {
    "danceability": 62,
    "energy": 58,
    "tempo": 97,
    "keyFormatted": "C#/Db"
  }
}

Response schemas

Top-level fields are always returned when data exists. Platform-specific fields are omitted when not yet collected. With lookback, a history array is appended — one object per day, oldest first.

Artist object

FieldTypeDescription
uidstringSpotify artist ID.
popularityintegerSpotify popularity score (0–100).
followersintegerSpotify follower count.
monthlyListenersintegerSpotify monthly listeners.
overallRankintegerMusicstax overall artist rank.
instagramFollowersintegerInstagram follower count.
tikTokFollowersintegerTikTok follower count.
tikTokLikesintegerTikTok total likes.
deezerFansintegerDeezer fan count.
soundcloudFollowersintegerSoundCloud follower count.
youTubeMusicSubscribersintegerYouTube Music subscribers.
asOfstringDate of latest snapshot (yyyy-MM-dd).
historyHistoryPoint[]Present only when lookback is set.

Track object

FieldTypeDescription
uidstringSpotify track ID.
popularityintegerCurrent Spotify popularity (0–100).
maxPopularityintegerPeak popularity we have recorded.
streamsintegerLatest stream count.
asOfstringDate of latest snapshot (yyyy-MM-dd).
audioFeaturesobjectSpotify audio analysis (danceability, energy, tempo, key, etc.).
historyHistoryPoint[]Present only when lookback is set.

HistoryPoint object

FieldTypeDescription
datestringSnapshot date (yyyy-MM-dd).
popularityintegerPopularity on that date.
followersintegerArtist followers (artist history only).
monthlyListenersintegerArtist listeners (artist history only).
streamsintegerStream count (track history only).

Errors

Errors return a JSON body with an error string and the appropriate HTTP status.

StatusMeaning
400Invalid lookback value (must be 1–365).
401Missing, invalid, or ineligible API key.
403Artist or track not in your upgraded roster.
404Artist or track not found.
Error response
{
  "error": "You have not upgraded this artist."
}

Ready to integrate?

Create your API key and start pulling data for your upgraded catalogue.

Get your API key