# Discogs Search Scraper (`scrapyx/discogs-search-scraper`) Actor

Searches Discogs across releases, master releases, artists and labels. Returns full tracklist, catalog number, community rating, and live marketplace price range for individual releases.

- **URL**: https://apify.com/scrapyx/discogs-search-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** E-commerce, Marketing, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.56 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Discogs Search Scraper

Searches [Discogs](https://www.discogs.com), the largest music release
database and marketplace — across **releases** (specific pressings), **master
releases** (the canonical work), **artists** and **labels**.

For releases, returns the full tracklist with per-track credits and
durations, catalog number, community rating, and the live marketplace price
range.

***

### What you get

One row per search hit, plus a `SEARCH_SUMMARY` row per query.

#### From search (always) — raw passthrough, shape varies by `entityType`

Discogs' own clean GraphQL object, spread verbatim, so the fields differ by
type. For `entityType: "release"`: `discogsId`, `title`, `released`, `country`,
`siteUrl`, `labels[]`, `formats[]`, `images`, `primaryArtists[]`. Every row
carries `__typename` so you can tell Release/MasterRelease/Artist/Label apart
in one dataset.

#### From the release page (`includeReleaseDetails`, release only, on by default)

`tracklist[]` — each track's `position`, `title`, `credits` (remix/featuring
artist, when present) and `duration` — plus, from the page's Schema.org
JSON-LD: `genre`, `catalogNumber`, `recordLabel`, `releaseOf` (the master
release + primary artist), `aggregateRating` (community score and count), and
`offers` (live marketplace `offerCount` / `lowPrice` / `highPrice`).

***

### Input

```jsonc
{
  "queries": ["radiohead"],
  "entityType": "release",
  "genre": "Rock",
  "format": "Vinyl",
  "maxItems": 50,
  "includeReleaseDetails": true,
  "surface": "auto",          // website first, official API fallback (default)
  "discogsToken": ""          // optional personal access token: 60 API req/min instead of 25
}
```

`format`, `genre`, `style`, `country`, `year` and `decade` all genuinely
narrow the result count and compose with AND (measured: genre=Rock (5,964) ×
format=Vinyl (826) → 611 together). `format`/`genre`/`style` need Discogs'
own exact facet text — `"Trip Hop"`, not `"triphop"`.

**A search term is optional.** Leave `queries` empty and set a filter to
browse by facet alone — e.g. every Reggae release in the database.

#### entityType: four genuinely different shapes

| `entityType` | Returns | `__typename` |
| --- | --- | --- |
| `release` | A specific pressing | `Release` |
| `master` | The canonical work across all its pressings | `MasterRelease` |
| `artist` | An artist/group | `Artist` |
| `label` | A record label | `Label` |

Verified at the same query (`radiohead`) these carry genuinely different
fields, not the same index re-labelled — `master`/`artist`/`label` results
carry no `discogsId` at all, only a relay `id`.

***

### Two data surfaces (`surface`)

Discogs' website sits behind a Cloudflare challenge that, from cloud egress,
blocks a random share of requests rather than a fixed list of clients. So the
actor has two ways to read the same index and tells you which one it used in
every row's `_source`:

| `surface` | What happens | Row shape |
| --- | --- | --- |
| `auto` (default) | Website first (fast; Discogs' own GraphQL objects, JSON-LD marketplace price range). Any query the website refuses after 3 exit-IP/fingerprint rotations is restarted from page 1 on the official API; any release page it refuses falls back to the API release endpoint on its own. | `S1`/`S2` = website, `S3`/`S4` = API |
| `api` | Official API only (`api.discogs.com`). Deterministic, never challenged in our measurements, but rate-limited: 25 requests/min per IP without a token, 60/min with `discogsToken`. | `S3`/`S4` |
| `web` | Website only, no fallback. | `S1`/`S2` |

The two shapes are both raw passthrough of what Discogs returns, so they
differ: website rows carry `__typename`, `discogsId`, `siteUrl`, `labels[]`,
`formats[]`, `primaryArtists[]`; API rows carry `type`, `id`, `uri`, `label[]`,
`format[]`, `catno`, `genre[]`, `style[]`, `community.want/have`. Release
detail from the website attaches `musicReleaseJsonLd` (with `offers`
low/high price) and a parsed `tracklist` (`position`, `title`, `credits`,
`duration`); from the API it attaches `releaseApi` (the full release object:
`lowest_price`, `num_for_sale`, `community.rating`, `genres`, `styles`,
`identifiers`, `images`, `notes`) and the API's own `tracklist` (`position`,
`title`, `duration`, `extraartists[]`). Every RESULT row declares all three
columns (`musicReleaseJsonLd`, `releaseApi`, `tracklist`), unused ones `null`.

### Known limits

**API mode is rate-limited.** 25 requests/min per exit IP without a token —
one search page (100 results) plus one call per release detail — so 50
releases with details take about two minutes on the API; with a personal
access token (`discogsToken`, generated at discogs.com/settings/developers)
it is 60/min. A 429 is waited out (20 s) on a fresh exit IP, up to 4 times.

**`decade` on the API is a year range.** The API has no `decade` filter, so
`decade: "1990"` is sent as `year=1990-1999` there (honest: 1,914 vs the
website's 1,899 for the same query). An explicit `year` wins.

**A query is never half-and-half.** If the website fails mid-query, the whole
query restarts on the API from page 1 (the surfaces have different page
sizes and shapes), so the pages already fetched are discarded, never mixed.

**Detail is release-only.** `includeReleaseDetails` fetches the tracklist and
JSON-LD only for `entityType: "release"`. It's a no-op (logged, not an error)
for master/artist/label — those detail pages weren't built out for this
version.

**Filter values are exact-match, not fuzzy.** A typo doesn't silently return
everything — Discogs is unusually honest here — but it does mean `format:
"vinyl"` (lowercase) may not match `"Vinyl"` depending on the facet's exact
casing; use the value as Discogs itself displays it.

**Pagination is genuinely honest** — 25 results/page, and past the real last
page it returns an empty array rather than clamping back to page 1 — so an
unlimited crawl (`maxItems: 0`) terminates correctly, but a broad query can
mean tens of thousands of results.

***

### Anti-bot posture

`www.discogs.com` is behind a Cloudflare **managed challenge** (`cf-mitigated:
challenge`, "Just a moment...") that scores each request; from Apify's
egress the same client passes one second and is challenged the next. Measured
in-platform on 2026-09-21 across direct, datacenter and residential exits:
every Chromium-family TLS profile was challenged 100% of the time; `primp
safari_26` with its own header set untouched passed 10/10 search and 25/25
release-page requests. That is the actor's web client (retried once on a
fresh exit IP, then `firefox_148`), and the official API — 24/24 clean on
every proxy option — is the floor beneath it. The Apify **datacenter** proxy
is the default: residential was challenged at exactly the same rate here and
is billed per GB against ~1 MB search pages. No browser, no captcha solver.

### Policy

`robots.txt` disallows marketplace/account/user-scoped paths
(`*/marketplace`, `*/sell/*`, `/users/`, `/login`, `/mycollection`, etc.) —
none of which this actor touches. `/search` itself is **not** disallowed for
a generic crawler (only a `Sogou web spider` group disallows it specifically).
No ClaudeBot/anthropic-ai group. `api.discogs.com/robots.txt` is the same
file, and the API is Discogs' documented public interface (unauthenticated
access allowed with a User-Agent; a token only raises the quota).

# Actor input Schema

## `queries` (type: `array`):

Free-text searches — one crawl per entry, each with its own SEARCH\_SUMMARY row. Leave empty and set at least one filter below to browse by filter alone (e.g. every Reggae release with no search term at all).

## `entityType` (type: `string`):

Which of Discogs' four indexed types to search. Each returns a genuinely different result shape (verified) — a specific pressing, the canonical work across all its pressings, an artist, or a record label.

## `format` (type: `string`):

Exact format facet, e.g. 'Vinyl', 'CD', 'Cassette'. Must match Discogs' own facet text exactly (case and spacing matter). A bogus value genuinely narrows to zero results here rather than silently returning everything, so a typo is safe — just empty.

## `genre` (type: `string`):

Exact genre facet, e.g. 'Rock', 'Electronic', 'Hip Hop', 'Jazz'. Same exact-match behaviour as Format.

## `style` (type: `string`):

Exact style facet — a finer-grained tag than genre, e.g. 'Trip Hop', 'Alternative Rock', 'Downtempo'. Same exact-match behaviour as Format.

## `country` (type: `string`):

Country of release, e.g. 'US', 'UK', 'Germany'.

## `year` (type: `string`):

Exact release year, e.g. '1997'.

## `decade` (type: `string`):

Decade, e.g. '1990' for the 1990s.

## `maxItems` (type: `integer`):

Stop after this many results per query. Set to 0 for unlimited — Discogs' pagination is genuinely honest here (25 results/page, past the real last page it returns an empty array rather than clamping back to page 1), so an unlimited crawl terminates correctly.

## `includeReleaseDetails` (type: `boolean`):

For entityType='release' only: fetch each release's detail page for the full tracklist, catalog number, community rating, and live marketplace price range (offer count, low/high price). Ignored (with a log warning) for master/artist/label searches, which this actor does not have a detail parser for.

## `surface` (type: `string`):

Where to read from. 'auto' (default) tries the website first (fast, Discogs' own GraphQL result objects with `__typename`, JSON-LD marketplace price range on release pages) and falls back to the official API (api.discogs.com) for any query or release the website's Cloudflare challenge blocks. 'api' skips the website entirely: deterministic, but rate-limited to 25 requests/min without a token (60/min with one) and rows carry the API's field names instead. 'web' never falls back. Every row says which surface produced it in `_source`.

## `discogsToken` (type: `string`):

Optional. Generate one at discogs.com/settings/developers. Only used for API calls (the fallback surface, or all calls with surface='api'); it raises the API rate limit from 25 to 60 requests/min. Never logged and never sent to the website.

## `maxConcurrency` (type: `integer`):

How many requests may be in flight at once. This absorbs latency variance; it is NOT the throttle — the crawl rate is set by 'Minimum interval between requests' below.

## `minRequestInterval` (type: `number`):

The actual speed control: the shortest gap between two requests to Discogs, across all workers.

## `proxyConfiguration` (type: `object`):

www.discogs.com sits behind a Cloudflare challenge that is probabilistic per request from cloud egress; the actor rotates exit IP + browser fingerprint and falls back to the official Discogs API (api.discogs.com, never challenged in our measurements) when the web surface is blocked. Apify datacenter proxy is the default: measured identically to residential here, at a fraction of the cost. Leaving this empty runs on the container's own IP.

## Actor input object example

```json
{
  "queries": [
    "radiohead"
  ],
  "entityType": "release",
  "format": "",
  "genre": "",
  "style": "",
  "country": "",
  "year": "",
  "decade": "",
  "maxItems": 50,
  "includeReleaseDetails": true,
  "surface": "auto",
  "maxConcurrency": 5,
  "minRequestInterval": 0.4,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "radiohead"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/discogs-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": ["radiohead"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/discogs-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "radiohead"
  ]
}' |
apify call scrapyx/discogs-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/discogs-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uncbbPiom8Hn08nL8/builds/ZQn1fDcIr491ogYmM/openapi.json
