# MusicBrainz API

> MusicBrainz returns song identifiers and artist details, available as a workflow and API.

Get song identifiers finds a matching studio recording, its identifiers, and listed releases using a song title and artist. Get artist returns reference details and available links for an artist or band using its name, with an optional country to distinguish artists.

- Page: https://fous.com/workflows/musicbrainz
- Handle: `@musicbrainz`
- Category: [Entertainment](https://fous.com/workflows/category/entertainment)
- Source website: https://musicbrainz.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with MusicBrainz.

## Methods

### Get artist

Operation `get_artist`, version 1. 1 credit per call.

Get an artist or band’s reference details by name, optionally choosing a country. Includes recorded members and selected website, encyclopedia, social, and streaming links when available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `artist` | string | yes | `"Nirvana"` | Artist or band name, for example Nirvana. |
| `country` | string | no | `"US"` | Two-letter country code to distinguish artists with the same name, for example US. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "artist"
  ],
  "properties": {
    "artist": {
      "type": "string",
      "description": "Artist or band name, for example Nirvana.",
      "examples": [
        "Nirvana",
        "Björk"
      ]
    },
    "country": {
      "type": "string",
      "default": "",
      "examples": [
        "US"
      ],
      "description": "Two-letter country code to distinguish artists with the same name, for example US."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "artist": "Nirvana"
    },
    {
      "artist": "Nirvana",
      "country": "GB"
    },
    {
      "artist": "Björk"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `name` | string | `"Nirvana"` |  |
| `type` | string or null | `"Group"` |  |
| `gender` | string or null | `"Female"` |  |
| `genres` | array |  |  |
| `aliases` | array |  |  |
| `country` | string or null | `"US"` |  |
| `members` | array |  |  |
| `members[].link` | string | `"https://musicbrainz.org/artist/86d3f2c7-2a19-4249-ad7c-6feec74118d7"` |  |
| `members[].name` | string | `"Aaron Burckhard"` |  |
| `members[].years` | string or null | `"1987–1987"` |  |
| `members[].instruments` | array |  |  |
| `end_date` | string or null | `"1994-04-05"` |  |
| `home_area` | string or null | `"Aberdeen"` |  |
| `ipi_codes` | array |  |  |
| `begin_date` | string or null | `"1987"` |  |
| `isni_codes` | array |  |  |
| `official_links` | array |  |  |
| `official_links[].link` | string | `"https://music.amazon.com/artists/B001DTD5NQ"` |  |
| `official_links[].label` | string | `"Amazon Music"` |  |
| `musicbrainz_link` | string | `"https://musicbrainz.org/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da"` |  |
| `musicbrainz_artist_id` | string | `"5b11f4ce-a62d-471e-81fc-a69a8278c7da"` |  |

**Example input**

```json
{
  "artist": "Nirvana"
}
```

**Example output**

```json
{
  "name": "Nirvana",
  "type": "Group",
  "gender": null,
  "genres": [
    "acoustic rock",
    "alternative metal",
    "alternative pop"
  ],
  "aliases": [
    "Nirvana",
    "Nirvana US",
    "ニルヴァーナ"
  ],
  "country": "US",
  "members": [
    {
      "link": "https://musicbrainz.org/artist/86d3f2c7-2a19-4249-ad7c-6feec74118d7",
      "name": "Aaron Burckhard",
      "years": "1987–1987",
      "instruments": [
        "drums (drum set)"
      ]
    },
    {
      "link": "https://musicbrainz.org/artist/e2f28104-72bb-4c8f-b0f9-78d4eaf492fd",
      "name": "Chad Channing",
      "years": "1988–1990",
      "instruments": [
        "drums (drum set)"
      ]
    },
    {
      "link": "https://musicbrainz.org/artist/9b93a71b-1484-4bea-b096-f660c1161f8a",
      "name": "Dale Crover",
      "years": "1987–1990",
      "instruments": [
        "drums (drum set)"
      ]
    }
  ],
  "end_date": "1994-04-05",
  "home_area": "Aberdeen",
  "ipi_codes": [],
  "begin_date": "1987",
  "isni_codes": [
    "0000000123486830"
  ],
  "official_links": [
    {
      "link": "https://music.amazon.com/artists/B001DTD5NQ",
      "label": "Amazon Music"
    },
    {
      "link": "https://music.apple.com/us/artist/112018",
      "label": "Apple Music"
    },
    {
      "link": "https://nirvana.bandcamp.com/",
      "label": "Bandcamp"
    }
  ],
  "musicbrainz_link": "https://musicbrainz.org/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da",
  "musicbrainz_artist_id": "5b11f4ce-a62d-471e-81fc-a69a8278c7da"
}
```

### Get song identifiers

Operation `get_song_identifiers`, version 1. 1 credit per call.

Find the best-matching studio recording by song title and artist, with ISRCs, first release date, and up to 25 of its earliest listed releases. Release dates and some label, country, barcode, or format details may be incomplete in MusicBrainz.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `song` | string | yes | `"Smells Like Teen Spirit"` | Song title, for example Bohemian Rhapsody. |
| `artist` | string | yes | `"Nirvana"` | Performing artist, for example Queen. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "song",
    "artist"
  ],
  "properties": {
    "song": {
      "type": "string",
      "description": "Song title, for example Bohemian Rhapsody.",
      "examples": [
        "Smells Like Teen Spirit",
        "Bohemian Rhapsody"
      ]
    },
    "artist": {
      "type": "string",
      "description": "Performing artist, for example Queen.",
      "examples": [
        "Nirvana",
        "Queen"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "song": "Smells Like Teen Spirit",
      "artist": "Nirvana"
    },
    {
      "song": "Bohemian Rhapsody",
      "artist": "Queen"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `title` | string | `"Smells Like Teen Spirit"` | Recording title. |
| `artist` | string | `"Nirvana"` | Credited recording artist. |
| `length` | string or null | `"5:01"` | Recording length in minutes and seconds, for example 5:55. |
| `releases` | array |  | Up to 25 earliest releases carrying the recording, oldest first. |
| `releases[].date` | string or null | `"1991"` | Release date as listed; may be a year or year-month if incomplete. |
| `releases[].label` | string or null | `"Geffen"` |  |
| `releases[].format` | string or null | `"CD"` |  |
| `releases[].barcode` | string or null | `"720642442548"` |  |
| `releases[].country` | string or null | `"United States"` |  |
| `releases[].release_id` | string | `"1cf8a7f1-735a-4416-88ae-da9360b2871f"` |  |
| `releases[].release_title` | string | `"Earphoria"` |  |
| `releases[].musicbrainz_link` | string | `"https://musicbrainz.org/release/1cf8a7f1-735a-4416-88ae-da9360b2871f"` |  |
| `isrc_codes` | array |  | Official ISRC identifiers assigned to this recording. |
| `recording_id` | string | `"5fb524f1-8cc8-4c04-a921-e34c0a911ea7"` | MusicBrainz recording ID. |
| `musicbrainz_link` | string | `"https://musicbrainz.org/recording/5fb524f1-8cc8-4c04-a921-e34c0a911ea7"` | MusicBrainz recording page. |
| `first_release_date` | string or null | `"1991-09-10"` | First known release date (YYYY-MM-DD or year). |
| `length_milliseconds` | integer or null | `301133` | Recording length in milliseconds. |

**Example input**

```json
{
  "song": "Smells Like Teen Spirit",
  "artist": "Nirvana"
}
```

**Example output**

```json
{
  "title": "Smells Like Teen Spirit",
  "artist": "Nirvana",
  "length": "5:01",
  "releases": [
    {
      "date": "1991",
      "label": "Geffen",
      "format": "CD",
      "barcode": null,
      "country": "United States",
      "release_id": "1cf8a7f1-735a-4416-88ae-da9360b2871f",
      "release_title": "Earphoria",
      "musicbrainz_link": "https://musicbrainz.org/release/1cf8a7f1-735a-4416-88ae-da9360b2871f"
    },
    {
      "date": "1991",
      "label": "DGC Records, Stallions Records",
      "format": "Cassette",
      "barcode": "720642442548",
      "country": "Saudi Arabia",
      "release_id": "201d5e28-2de4-4e6f-830a-d55c98e57641",
      "release_title": "Nevermind",
      "musicbrainz_link": "https://musicbrainz.org/release/201d5e28-2de4-4e6f-830a-d55c98e57641"
    },
    {
      "date": "1991",
      "label": "BMG Direct Marketing, Inc., DGC Records",
      "format": "CD",
      "barcode": null,
      "country": "United States",
      "release_id": "347666eb-86f7-488a-a427-895f6f7ac203",
      "release_title": "Nevermind",
      "musicbrainz_link": "https://musicbrainz.org/release/347666eb-86f7-488a-a427-895f6f7ac203"
    }
  ],
  "isrc_codes": [
    "USGF19942501"
  ],
  "recording_id": "5fb524f1-8cc8-4c04-a921-e34c0a911ea7",
  "musicbrainz_link": "https://musicbrainz.org/recording/5fb524f1-8cc8-4c04-a921-e34c0a911ea7",
  "first_release_date": "1991-09-10",
  "length_milliseconds": 301133
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@musicbrainz",
  "visibility": "public",
  "operation": "get_artist",
  "version": 1,
  "input": {
    "artist": "Nirvana"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@musicbrainz\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_artist\",\n  \"version\": 1,\n  \"input\": {\n    \"artist\": \"Nirvana\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@musicbrainz",
  "visibility": "public",
  "operation": "get_artist",
  "version": 1,
  "input": {
    "artist": "Nirvana"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@musicbrainz","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Match songs to their ISRC identifiers
- Review a recording’s listed releases and dates
- Find reference details for an artist or band
- Collect available links for an artist

## FAQ

### Is Fous affiliated with MusicBrainz?

No. Fous is not affiliated with MusicBrainz. This workflow reads the public musicbrainz.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a MusicBrainz account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from musicbrainz.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What ISRC identifiers are assigned to a recording?

Get song identifiers returns ISRC identifiers for the best-matching studio recording using a song title and artist.

### When was a recording first released?

Get song identifiers returns the first known release date and listed releases for the matching recording.

### What members are recorded for an artist?

Get artist returns recorded members, including their names, years, and instruments when available.

## Related

- [Apple Music API](https://fous.com/workflows/apple-music.md): Apple Music returns albums, tracks, artist profiles, latest releases, top music, matching songs, and current charts; prices, previews, and older albums may be unavailable.
- [Last.fm API](https://fous.com/workflows/last-fm.md): Last.fm provides listening statistics, artist profiles, discovery, up to 50 tracks or albums, similar artists without percentages, and upcoming events that may be absent.
- [Spotify API](https://fous.com/workflows/spotify.md): Spotify returns public artist profiles, album credits and ordered tracks, song details and play counts, up to 500 playlist songs, keyword results, and country-based podcast charts; dates and regional options vary.
- [Genius API](https://fous.com/workflows/genius.md): Genius provides lyrics, annotations, credits, and music knowledge, plus song stories, relationships, page details, and artist song lists by popularity or release date; dates and views may be unavailable.
- [SongBPM API](https://fous.com/workflows/songbpm.md): Song tempo and key information for music listeners, performers and DJs.
- [Bandsintown API](https://fous.com/workflows/bandsintown.md): Bandsintown provides artist tour dates and concert listings with venues, lineups and ticket or event links; results reflect listed upcoming shows and may include nearby venues.
- [Discogs API](https://fous.com/workflows/discogs.md): Discogs provides releases, collections and marketplace information, including edition and track details, community counts, available price statistics, and artists’ discographies; sold prices may be unavailable.
- [Deezer API](https://fous.com/workflows/deezer.md): Deezer provides albums with ordered tracklists, song recording details, and current worldwide charts or official country-playlist tracks; previews and some tempo data may be unavailable or expire.
- [All Entertainment workflows](https://fous.com/workflows/category/entertainment)
