BYTETOOLS

ListenBrainz API

Free open listening-data API with no key for reads: sitewide and per-user artist, release and recording charts linked to MusicBrainz identifiers. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the ListenBrainz API?

ListenBrainz is MetaBrainz's open alternative to proprietary scrobbling services, and its statistics endpoints are readable without a key. Sitewide charts return ranked artists with their listen counts and MusicBrainz identifiers.

Scrobbling data has historically been locked inside a single company's database. ListenBrainz was built to break that: listens are donated to a public, freely licensed dataset, and anyone can query the aggregates. The sitewide statistics used here are open reads with no key at all, which makes them straightforward to put on a dashboard.

The field that makes this more than a leaderboard is `artist_mbid`. Every ranked artist carries its MusicBrainz identifier, so you can join straight into the MusicBrainz database for discography, relationships, aliases and country of origin, or into Cover Art Archive for artwork — no fuzzy name matching, no ambiguity between the four bands called Nirvana. Note the `from_ts` and `to_ts` fields on the payload: they define the window the aggregate actually covers, which for `all_time` starts in 2002 and is not the same thing as "all music ever".

Quick facts

Base URL
https://api.listenbrainz.org/1
Authentication
No key for public statistics reads. Submitting listens or reading private user data needs a user token from a ListenBrainz account.
Rate limit
Published per response in `X-RateLimit-*` headers. Read them and back off rather than guessing.
Pricing
Free. The dataset is released under open licences by the MetaBrainz Foundation.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the ListenBrainz API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch the most-listened artists sitewide

GET https://api.listenbrainz.org/1/stats/sitewide/artists?count=3

curl
curl 'https://api.listenbrainz.org/1/stats/sitewide/artists?count=3'
JavaScript (fetch)
const res = await fetch("https://api.listenbrainz.org/1/stats/sitewide/artists?count=3");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.listenbrainz.org/1/stats/sitewide/artists?count=3", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "payload": {
    "artists": [
      {
        "artist_mbid": "a74b1b7f-71a5-4011-9441-d0b5e4122711",
        "artist_name": "Radiohead",
        "listen_count": 3137412
      },
      {
        "artist_mbid": "056e4f3e-d505-4dad-8ec1-d04f521cbb56",
        "artist_name": "Daft Punk",
        "listen_count": 2613498
      },
      {
        "artist_mbid": "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d",
        "artist_name": "The Beatles",
        "listen_count": 2608678
      }
    ],
    "count": 3,
    "from_ts": 1009843200,
    "last_updated": 1785148578,
    "offset": 0,
    "range": "all_time",
    "to_ts": 1785111505,
    "total_artist_count": 10644578
  }
}

Parameters

ParameterTypeRequiredDescription
countqueryOptionalHow many entries to return, up to 100. Defaults to 25. 3
offsetqueryOptionalHow many entries to skip, for paging through the chart. 0
rangequeryOptionalAggregation window: `this_week`, `week`, `month`, `year`, `all_time` and similar. all_time
(entity)pathOptionalSwap `artists` for `releases` or `recordings` on the same sitewide stats path. artists

Response fields

payload.artistsarray
Ranked artists, most listened first.
payload.artists[].artist_namestring
Artist name as credited.
payload.artists[].artist_mbidstring
MusicBrainz identifier — the join key into MusicBrainz and Cover Art Archive.
payload.artists[].listen_countinteger
Total listens recorded across all ListenBrainz users in the window.
payload.countinteger
Number of entries in this response, not the total available.
payload.total_artist_countinteger
How many distinct artists exist in the aggregate — the denominator for any percentage you compute.
payload.from_ts / to_tsinteger
Unix timestamps bounding the window. For `all_time` this starts at the project's own beginning, not the beginning of recorded music.
payload.last_updatedinteger
When the aggregate was last recomputed. Statistics are batch jobs, not live counters.
payload.rangestring
Echoes the window you asked for.
payload.offsetinteger
Echoes the offset, for paging.

What you can build with the ListenBrainz API

  • Build a listening-trends dashboard from openly licensed data
  • Join listen counts onto MusicBrainz metadata by MBID
  • Compare an artist's popularity across different time windows
  • Give users an open, exportable alternative to proprietary scrobble stats

Common errors and how to fix them

204 No Content

The requested window has no computed statistics yet.

Fix: This is a normal response, not an error. Fall back to a wider range such as `all_time`.

429

You exceeded the published rate limit.

Fix: Read the `X-RateLimit-Remaining` and `X-RateLimit-Reset-In` headers on every response and back off before you hit zero.

Counts differ from what you expected

These are aggregates over ListenBrainz users only, not global listening.

Fix: It is a sample of a self-selected community, so treat it as directional rather than as market share.

Numbers do not change between calls

Statistics are recomputed on a batch schedule.

Fix: Check `last_updated`. Polling more often than the recompute interval gains nothing.

ListenBrainz API — frequently asked questions

Is the ListenBrainz API free?

Yes. Public statistics need no key, and the underlying dataset is released under open licences by the MetaBrainz Foundation. Submitting your own listens requires a user token.

How does it relate to MusicBrainz?

Same foundation, complementary datasets. Every artist in the statistics carries its `artist_mbid`, so you can join straight into MusicBrainz for discography and relationship data without any name matching.

What does the all_time range actually cover?

It covers everything ListenBrainz has recorded since the project began, which the `from_ts` field makes explicit. It is not a history of music listening in general.

Can I get statistics for a single user?

Yes. Parallel endpoints under `/1/stats/user/{name}/` return the same shapes for one user, and are public when that user has not made their data private.

Tools that pair with this API

ListenBrainz is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.