# MusicBrainz Scraper — Artists, Releases & Recordings (`hipersoft/musicbrainz-scraper`) Actor

Search the open MusicBrainz music database in bulk and export clean rows. Look up artists, releases, recordings, release groups and labels with metadata, country, dates, track counts, labels and tags.

- **URL**: https://apify.com/hipersoft/musicbrainz-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0005 / entity scraped

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## MusicBrainz Scraper — Artists, Releases & Recordings

Search the **open MusicBrainz music database** and export the results as clean, structured **JSON, CSV, Excel or XML**. MusicBrainz is a community-built encyclopedia of music metadata, and this actor turns its catalog into a tidy dataset you can filter, analyse and feed into your own apps.

Pick an **entity type** — artist, release, recording, release group or label — type a **search term**, and the actor returns one row per match with names, titles, country, dates, track counts, labels and tags — instead of paging through the site by hand.

Built for music apps, catalog builders, researchers, data journalists and pipelines that need structured music metadata at scale.

### What does the MusicBrainz Scraper do?

Choose what to search for, enter a query, and the actor paginates through the ranked results and returns clean rows:

- **Artists** — bands and performers, with sort name, type, country, gender, active years, tags and a relevance score.
- **Releases** — a specific album, single or EP edition, with the credited artist, release date, country, status, track count and label.
- **Recordings** — individual tracks/performances, with the credited artist, length, and the releases they appear on.
- **Release groups** — an album across all of its editions, with primary type, first release date and tags.
- **Labels** — record labels, with sort name, type, country and active years.

Every run returns one flat row per entity, so results are easy to sort, join and export.

### What data can you get?

#### Artist

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | MusicBrainz identifier (MBID) for the artist |
| `name` | string | Artist / band name |
| `sortName` | string | Sort-friendly form of the name |
| `type` | string | Person, Group, Orchestra, Choir, and so on |
| `country` | string | ISO country code associated with the artist |
| `gender` | string | Gender, where applicable |
| `lifeSpan` | object | Begin/end dates and whether the artist has ended |
| `disambiguation` | string | Short note that tells similarly named artists apart |
| `tags` | array | Community tags (genres, descriptors) |
| `score` | number | Relevance score for the search match (0–100) |

#### Release

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | MBID of the release |
| `title` | string | Release title |
| `artist` | string | Credited artist(s) |
| `date` | string | Release date |
| `country` | string | Release country |
| `status` | string | Official, Promotion, Bootleg, and so on |
| `trackCount` | integer | Number of tracks on the release |
| `label` | string | Record label, where present |
| `type` | string | Primary type of the parent release group (Album, Single, EP…) |
| `score` | number | Relevance score for the search match |

#### Recording

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | MBID of the recording |
| `title` | string | Recording (track) title |
| `artist` | string | Credited artist(s) |
| `length` | integer | Track length in milliseconds |
| `firstReleaseDate` | string | Earliest known release date |
| `releaseCount` | integer | How many releases include this recording |
| `releases` | array | Up to 25 releases the recording appears on (`id`, `title`, `date`, `country`) |
| `tags` | array | Community tags |
| `score` | number | Relevance score for the search match |

Release groups and labels return an analogous set of fields (title/name, type, country, tags and score).

### Use cases

- **Music apps & catalogs** — power search, autocomplete and lookups with structured artist, release and track metadata.
- **Data enrichment** — match your own tracks or artists to canonical MBIDs and clean metadata.
- **Research & journalism** — build datasets of artists, releases or labels for a genre, country or era.
- **Discography building** — enumerate an artist's releases and recordings into a spreadsheet.
- **Pipelines & dashboards** — feed clean music metadata into models, catalogs or internal tools.

### How to use it

1. Add the MusicBrainz Scraper to your Apify account and open the input form.
2. Choose an **Entity type** — artist, release, recording, release group or label.
3. Enter a **Search query** (e.g. `Radiohead` or `OK Computer`).
4. Set **Max items** to cap the export.
5. Click **Run**, then **export** the dataset as JSON, CSV, Excel or XML, or pull it via the Apify API.

### Input example

```json
{
  "entity": "artist",
  "query": "Radiohead",
  "maxItems": 100
}
```

| Field | Type | Description |
| --- | --- | --- |
| `entity` | string | What to search for: `artist`, `release`, `recording`, `release-group` or `label`. |
| `query` | string | Free-text search term (name, title or tag). |
| `maxItems` | integer | Maximum number of entities to return. |

### Output example

```json
{
  "entityType": "artist",
  "id": "a74b1b7f-71a5-4011-9441-d0b5e4122711",
  "name": "Radiohead",
  "sortName": "Radiohead",
  "type": "Group",
  "country": "GB",
  "gender": null,
  "lifeSpan": { "begin": "1991", "ended": null },
  "disambiguation": null,
  "tags": ["rock", "alternative rock", "art rock", "electronic"],
  "score": 100
}
```

### FAQ

**What is MusicBrainz?**
MusicBrainz is an open, community-maintained encyclopedia of music metadata — artists, releases, recordings, release groups and labels — each with a stable identifier (an MBID) you can use to link records across systems.

**Which entities can I search?**
Artists, releases, recordings, release groups and labels. Pick one per run with the **Entity type** field.

**How many results can I get?**
As many as your search returns. Use **Max items** to cap a run and keep it cheap; results are paginated for you automatically.

**How does billing work?**
You pay per entity you get, so small, tightly filtered runs stay inexpensive.

**What export formats are supported?**
JSON, CSV, Excel and XML, plus direct access via the Apify API.

**Can I use this with n8n?**
Yes. Run the MusicBrainz Scraper from n8n with the [Apify node](https://n8n.io/integrations/apify/) — trigger a run, wait for it to finish, and read the dataset items straight into your workflow to enrich tracks, build catalogs or drive lookups. It also works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier) and the [Apify API](https://docs.apify.com/api/v2).

**Can I connect this to other tools?**
The MusicBrainz Scraper connects with almost any cloud service or web app through [integrations on the Apify platform](https://apify.com/integrations) — [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

**Is this only public data?**
Yes. It returns only openly published MusicBrainz metadata. You are responsible for complying with MusicBrainz's terms and licensing.

### Notes

Original clean-room implementation. Not affiliated with or endorsed by MusicBrainz or the MetaBrainz Foundation. Music metadata is published by the MusicBrainz community under its own licences; cite the original source where required.

# Actor input Schema

## `entity` (type: `string`):

Which kind of music entity to search for. Pick one per run: artist (bands & performers), release (an album/single/EP edition), recording (an individual track/performance), release-group (an album across all its editions) or label (record labels).

## `query` (type: `string`):

The text to search for, e.g. an artist name ("Radiohead"), an album title ("OK Computer"), a track or a label. Matches names, titles and tags; results come back ranked by relevance score.

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

Maximum number of matching entities to return. Keep it low for fast, cheap runs; raise it to pull deeper into the result list (results are paginated 100 per request).

## Actor input object example

```json
{
  "entity": "artist",
  "query": "Radiohead",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "entity": "artist",
    "query": "Radiohead",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/musicbrainz-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 = {
    "entity": "artist",
    "query": "Radiohead",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/musicbrainz-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 '{
  "entity": "artist",
  "query": "Radiohead",
  "maxItems": 100
}' |
apify call hipersoft/musicbrainz-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/musicbrainz-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/5TVwiVrdwOsHQkeTi/builds/4WHg7aZRnog6cgjYh/openapi.json
