API Directory › 🎬 Movies, TV & Music › MusicBrainz
No authHTTPSCORS

MusicBrainz API

Open music encyclopedia — artists, releases and recordings metadata.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open MusicBrainz docs ↗

What it does

MusicBrainz is an open music encyclopaedia: artists, release groups, releases, recordings, works, labels and the relationships between them, each with a stable MusicBrainz Identifier (MBID). It is the canonical source that many other music services build on.

Base URL

https://musicbrainz.org/ws/2

Authentication

None, but the rules are strict: 1 request/second maximum from a given source, and a descriptive User-Agent naming your app, its version and a contact URL/email. Add ?fmt=json for JSON (XML is the default).

Code examples

curl
curl -s "https://musicbrainz.org/ws/2/artist?query=artist:Radiohead&fmt=json&limit=1" \
  -H "User-Agent: larzos-demo/1.0 (https://larzos.com)"
Python (lookup with sub-queries)
import requests

H = {"User-Agent": "larzos-demo/1.0 (https://larzos.com)"}
mbid = "a74b1b7f-71a5-4011-9441-d0b5e4122711"  # Radiohead
r = requests.get(f"https://musicbrainz.org/ws/2/artist/{mbid}",
    params={"fmt": "json", "inc": "release-groups"}, headers=H, timeout=10)
for rg in r.json()["release-groups"][:5]:
    print(rg["first-release-date"], rg["title"])

Rate limits & quotas

Hard cap of 1 call/second per client on the public server; bursts get HTTP 503. There is no key and no paid tier — for higher throughput, replicate the database (dumps are published) or use the commercial mirror. Use inc= to pull related entities instead of many follow-up calls.

Key response fields

artists[] / releases[] / recordings[]Search results for that entity type
idThe MBID — the permanent identifier for the entity
score0–100 match score on search queries
release-groups[].first-release-dateOriginal release date
relations[]Links to other entities and external sites (with inc=url-rels)

Common errors

503Rate limit exceeded (over 1/s) or server busy — slow down.
400Malformed Lucene query in ?query= or an unknown inc value.
404No entity with that MBID.
(no User-Agent) 403Requests without a proper User-Agent are rejected.

When to use it (and alternatives)

Use it for authoritative music metadata, disambiguation and linking IDs across services. For album art, pair it with the Cover Art Archive (coverartarchive.org/release/{mbid}). For playable previews and popularity you need Spotify, Deezer or iTunes Search.

FAQ

What is an MBID?

A UUID that permanently identifies a MusicBrainz entity (artist, release, recording…). Store MBIDs rather than names — they are stable across renames and merges.

Why am I getting 503s?

You are exceeding one request per second, or not sending a proper User-Agent. Add a small delay between calls and set the header. There is no way to buy a higher limit on the public server.

How do I reduce the number of calls?

Use the inc parameter on a lookup to include release groups, recordings, relationships, tags and more in a single response instead of chaining requests.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related Movies, TV & Music APIs

← Back

More Movies, TV & Music APIs · All 196 APIs