# Musicbrainz — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search MusicBrainz for artists and recordings, then fetch detailed metadata for artists, recordings, releases, and release groups, including credits, tags/genres, and track listings.

**Category:** Music | **Website:** [musicbrainz.org/](https://musicbrainz.org/) | **Docs:** [parse.bot/marketplace/d6a34e69-3fb0-4cc5-8dba-5f1dec417cd3/musicbrainz-org-api](https://parse.bot/marketplace/d6a34e69-3fb0-4cc5-8dba-5f1dec417cd3/musicbrainz-org-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get artist details

Lookup comprehensive artist metadata by MusicBrainz ID. Returns genres, tags, ratings, release groups (albums/singles/EPs), aliases, ISNIs, IPIs, area information, and life span. Release groups are included inline without additional API calls.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mbid` | string | Yes | MusicBrainz ID (UUID format) of the artist. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/get-artist-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"mbid":"<string>"}'
```

### Get recording details

Lookup detailed recording (song) metadata by MBID. Returns comprehensive credits including musicians (with instruments), producers, engineers, vocal performers, work relationships (cover/original info), ISRCs, genres, tags, and releases the recording appears on.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mbid` | string | Yes | MusicBrainz ID (UUID format) of the recording. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/get-recording-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"mbid":"<string>"}'
```

### Get release details

Lookup detailed release metadata by MBID. Returns full track listing with durations and recording links, artist credits per track, label info, genres, tags, release events, barcode, packaging, and cover art status. Each track includes a recording MBID for deeper credit lookup.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mbid` | string | Yes | MusicBrainz ID (UUID format) of the release. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/get-release-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"mbid":"<string>"}'
```

### Get release group details

Lookup release group (album/single/EP) details by MBID. Returns all releases (editions/pressings) within the group, artist credits with genres/tags, community ratings, and release group genres. Use this to discover all pressings of an album across countries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mbid` | string | Yes | MusicBrainz ID (UUID format) of the release group. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/get-release-group-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"mbid":"<string>"}'
```

### Search artist

Full-text search over MusicBrainz artists. Supports Lucene query syntax for field-specific searches (e.g. area:"New York", type:Group). Returns paginated artist summaries with tags, genres, aliases, and life span. Each result includes an MBID usable with get_artist_details for full metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results (1-100). |
| `offset` | integer | No | Pagination offset for results. |
| `query` | string | Yes | Search query. Supports Lucene syntax: plain text ('Aretha Franklin'), field-specific ('area:"New York"'), or combined ('artist:"Beatles" AND type:Group'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/search-artist \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

### Search muscle shoals

Discover music industry entities connected to Muscle Shoals, Alabama — artists, recording studios/venues, and labels. Returns artists based in or born in the area, studios (FAME, Muscle Shoals Sound), and associated labels. Optionally fetches release groups for artists and releases for labels (slower due to additional API calls).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `entity_type` | string | No | Type of entities to search: 'all', 'artists', 'places', 'labels'. |
| `include_releases` | boolean | No | If true, fetch release groups for artists and releases for labels (slower due to additional API calls). |
| `limit` | integer | No | Maximum results per entity type (1-100). |
| `offset` | integer | No | Pagination offset for artist results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/search-muscle-shoals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"entity_type":"<string>","include_releases":"<boolean>","limit":"<integer>","offset":"<integer>"}'
```

### Search recording

Full-text search over MusicBrainz recordings (songs/tracks). Supports Lucene syntax for field-specific queries (e.g. artist:"The Beatles", title:"Yesterday"). Returns paginated recording summaries with artist credits, release appearances, tags, and genres.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results (1-100). |
| `offset` | integer | No | Pagination offset. |
| `query` | string | Yes | Search query. Supports Lucene syntax: 'Respect AND artist:Aretha', 'title:"Yesterday" AND artist:"The Beatles"', or plain text. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/musicbrainz/search-recording \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.