---
title: "Search the Discogs database"
method: GET
path: "/discogs/search"
tags: ["Discogs"]
---

# Search the Discogs database

`GET /discogs/search`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/discogs/search`
- Auth: API key in header `x-api-key`

Searches the Discogs database for releases, masters, artists and labels, optionally filtered to one `type`, with `page` and `per_page` (max 100). Release and master results carry country, year, formats, labels, genres, styles, catalog number and barcodes; artist and label results carry id, title and thumbnail.

## Query parameters

- `q` string, required
- `type` 'release' | 'master' | 'artist' | 'label'
- `page` integer
- `per_page` integer

## Headers

- `x-api-key` string, required

## Response `200`

OK

- DiscogsSearchResponseDoc
  - `code` integer
  - `data` DiscogsSearchResponse
    - `items` integer: Total number of matching results across all pages.
    - `page` integer: Page number returned.
    - `pages` integer: Total number of pages.
    - `per_page` integer: Number of results per page.
    - `query` string: Search text that was run.
    - `results` DiscogsSearchResult[]: Matches on this page, one item per release, master, artist or label.
      - `barcodes` string[]: Barcodes printed on the release. Present for release and master hits.
      - `catno` string: Catalogue number of the release. Present for release and master hits.
      - `country` string: Country the release was issued in. Present for release and master hits.
      - `cover_image` string: URL of the cover image.
      - `formats` string[]: Formats of the release, for example `Vinyl` or `LP`. Present for release and master hits.
      - `genres` string[]: Genres of the release. Present for release and master hits.
      - `id` integer: Discogs id of the hit. Use it with the matching release, master, artist or label endpoint.
      - `labels` string[]: Names of the labels that issued the release. Present for release and master hits.
      - `master_id` integer: Discogs id of the master release this release belongs to, when there is one.
      - `styles` string[]: Styles of the release, more specific than genres. Present for release and master hits.
      - `thumb` string: URL of a thumbnail image.
      - `title` string: Title of the hit, for example `Daft Punk - Discovery` for a release.
      - `type` string: Kind of hit: `release`, `master`, `artist` or `label`.
      - `uri` string: Link to the hit's page on Discogs.
      - `year` string: Year of release, as Discogs lists it.
    - `source_url` string: URL the data was read from.
    - `type` string: Result type the search was limited to: `release`, `master`, `artist` or `label`. Omitted when all types were searched.
  - `msg` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
