# AllMusic Scraper (`scrapeai/allmusic-scraper`) Actor

Target-aware live actor for AllMusic Scraper. Scrape comprehensive music metadata, artist profiles, album details, and track listings from TheAudioDB (the open music database powering AllMusic-style lookups). Covers 3M+ artists with biographies, genres, moods, ratings, and album artwork.

- **URL**: https://apify.com/scrapeai/allmusic-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does AllMusic Scraper do?

AllMusic Scraper retrieves **live music catalog metadata** through the [TheAudioDB API](https://www.theaudiodb.com/free_music_api), the provider specified by this Actor's original catalog input. Artist, album and track records have separate operations and native IDs. Every dataset row identifies TheAudioDB as its provider. Records from unrelated music entity types are not mixed into artist search results.

### Why use this music catalog API Actor?

Use the Actor to collect artist biographies and artwork, inspect album metadata, or retrieve available tracks for an artist or album. Apify supplies a dataset, API access, run history and scheduling. HTTP requests avoid opening a browser and are spaced to respect the provider's published free allowance of 30 requests per minute.

### What data can it extract?

| Field | Type | Meaning |
| --- | --- | --- |
| id | string | Entity type plus the observed provider ID |
| entityType | string | artist, album or track |
| title | string | Source artist, album or track name |
| artist / album / genre | string | Available source labels |
| description | string | Published English catalog description |
| imageUrl | string | Source-provided artwork URL |
| data | object | Available native catalog fields |
| albums / tracks | array | Optional source-returned profile enrichment |
| metadata | object | Provider, operation endpoint, query parameters and retrieval time |

Missing source fields are omitted. Records are never padded with made-up artists, albums, ratings or counts.

### How to retrieve music metadata

1. Choose an operation in the Input tab.
2. Supply a search query, explicit artist names, an artist ID or an album ID as appropriate.
3. Set the maximum total number of records.
4. Run the Actor and download its dataset as JSON, HTML, CSV or Excel.

### Input and operations

- `searchArtists`: `query` or `queries` submits independent artist searches.
- `searchAlbums`: the public v1 API needs `artistName` and optionally `albumName`. Global album-name search is implemented through v2 and requires your authorized premium key.
- `artistProfile`: `artistId` takes precedence over `query`. `includeAlbums` attaches available source albums.
- `artistTracks`: resolves the requested artist and retrieves tracks from its available album catalog.
- `albumDetails`: requires `albumId`. `includeTracks` attaches available tracks.

The existing `targetInput` object remains supported for source-specific options. Root fields take precedence when explicitly supplied. API version v1 uses the provider-published public key if no key is supplied. Supply your own authorized key for premium access; v2 always requires a premium key. Secret keys are not included in output provenance.

A representative ten-record artist input uses ten actual artist names:

```json
{"mode":"searchArtists","queries":["Coldplay","Radiohead","Muse","Metallica","Queen","Nirvana","ABBA","Daft Punk","Taylor Swift","Beyonce"],"maxItems":10,"apiVersion":"v1"}
```

### Provider limits and cost

The public v1 key currently returns at most one entity for many requests. A single artist search can therefore return one real artist even when `maxItems` is ten. Album and track enrichment reflects the records the provider actually returned; it is not a claim of a complete discography. This Actor does not replace a missing album result with artist data. Higher provider limits require the provider's premium access. Apify compute usage and any provider subscription are separate; consult the Actor's Pricing tab for current charges.

### Output and troubleshooting

The dataset retains native fields under `data`; optional enrichment has its own arrays. `RUN_SUMMARY` records the operation, request count, provider limits, returned record count and source errors. A source failure or empty result is reported without synthetic output. A ten-artist verification run proves that particular artist-search input; it does not certify premium operations or every other mode.

Use the Actor's Issues tab to report a failing operation, including its run ID and input with keys removed. The API tab provides integration instructions. Run locally with `apify run` so that the SDK receives isolated input and storage.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapeai/allmusic-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Choose artist search, album search, artist profile, artist tracks or album details.

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

Search text for the selected operation.

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

Optional explicit artist names for independent live requests.

## `artistId` (type: `integer`):

Native numeric TheAudioDB artist ID.

## `albumId` (type: `integer`):

Native numeric TheAudioDB album ID.

## `artistName` (type: `string`):

Artist name used by v1 album search.

## `albumName` (type: `string`):

Optional album title paired with artistName.

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

Only keep records whose published genre contains this text.

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

Global maximum number of actual music entities across all supplied queries.

## `includeAlbums` (type: `boolean`):

Attach available provider-returned albums to artistProfile records.

## `includeTracks` (type: `boolean`):

Attach available provider-returned tracks to albumDetails records.

## `apiVersion` (type: `string`):

Public v1 has lower per-request limits. v2 requires an authorized premium key.

## `apiKey` (type: `string`):

Required for v2; omitted v1 uses the provider-published public key.

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

Optional proxy configuration for connection failures.

## `targetInput` (type: `object`):

Existing nested mode/query/artistId/albumId options are still supported.

## Actor input object example

```json
{
  "mode": "searchArtists",
  "query": "Beatles",
  "maxItems": 10,
  "includeAlbums": true,
  "includeTracks": true,
  "apiVersion": "v1"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "mode": "searchArtists",
    "query": "Beatles",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/allmusic-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 = {
    "mode": "searchArtists",
    "query": "Beatles",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/allmusic-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 '{
  "mode": "searchArtists",
  "query": "Beatles",
  "maxItems": 10
}' |
apify call scrapeai/allmusic-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeai/allmusic-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/HupumOV43cVoWylnI/builds/0lMF2GbOscgKKuTgA/openapi.json
