# Discogs Scraper (`mina_safwat/discogs-scraper`) Actor

Scrapes the Discogs music database — releases, masters, artists and labels with year, country, format, genre and collector counts.

- **URL**: https://apify.com/mina\_safwat/discogs-scraper.md
- **Developed by:** [Mina](https://apify.com/mina_safwat) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

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 Scraper

Collect music releases, albums, artists and labels from Discogs — the largest
database of physical music ever pressed — with years, countries, formats,
genres and how many collectors own each one.

### How to use it

1. Put your search terms into **Search terms**, one per line — an artist, an
   album, a label.
2. Choose what to return: individual pressings, one entry per album, artists,
   or labels.
3. Optionally narrow it with the filters — genre, style, year, country,
   format, label, artist.
4. Run the Actor.

You can also leave the search terms empty and use filters alone, to sweep
something like every Jazz release from 1975.

### What you get

For every result:

- Title, year and country of release
- Record labels and the catalogue number
- Format — vinyl, CD, cassette, and whether it is a reissue or compilation
- Genres and the narrower styles
- **How many collectors own it, and how many want it** — Discogs' own demand
  signal, and the most useful number here
- Barcodes, the master release it belongs to, and a direct link

### What you can do with it

- Find records that are wanted far more than they are owned — the scarcity
  signal collectors and dealers trade on
- Map a label's entire catalogue and how it was pressed
- Track which pressings of an album exist across countries and years
- Research a genre or era systematically rather than album by album
- Build a reference dataset for a record shop or collection

### Good to know

Discogs limits callers without an account to 25 requests a minute, so the Actor
paces itself to stay inside that. Large runs simply take longer rather than
failing.

Adding a **Discogs token** from your account settings roughly doubles the speed
and is the only way to get cover images — Discogs withholds artwork from
anonymous callers, so that field comes through empty without one.

"Releases" gives every separate pressing, so a popular album appears many
times. Choose "Masters" when you want one row per album instead.

# Actor input Schema

## `search_terms` (type: `array`):

What to search Discogs for, one term per line — an artist, an album, a label. Leave empty to browse purely by the filters below.

## `result_type` (type: `string`):

Releases cover every pressing and reissue separately. Masters group them into one entry per album.

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

For example Rock, Jazz, Electronic.

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

The narrower style, for example Grunge, Bebop, Techno.

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

A single year, for example 1975.

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

Where it was released, for example UK, US, Japan.

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

For example Vinyl, CD, Cassette.

## `label` (type: `string`):

The record label, for example Blue Note.

## `artist` (type: `string`):

Restrict to one artist by name.

## `max_results_per_search` (type: `integer`):

Stops after this many results for each search term.

## `api_token` (type: `string`):

A personal token from your Discogs account settings. Without one the Actor still works, but Discogs limits it to 25 requests a minute and withholds cover images. With one it runs roughly twice as fast and returns the artwork.

## Actor input object example

```json
{
  "search_terms": [
    "nirvana"
  ],
  "result_type": "release",
  "max_results_per_search": 200
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "search_terms": [
        "nirvana"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mina_safwat/discogs-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 = { "search_terms": ["nirvana"] }

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/discogs-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 '{
  "search_terms": [
    "nirvana"
  ]
}' |
apify call mina_safwat/discogs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mina_safwat/discogs-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/om6fvJv1pnhStcILZ/builds/U3A5S88XUotBWMmQi/openapi.json
