# Discogs Record Miner (`kawsar/discogs-record-miner`) Actor

Discogs Record Miner is a dedicated search scraper that extracts artist profiles, releases, and labels from Discogs, so you can build and update your music catalog databases without blocks.

- **URL**: https://apify.com/kawsar/discogs-record-miner.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Discogs Record Miner

Discogs Record Miner is an automated search scraper built to collect artists, releases, master recordings, and labels from Discogs. Music shops, vinyl collectors, and archivists can run multiple search queries in batch mode to pull search result listings in seconds. 

The tool includes automatic multi-page pagination to fetch any number of results and routes all requests through a built-in proxy bypass system, so you will not get rate-limited or blocked while collecting data.

### Use cases

- **Database building**: Populate your music application or personal archive with structured Discogs search records.
- **Inventory tracking**: Match physical music stock lists against the Discogs catalog to pull accurate release links and images.
- **Market research**: Run search queries for artists and labels to track what releases are currently cataloged.
- **Archiving**: Save lists of master records and release variations for historical catalog preservation.

### Input

The actor accepts a list of queries to run in batch mode. You can filter results by specific category and set a maximum number of records to return for each query:

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `queries` | array | `["miles davis"]` | List of search queries to run in batch mode (one query per line). Can include artist names, album titles, track names, or catalog numbers. |
| `searchType` | string | `all` | Filter results by category. Options are `all` (everything), `artist`, `release`, `master` (master releases), and `label`. |
| `maxItemsPerQuery` | integer | `25` | Maximum number of search records to return for EACH individual query. The actor automatically paginates through results (25 items per page) to reach this limit. |
| `requestTimeoutSecs` | integer | `30` | Per-request timeout in seconds when calling Discogs search pages. |

#### Example input

```json
{
    "queries": [
        "miles davis",
        "kind of blue",
        "blue note"
    ],
    "searchType": "all",
    "maxItemsPerQuery": 50,
    "requestTimeoutSecs": 30
}
````

### Output

The actor stores results in a dataset. Each entry contains the following fields:

```json
{
    "query": "miles davis",
    "itemType": "master release",
    "itemTitle": "Miles Davis At Fillmore",
    "url": "https://www.discogs.com/master/65664-Miles-Davis-Miles-Davis-At-Fillmore",
    "imageUrl": "https://i.discogs.com/UYL6EF3ktq9ROohUl0gFSrgrnrNEYVCsh2qYXaU3F3I/rs:fit/g:sm/q:40/h:300/w:300/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9BLTIzNzU1/LTE3NjI4NjQzNDkt/MjU4NC5qcGVn",
    "artistName": "Miles Davis",
    "artistUrl": "https://www.discogs.com/artist/23755-Miles-Davis",
    "scrapedAt": "2026-06-03T10:14:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `query` | string | The search keyword used to find this record. |
| `itemType` | string | The category of the Discogs item (e.g. artist, release, master release, label). |
| `itemTitle` | string | The name or title of the Discogs item. |
| `url` | string | The direct Discogs link to the item. |
| `imageUrl` | string | The cover image or artist avatar thumbnail URL. |
| `artistName` | string | The creator or artist name (for releases and master records). |
| `artistUrl` | string | The direct Discogs link to the artist's profile. |
| `scrapedAt` | string | The ISO timestamp indicating when the search was completed. |

### How it works

1. **Batch Processing**: The actor reads your list of search queries and processes them sequentially.
2. **Category Filters**: Each search is queried with your specific category filter (e.g., searching for "Kind of Blue" as a `release` only, or "Miles Davis" as an `artist` only).
3. **Automatic Pagination**: If you set `maxItemsPerQuery` to more than 25, the actor will fetch successive pages (e.g., `page=1`, `page=2`) until the limit is reached or there are no more results.
4. **Proxy Routing**: All requests are routed through built-in proxy bypass servers to securely retrieve the content from Discogs.
5. **Data Compilation**: The raw HTML response of each page is parsed to extract metadata for every search card and stored in your Apify dataset.

### Integrations

Connect Discogs Record Miner with other apps and services using [Apify integrations](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions whenever results are available.

# Actor input Schema

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

List of keywords, artist names, album titles, or record labels to search on Discogs (one query per line).

## `searchType` (type: `string`):

Filter search results by a specific Discogs category (e.g. Artists, Releases, Labels).

## `maxItemsPerQuery` (type: `integer`):

Maximum number of search records to return for EACH individual query. The actor will automatically paginate (25 results per page) to reach this limit.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds when calling Discogs search pages.

## Actor input object example

```json
{
  "queries": [
    "miles davis",
    "john coltrane"
  ],
  "searchType": "all",
  "maxItemsPerQuery": 25,
  "requestTimeoutSecs": 30
}
```

# 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": [
        "miles davis"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/discogs-record-miner").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": ["miles davis"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/discogs-record-miner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "miles davis"
  ]
}' |
apify call kawsar/discogs-record-miner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=kawsar/discogs-record-miner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Discogs Record Miner",
        "description": "Discogs Record Miner is a dedicated search scraper that extracts artist profiles, releases, and labels from Discogs, so you can build and update your music catalog databases without blocks.",
        "version": "0.0",
        "x-build-id": "kbZLXkgnYXCbwc7wL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~discogs-record-miner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-discogs-record-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/kawsar~discogs-record-miner/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-discogs-record-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/kawsar~discogs-record-miner/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-discogs-record-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Search Queries (Batch)",
                        "type": "array",
                        "description": "List of keywords, artist names, album titles, or record labels to search on Discogs (one query per line).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchType": {
                        "title": "Search Category",
                        "enum": [
                            "all",
                            "artist",
                            "release",
                            "master",
                            "label"
                        ],
                        "type": "string",
                        "description": "Filter search results by a specific Discogs category (e.g. Artists, Releases, Labels).",
                        "default": "all"
                    },
                    "maxItemsPerQuery": {
                        "title": "Max Items Per Query",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of search records to return for EACH individual query. The actor will automatically paginate (25 results per page) to reach this limit.",
                        "default": 25
                    },
                    "requestTimeoutSecs": {
                        "title": "Request Timeout (Seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Per-request timeout in seconds when calling Discogs search pages.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
