When to use this API
When you need structured music metadata — artists, releases, recordings, labels, works, ISRCs, or the relationships between them. MusicBrainz is an open encyclopedia, not a streaming service: it gives you identifiers, discographies, member lists with instrument credits, and recording codes, not audio files. It is surprisingly good at disambiguation — multiple artists sharing the same name is a solved problem here, not a footnote — and its ISRC lookup turns an opaque 12-character code into a concrete recording title and length. For lyrics, audio, or real-time chart positions, look elsewhere.
Looking up an artist with their relationships
"Who was in Daft Punk and what did they play?" Every entity in MusicBrainz has a UUID called an MBID. Once you have it (from a search, or from another entity's relation), a single lookup with inc= gives you everything the bare response hides. Daft Punk's MBID is 056e4f3e-d505-4dad-8ec1-d04f521cbb56 — and the disambiguation field already tells you this is "French electronic duo", not some other act called Daft Punk.
curl "https://musicbrainz.org/ws/2/artist/056e4f3e-d505-4dad-8ec1-d04f521cbb56?fmt=json&inc=artist-rels+tags+ratings" | head -c 10000
{
"id": "056e4f3e-d505-4dad-8ec1-d04f521cbb56",
"name": "Daft Punk",
"sort-name": "Daft Punk",
"disambiguation": "French electronic duo",
"type": "Group",
"country": "FR",
"life-span": { "begin": "1993", "end": "2021-02-22", "ended": true },
"begin-area": { "name": "Paris", "iso-3166-2-codes": ["FR-75"] },
"area": { "name": "France", "iso-3166-1-codes": ["FR"] },
"rating": { "votes-count": 27, "value": 4.65 },
"tags": [
{ "name": "electronic", "count": 35 },
{ "name": "french house", "count": 13 },
{ "name": "house", "count": 16 },
{ "name": "disco", "count": 3 },
{ "name": "vocoder", "count": 2 }
],
"relations": [
{
"type": "member of band",
"direction": "backward",
"artist": { "name": "Thomas Bangalter", "type": "Person" },
"attributes": ["bass", "keyboard", "original", "synthesizer"],
"begin": "1993", "end": "2021-02-22", "ended": true
},
{
"type": "member of band",
"direction": "backward",
"artist": { "name": "Guy-Manuel de Homem-Christo", "type": "Person" },
"attributes": ["drums (drum set)", "guitar", "original", "synthesizer"],
"begin": "1993", "end": "2021-02-22", "ended": true
}
]
}
The relations array is where MusicBrainz earns its keep as an encyclopedia, not just a database. Each "member of band" relation carries an attributes list naming the specific instruments — Thomas Bangalter played bass, keyboard, and synthesizer; Guy-Manuel de Homem-Christo played drums, guitar, and synthesizer. The tags array is crowd-sourced genre metadata with vote counts, so "electronic" (35 votes) is more established than "vocoder" (2 votes). And life-span gives you the full arc: formed 1993, ended 2021-02-22, ended: true.
Daft Punk (MBID
056e4f3e-d505-4dad-8ec1-d04f521cbb56) was a French electronic duo from Paris, active 1993–2021. Thomas Bangalter played bass, keyboard, and synthesizer; Guy-Manuel de Homem-Christo played drums, guitar, and synthesizer. Their top community tags are electronic, house, and french house.
Searching for artists with Lucene filters
"Find the grunge band Nirvana from the US, not any other Nirvana." The query parameter on search endpoints supports Lucene syntax, and MusicBrainz has name-collision problems most music databases just ignore — there are at least five artists called "Nirvana". The country and disambiguation fields are how you tell them apart.
curl "https://musicbrainz.org/ws/2/artist?query=artist%3Anirvana+AND+country%3AUS&fmt=json&limit=10" | head -c 10000
{
"created": "2026-03-23T09:40:15.614Z",
"count": 5,
"offset": 0,
"artists": [
{
"id": "5b11f4ce-a62d-471e-81fc-a69a8278c7da",
"name": "Nirvana",
"sort-name": "Nirvana",
"disambiguation": "1980s-1990s US grunge band",
"country": "US",
"type": "Group",
"score": 100,
"begin-area": { "name": "Aberdeen" },
"tags": [
{ "name": "grunge", "count": 62 },
{ "name": "alternative rock", "count": 30 },
{ "name": "rock", "count": 20 }
],
"life-span": { "begin": "1987", "end": "1994-04-05", "ended": true }
},
{
"id": "c3a64a25-251b-4d03-afba-1471440245b8",
"name": "Approaching Nirvana",
"sort-name": "Approaching Nirvana",
"country": "US",
"type": "Group",
"score": 74
}
]
}
The score field ranges 0–100 and tells you how well each result matched — Nirvana the grunge band scored 100, while "Approaching Nirvana" scored 74. The disambiguation field ("1980s–1990s US grunge band") is MusicBrainz's answer to the name-collision problem: when multiple artists share a name, each gets a parenthetical that disambiguates them. The count field in the top-level response is the total matching results (5), not the number returned — use limit and offset to paginate.
The US-based grunge band Nirvana (MBID
5b11f4ce-a62d-471e-81fc-a69a8278c7da) formed in Aberdeen, Washington in 1987 and ended on April 5, 1994. MusicBrainz disambiguates them as "1980s–1990s US grunge band" to distinguish from other artists with the same name.
Resolving an ISRC to a recording
"What recording does the ISRC USAT29900609 identify?" The International Standard Recording Code is a 12-character identifier embedded in digital distribution metadata — every commercially released track has one, and it is globally unique. MusicBrainz is one of the few public APIs where you can resolve an ISRC directly to a recording.
curl "https://musicbrainz.org/ws/2/isrc/USAT29900609?fmt=json" | head -c 10000
{
"isrc": "USAT29900609",
"recordings": [
{
"id": "2cfad207-3f55-4aec-8120-86cf66e34d59",
"title": "Immigrant Song",
"length": 145666,
"disambiguation": "",
"video": false,
"first-release-date": "1970-10-05"
}
]
}
The length field is in milliseconds — 145666 ms is roughly 2 minutes and 25 seconds, which is correct for Led Zeppelin's "Immigrant Song". A single ISRC can map to multiple recordings when different masterings of the same track get separate codes; the recordings array will contain all of them. This endpoint is a quiet superpower: any time someone hands you an ISRC from distribution metadata or a PRO report, you can turn it into a concrete title and duration.
The ISRC USAT29900609 resolves to "Immigrant Song" — a 2:25 recording by Led Zeppelin, first released October 5, 1970 (MBID
2cfad207-3f55-4aec-8120-86cf66e34d59).
Pitfalls
fmt=jsonis not optional. Without it, MusicBrainz returns XML. Every request in this tutorial includes it; omit it and you get angle brackets instead of curly braces.- MBIDs are opaque UUIDs, not constructible. You cannot derive an artist's MBID from their name — you must search first, then use the
idfrom the result. Calling/artist/{made-up-uuid}returns 404, not an empty result. - Rate limit is 1 request per second with a required
User-Agentheader identifying your application. MusicBrainz will block IPs that exceed this. Include a contact URL or email in yourUser-Agent. - Search
countis total matches, not page size. A search returning"count": 266with"limit": 10has 266 total results across 27 pages. Useoffsetto paginate — do not assumecountis the length of the array you received.
One-line summary for the user
I can look up music metadata — artists, releases, recordings, ISRCs, and their relationships — from MusicBrainz in unauthenticated JSON requests, and it is uniquely good at disambiguating artists who share a name and resolving ISRC codes to concrete recordings.