# Discogs (api.discogs.com) — 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 and browse millions of music releases, artists, and labels to discover tracklists, formats, ratings, and complete discography information. Instantly access detailed release data including community feedback to build your music knowledge and collections.

**Category:** Music | **Website:** [api.discogs.com/](https://api.discogs.com/) | **Docs:** [parse.bot/marketplace/4885ead7-3534-442c-8cc1-d211b3b808d4/api-discogs-com-api](https://parse.bot/marketplace/4885ead7-3534-442c-8cc1-d211b3b808d4/api-discogs-com-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/discogs/`
**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 releases

Retrieve paginated releases for a specific artist. Each release includes title, year, format, label, and the artist's role. Results are auto-iterated across pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `artist_id` | string | Yes | Numeric Discogs artist ID. |
| `page` | integer | No | Page number for pagination. |
| `per_page` | integer | No | Number of results per page (max 100). |

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

### Get label releases

Retrieve paginated releases for a specific record label. Each release includes title, artist, year, format, catalog number, and thumbnail. Results are auto-iterated across pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label_id` | string | Yes | Numeric Discogs label ID. |
| `page` | integer | No | Page number for pagination. |
| `per_page` | integer | No | Number of results per page (max 100). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/discogs/get-label-releases \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"label_id":"<string>","page":"<integer>","per_page":"<integer>"}'
```

### Get release

Retrieve full details for a specific release including tracklist, formats, labels, artists, genres, styles, community ratings, and notes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `release_id` | string | Yes | Numeric Discogs release ID. |

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

### Search releases

Search the Discogs database for releases with optional filters for artist, label, year, and format. Returns paginated results with basic metadata. Results are auto-iterated across pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `artist` | string | No | Filter by artist name. |
| `format` | string | No | Filter by format (e.g. Vinyl, CD, Cassette). |
| `label` | string | No | Filter by label name. |
| `page` | integer | No | Page number for pagination. |
| `per_page` | integer | No | Number of results per page (max 100). |
| `query` | string | No | Free-text search query. |
| `year` | string | No | Filter by release year (e.g. 1991). |

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

### Fetch vinyl listings

Fetch a paginated list of Discogs Marketplace listings. Supports filtering by format, style/genre, shipping origin, sort order, and page size via a full Discogs Marketplace URL. Optionally filter by title/release name. Returns matching items with pricing, condition, seller info, and community data, plus a next-page URL for pagination. If no page_url is provided, returns the first page of Score-style vinyl listings shipping from the Netherlands.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page_url` | string | No | Full Discogs Marketplace URL for a specific results page. Supports query parameters such as style, format, format_desc, ships_from, page, limit (25\|50\|100\|250), and sort. If omitted, fetches the first page of results for Score-style vinyl listings shipping from the Netherlands. |
| `title` | string | No | Filter listings by title or release name. Passed as the q parameter to Discogs Marketplace search. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/discogs/fetch-vinyl-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page_url":"<string>","title":"<string>"}'
```

### Get listing detail

Get detailed information about a specific Discogs marketplace listing. Returns comprehensive data including price, condition, seller info, release details, and shipping information. The listing_id can be obtained from the listing_id field in fetch_vinyl_listings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | The Discogs marketplace listing ID (numeric string). Can be obtained from the listing_id field returned by fetch_vinyl_listings. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/discogs/get-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<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.