# Apple Music Album Scraper (`insights_data/apple-music-album-scraper`) Actor

Scrape Apple Music albums from links or album IDs in any country storefront. Get title, artists, cover art, release info and the full tracklist with track numbers, durations and explicit flags as clean JSON. Bulk input, live results, no Apple login or cookies needed.

- **URL**: https://apify.com/insights_data/apple-music-album-scraper.md
- **Developed by:** [Insights Data](https://apify.com/insights_data) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### 🎧 What is Apple Music Album Scraper?

**Apple Music Album Scraper** helps record labels, distributors, music data teams and app builders with music catalog enrichment and music metadata audit work: give it album links or album IDs, and it returns each album with its full album tracklist as clean, structured data. For every album you get the title, credited artists, cover art, release info and every track with its Apple Music track ID, disc and track number, duration and explicit flag, with no Apple account, login or cookies needed.

Just paste an album link and click **Start**. You can try it with the $5 monthly credit of the Apify Free plan, and Free-plan runs work the same as paid runs.

- 🗂️ **Music catalog enrichment:** add track IDs, track numbers, disc numbers, durations and explicit flags to your own catalog, matched by album ID.
- 🧾 **Music metadata audit:** check how titles, credited artists, tracklists and release text appear on Apple Music, so record labels and distributors can spot errors.
- 🌍 **Album availability by country:** run the same album in several storefronts and see where it is found and where it is not.
- 🔀 **Compare album tracklists:** put a standard edition next to a bonus or deluxe edition and compare track counts, order and durations.
- 📊 **Build a music dataset:** collect album metadata and track-level fields for music analytics, research or as music recommendation data (catalog fields only, no play counts or genres).
- 🖼️ **Collect album cover art:** get a 1200x1200 cover image link for each found album that has one.

#### What can Apple Music Album Scraper do?

- 🔗 **Album links and album IDs in one run**, mixed in any order.
- 🌍 **Any storefront country:** links use the storefront in the link, while IDs (and links without a storefront) use the storefront you choose.
- 💿 **One record per album**, saved as soon as each album is ready, so you can watch results arrive.
- 🗃️ **Four tables in the Output tab:** Albums, Tracks, Artists and Lookup status.
- 🚦 **A status row for every processed input**, so you see which albums were found and which were not. Only found albums are charged.
- 🔄 **Backup source:** when an album page has no usable data, the Actor can try a second public source that returns the same record shape.
- 🔌 **Platform tools:** API access, schedules, webhooks, integrations and export to JSON, CSV, Excel, XML or HTML.

***

### 💿 Apple Music Album Scraper data: what can you extract?

Each found album gives you this Apple Music album data. Field names are the same as in the dataset, so the Apple Music metadata in this table matches your export.

| Field | What it contains |
|---|---|
| 🆔 `album.albumId` | Apple Music album ID |
| 💿 `album.title` | Album title |
| 🎤 `album.artists` | Credited artists, each with `artistId`, `displayName` and `profileUrl` |
| 🖼️ `album.coverArtUrl` | Apple Music album artwork link at 1200x1200 |
| 🔗 `album.albumUrl` | Link to the album on Apple Music |
| 🔢 `album.trackCount` | Number of tracks |
| 📅 `album.releaseInfo` | Release text as shown on the album page: release date, number of songs and total length, often a copyright line |
| 🎵 `album.tracks` | The Apple Music tracklist: `trackId`, `title`, `trackNumber`, `discNumber`, `durationMs`, `explicit`, `albumId` |
| 🎧 `album.platform` | Always `apple_music` |
| 🚦 `lookupStatus` | `found`, `notFound`, `blocked`, `error` or `invalidInput` |
| 📝 `input` | The album link or ID exactly as you entered it |

> **Note:** `album` is `null` when `lookupStatus` is not `found`. `coverArtUrl` and `albumUrl` can be `null` when the album has no value for them. `durationMs` is the track length in milliseconds (180000 = 3 minutes). `discNumber` is 1 for single-disc albums.

#### What data can't Apple Music Album Scraper extract?

- Audio files, previews or lyrics
- Genre, the record label as its own field, UPC or ISRC codes
- Play counts, chart positions, ratings, reviews or prices
- Search by keyword or an artist's full discography: you give the album links or IDs
- Playlists, songs or artist pages as input

To search Apple Music by keyword, or to get artists, songs, playlists and music videos, use [Apple Music Scraper](https://apify.com/insights_data/apple-music-scraper).

***

### ▶️ How to scrape Apple Music albums

Apple Music Album Scraper is built for an easy start, even if you have never collected data from a website before.

1. [Create a free Apify account](https://console.apify.com/sign-up) with your email.
2. Open [Apple Music Album Scraper](https://apify.com/insights_data/apple-music-album-scraper).
3. Get an album link: open the album on [music.apple.com](https://music.apple.com) and copy the address from your browser, or in the Apple Music app use **Share** → **Copy Link**. Paste one or more links into **Album URLs**, one per row. You can add album IDs too. Just want to test? The form is prefilled with one album (*Lover* by Taylor Swift), so you can skip this step.
4. Click **Start** and wait for the run to finish. Albums appear in the **Output** tab one by one.
5. Download your data: in the run, open the **Storage** tab → **Datasets** → pick the dataset → **Export**, and choose JSON, CSV, Excel, XML or HTML.

***

### 💲 Apple Music Album Scraper pricing: how much does it cost?

Apple Music Album Scraper uses **pay-per-event** pricing: you pay for specific events (here, each found album and the start of a run), not a monthly rental. Your bill for a run has three parts:

| Part | What you pay |
|---|---|
| 💿 Result charges | One result per album stored with `lookupStatus` `found`, at your plan's price (table below) |
| 🚀 Start fee | $0.00005 per run at the default 1 GB memory (charged per GB of run memory) |
| ⚙️ Platform usage | The compute resources of the run (and any Apify Proxy traffic the run uses), billed at your Apify plan's rates |

| Apify plan | Price per album | Price per 1,000 albums |
|---|---|---|
| 🟢 Free | $0.001 | $1.00 |
| 🔵 Starter | $0.0009 | $0.90 |
| 🟣 Scale | $0.0008 | $0.80 |
| 🟠 Business and higher | $0.0007 | $0.70 |

The plan discount applies to the result price only. The start fee is the same on every plan, and platform usage is billed at your Apify plan's own rates.

**Example:** the result charges for 1,000 found albums are $1.00 on the Free plan, $0.90 on Starter, $0.80 on Scale and $0.70 on Business, plus the $0.00005 start fee and the platform usage of the run.

**Not charged:** rows with `notFound`, `blocked`, `error` or `invalidInput`, and the rows in the Tracks and Artists tables. A found album costs one result, however many tracks it has.

> ⚠️ The same album entered once as a link and once as an ID counts as two inputs, so it is charged twice if found. Exact duplicate entries are removed.

**Proxy cost:** the run starts without a proxy. If it switches to Apify Proxy, that traffic is part of the platform usage of the run, not a separate Actor charge, and it shows in the run's cost.

See the [pricing tab](https://apify.com/insights_data/apple-music-album-scraper/pricing) for the current prices.

#### Is scraping Apple Music free?

You can start for free. The [Apify Free plan](https://apify.com/pricing) gives you $5 in monthly credit, which pays for both the result charges and the platform usage. The Actor has no Free-plan limits: Free-plan runs work the same as paid runs, with the same inputs and no album cap. Platform usage depends on your run, so a small test run is a good way to learn your cost: open the run page when it finishes and read the cost there.

#### How do I keep a run within budget?

Set a **maximum charge limit** in the run options when you start a run. It is the most you allow the Actor to charge for its events in that run: it caps the result charges, and platform usage comes on top. When the limit is reached, the run stops, and albums that were not processed yet are skipped and get no row.

***

### ⬇️ Input

You need at least one Apple Music album link. Everything else is optional. Set the input in the Console form or send it as JSON through the API.

#### Settings most people change

| Setting | What it does |
|---|---|
| 🔗 **Album URLs** (`startUrls`) | Apple Music album links, one per row. Each link uses the storefront country in the link, or the Storefront country setting if the link has none. Required. |
| 🆔 **Album IDs** (`albumIds`) | Optional numeric album IDs, one per row. They use the Storefront country setting. |
| 🌍 **Storefront country** (`country`) | The storefront is the country version of Apple Music. Two-letter storefront for album IDs, for example `us`, `gb`, `de` or `jp`. Default `us`. Album URLs use the storefront in the link; a link without one uses this setting. |

#### Other settings

| Setting | What it does |
|---|---|
| ⚡ **Parallel albums** (`maxConcurrency`) | How many albums are collected at the same time, 1 to 10. Default 5. Lower it if many albums come back as `blocked`. |
| 🔄 **Use backup source** (`useBackupSource`) | When an album page has no usable data, try a second public source that returns the same record shape. Default on. |
| 🌐 **Proxy** (`proxyConfiguration`) | Default is no proxy. If Apple Music rejects requests, the run switches to Apify Proxy by itself. Most users leave it as it is. Proxy traffic counts as platform usage. |

Here's an example that collects one album. It is the prefilled input of the Actor, so you can run it as it is:

```json
{
  "startUrls": ["https://music.apple.com/us/album/lover/1468058165"]
}
```

And one that mixes a link with two album IDs from the UK storefront:

```json
{
  "startUrls": ["https://music.apple.com/us/album/lover/1468058165"],
  "albumIds": ["1440768692", "1440857781"],
  "country": "gb",
  "maxConcurrency": 5,
  "useBackupSource": true
}
```

See the [input tab](https://apify.com/insights_data/apple-music-album-scraper/input-schema) for every field.

#### Apple Music album link and Apple Music album ID

An Apple Music album link looks like `https://music.apple.com/us/album/lover/1468058165`. The two letters after the domain (`us`) are the storefront, and the number at the end (`1468058165`) is the Apple Music album ID. Older album links on itunes.apple.com that contain an album ID work too.

- ✅ Good: `https://music.apple.com/gb/album/lover/1468058165`, or `1468058165` in Album IDs with Storefront country `gb`
- ❌ Bad: a playlist, song or artist link, or a number with fewer than 5 digits

> ⚠️ An input that is not an album link or an album ID of at least 5 digits gets a row with `lookupStatus` `invalidInput`. It is not charged.

> ⚠️ Exact duplicate entries are removed before the run starts. The same album given once as a link and once as an ID counts as two inputs, and both are charged if found.

#### Storefront country

The storefront must be exactly two letters. A value like `Germany` stops the run with an input error before any album is requested. An album can exist in one storefront and be missing in another; it then gets `lookupStatus` `notFound`.

- ✅ Good: `de`
- ❌ Bad: `Germany`

#### Use backup source

The backup source is a second public source the Actor tries when an album page has no usable data. The trade-off: with it on (the default), you get more albums found, but those records are a little less detailed (see the note below). With it off, an album whose page can't be read becomes an `error` row instead. Most users leave it on.

> ⚠️ Records from the backup source credit only the main album artist, and their `releaseInfo` is built from the release date, song count, total length and copyright instead of the album page text.

***

### ⬆️ Output

Each run fills four tables in the **Output** tab: **Albums**, **Tracks**, **Artists** and **Lookup status**, plus a **Run summary**. You can view them as a table or as JSON and pick the fields you need.

To download, open the run's **Storage** tab, go to **Datasets**, pick a dataset and click **Export** (JSON, CSV, Excel, XML or HTML). The default dataset holds one row per processed album link or ID, with the nested tracklist for found albums. The **tracks** and **artists** datasets hold one row per track and one row per credited artist. The run totals (albums stored, charged, not found, failed and skipped, tracks collected and run duration) are in the **Run summary** tab of the Output. Behind the scenes this is a record called `SUMMARY` in the run's key-value store (a small file store that comes with every run).

This makes Apple Music data export simple: use the Albums table for one row per album, or the Tracks table when you want a flat spreadsheet with one row per song.

#### JSON example: album row

Result for the default input above (the tracklist is shortened to the first track):

```json
{
  "input": "https://music.apple.com/us/album/lover/1468058165",
  "lookupStatus": "found",
  "album": {
    "platform": "apple_music",
    "albumId": "1468058165",
    "title": "Lover",
    "coverArtUrl": "https://is1-ssl.mzstatic.com/image/thumb/.../1200x1200bb.jpg",
    "albumUrl": "https://music.apple.com/us/album/lover/1468058165",
    "artists": [
      {
        "artistId": "159260351",
        "displayName": "Taylor Swift",
        "profileUrl": "https://music.apple.com/us/artist/taylor-swift/159260351"
      }
    ],
    "trackCount": 18,
    "releaseInfo": "August 23, 2019\n18 songs, 1 hour 1 minute\n℗ 2019 Taylor Swift",
    "tracks": [
      {
        "trackId": "1468058169",
        "title": "I Forgot That You Existed",
        "trackNumber": 1,
        "durationMs": 170651,
        "discNumber": 1,
        "explicit": false,
        "albumId": "1468058165"
      }
    ]
  }
}
```

#### JSON example: track and artist rows

The same album in the Tracks table (first row) and the Artists table:

```json
{
  "albumId": "1468058165",
  "albumTitle": "Lover",
  "discNumber": 1,
  "trackNumber": 1,
  "title": "I Forgot That You Existed",
  "durationMs": 170651,
  "explicit": false,
  "trackId": "1468058169"
}
```

```json
{
  "albumId": "1468058165",
  "albumTitle": "Lover",
  "artistId": "159260351",
  "displayName": "Taylor Swift",
  "profileUrl": "https://music.apple.com/us/artist/taylor-swift/159260351"
}
```

#### What the lookup status means

| Status | Meaning | Charged? |
|---|---|---|
| 🎯 `found` | The album was collected with its tracklist | Yes, one result |
| 📭 `notFound` | The album isn't available in that storefront, or it has no tracklist | No |
| ⛔ `blocked` | Apple Music rejected the request | No |
| 💥 `error` | The album couldn't be read | No |
| 🚫 `invalidInput` | Not an album link or an album ID | No |

**What to do with `blocked` and `error` rows:** copy those inputs from the Lookup status table into a new run a while later, with **Parallel albums** set lower (for example 2). They cost nothing until they are found. If the same album keeps coming back as `blocked` or `error`, open an issue on the [Issues tab](https://apify.com/insights_data/apple-music-album-scraper/issues/open) with the run link.

A row for an input that failed looks like this:

```json
{
  "input": "https://music.apple.com/us/playlist/todays-hits/pl.f4d106fed2bd41149aaacabb233eb5eb",
  "lookupStatus": "invalidInput",
  "album": null
}
```

***

### 💡 Tips and advanced usage

#### How many albums can you scrape in one run?

There is no item cap: every unique album link or ID you enter is processed. Only the maximum charge limit, if you set one, stops a run early. How many albums come back as `found` depends on the storefront and on whether Apple Music accepts the requests, so start with a small test run.

#### Check album availability by country

Add the same album link several times with a different storefront in each (`/us/`, `/gb/`, `/de/`, `/jp/`). These are different entries, so each one gets its own row. Open the **Lookup status** table: `found` means the album is live in that storefront, `notFound` means it isn't. This is the narrow kind of music market research the Actor supports: which catalog is live where.

#### Compare album tracklists between editions

Put a standard edition and a bonus or deluxe edition in one run, for example the album IDs `1440768692` and `1440857781` (two editions of the same album, with 14 and 15 songs in the US storefront). Then export the Tracks table, filter it by `albumId` in your spreadsheet and compare `trackNumber`, `title` and `durationMs`.

#### Run an explicit content check

Export the Tracks table and filter on `explicit` = `true`. Each track row also carries `albumId` and `albumTitle`, so you can see which album each explicit track is on.

#### Run it on a schedule

The Actor doesn't compare runs for you, but schedules make a regular check easy:

1. Fill in the albums you care about and save the input as a **task** (the **Save as a new task** button).
2. In the Console, open **Schedules**, create a schedule (for example weekly on Monday) and add the task to it. See [Apify schedules](https://docs.apify.com/platform/schedules).
3. After each run, export the Albums table as CSV and paste it into a new sheet next to the last run. A simple way to compare: in a spreadsheet, use `XLOOKUP` (or `VLOOKUP`) on `album.albumId` to bring the old `album.trackCount` and `lookupStatus` next to the new ones. A new track count, a changed `album.releaseInfo` or a status that moved from `found` to `notFound` shows what changed. For track-level changes, do the same with the Tracks table on `trackId`.

#### Known issues

- Records from the backup source credit only the main album artist.
- Playlists, songs and artist pages are not supported as input; they return `invalidInput`.
- When the maximum charge limit is reached, albums not processed yet are skipped without a row.

***

### 🔌 Apple Music Album Scraper integrations and API

#### Can I use Apple Music Album Scraper as an Apple Music API?

Yes, as an unofficial Apple Music album API on top of the [Apify API](https://docs.apify.com/api/v2): start runs, wait for them and read the results from your own code. Use the `apify-client` package for [Node.js](https://apify.com/insights_data/apple-music-album-scraper/api/javascript) or [Python](https://apify.com/insights_data/apple-music-album-scraper/api/python). The [API tab](https://apify.com/insights_data/apple-music-album-scraper/api) has ready-to-use code. Catalog tools can call it like an unofficial Apple Music metadata API: send album links or IDs and get JSON records back. It is not an Apple product and comes with no service-level guarantee.

#### Apple Music API Python example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("insights_data/apple-music-album-scraper").call(run_input={
    "startUrls": ["https://music.apple.com/us/album/lover/1468058165"]
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["lookupStatus"] == "found":
        album = item["album"]
        print(album["title"], album["trackCount"])
        for track in album["tracks"]:
            print(track["trackNumber"], track["title"], track["durationMs"], track["explicit"])
```

#### How do I send Apple Music data to Google Sheets?

The no-code way is Make, Zapier or n8n (see [Apify integrations](https://apify.com/integrations)): use the Apify "run finished" trigger for your task, read the dataset items of the run (the Albums table, or the Tracks table for one row per song), and add a Google Sheets "add row" step. For a one-off, export the run as CSV (Storage → Datasets → Export) and import it into Google Sheets.

#### Can I integrate Apple Music Album Scraper with other apps?

Yes. Through [Apify integrations](https://apify.com/integrations) you can connect it with Make, Zapier, n8n, Slack, Google Sheets, Google Drive, Airbyte and more. Two workflows that fit this Actor:

- 🔔 **Slack alert for a metadata check:** schedule the task weekly and add a [webhook](https://docs.apify.com/platform/integrations/webhooks) for "run succeeded" that posts to Slack through Make or Zapier, so your team sees the run status (for example how many albums were stored) and can open the Lookup status table.
- 🗂️ **Catalog sync:** a webhook calls your own endpoint when a run finishes; your code reads the default dataset through the Apify API and updates track IDs, durations and explicit flags in your catalog for music analytics or reporting. This is not an official music metadata API, so let your code handle `blocked` or `error` rows by retrying them later.

#### Can I use Apple Music Album Scraper with AI agents (MCP)?

Yes. MCP (Model Context Protocol) is a standard way for AI assistants to use outside tools. AI assistants such as Claude can find and run this Actor through the Apify MCP server. Open the [MCP tab](https://apify.com/insights_data/apple-music-album-scraper/api/mcp) for setup steps.

***

### 🧩 Other Apple Music and music data scrapers

These Actors from the same account cover other music data:

| Actor | What it adds |
|---|---|
| 🔍 [Apple Music Scraper](https://apify.com/insights_data/apple-music-scraper) | Search Apple Music by link or keyword and get artists, albums, songs, playlists, stations, music videos and radio episodes |
| 🏷️ [TikTok Hashtag Scraper](https://apify.com/insights_data/tiktok-hashtag-scraper) | Videos of any TikTok hashtag with views, likes, author stats and the music used |
| 👤 [TikTok Profile Scraper](https://apify.com/insights_data/tiktok-profile-scraper) | Videos of any TikTok profile with views, likes, comments, shares, music and hashtags |

***

### ❓ FAQ

#### Is it legal to scrape Apple Music?

Web scraping is generally legal when you collect publicly available data, and album details and tracklists are public. Still, respect intellectual property such as cover art, only collect personal data with a legitimate reason (for example under GDPR), and take the [Apple Media Services Terms and Conditions](https://www.apple.com/legal/internet-services/itunes/us/terms.html) into account. This is not legal advice; ask a lawyer if you're unsure.

#### How does Apple Music Album Scraper work?

It opens the public Apple Music album page for each link or ID in the right storefront, like a visitor browsing the site, and reads the album details and tracklist. If the page has no usable data and the backup is on, it tries a second public source. Each found album is saved as soon as it is ready, together with its tracks and artists in their own tables. Inputs that are not found or fail get a status row.

#### Do I need an Apple account to scrape Apple Music?

No. The Actor reads public album pages only. You don't need an Apple account, login, cookies or an Apple developer key.

#### Is there an Apple Music API free of charge for album data?

This Actor is not free of charge: it charges one result per found album. But the $5 monthly credit of the Apify Free plan covers both the result charges and the platform usage, so you can test it without paying, and you don't need any Apple key to use it.

#### Can this Apple Music extractor read playlists or songs?

No. It accepts album links and album IDs only; playlist, song and artist links return `invalidInput`. To search the Apple Music catalog or get playlists and songs, use [Apple Music Scraper](https://apify.com/insights_data/apple-music-scraper).

#### How is Apple Music Album Scraper different from Apple Music Scraper?

Apple Music Album Scraper goes deep on albums you already know; [Apple Music Scraper](https://apify.com/insights_data/apple-music-scraper) goes wide across search results.

| | Apple Music Album Scraper | Apple Music Scraper |
|---|---|---|
| Input | Album links and album IDs | Links or keywords |
| Result | One record per album | One record per search |
| Content | Album details and the full tracklist with track IDs, disc and track numbers, durations and explicit flags | Artists, albums, songs, playlists, stations, music videos and radio episodes |
| Best for | Catalog enrichment, metadata audits, tracklist comparisons | Finding what exists on Apple Music for a search |

#### Does it work with iTunes album data?

It works with album links from itunes.apple.com that contain an album ID, so you can use old itunes album data links as input. The output is the same Apple Music record as for a music.apple.com link.

#### How do I get the Apple Music album cover?

Every found album has `coverArtUrl`, a link to the Apple Music album cover at 1200x1200. Export the Albums table and you have the cover link next to each album. The Actor gives you the link; it doesn't download image files.

#### Where can I find the Apple Music album info like release date?

It's in `releaseInfo`: the release date, the number of songs and total length, and often a copyright line, each on its own line, as shown on the album page.

#### How do I export Apple Music album to CSV?

Open the run's **Storage** tab, go to **Datasets**, choose the Albums (default) or Tracks dataset and click **Export**, then pick CSV. The Tracks table gives one row per song, which is a handy format for spreadsheets.

#### Who uses Apple Music album metadata?

Record labels and distributors check their releases, music app builders fill their catalogs, and researchers build a music dataset of tracklists and durations. Clean music metadata such as track IDs, track numbers and explicit flags is useful wherever albums need to match across systems.

#### Why am I getting fewer results than expected?

- If the whole run fails right at the start, the input was rejected: the message on the run page tells you why (for example a storefront that isn't two letters, or no album link at all).
- If a run ends with 0 albums found, the status message on the run page shows how many were not available and how many failed.
- Check the **Lookup status** table. `notFound` usually means the album isn't available in that storefront; try another country.
- `invalidInput` means the entry isn't an album link or an album ID of at least 5 digits.
- Many `blocked` rows: lower **Parallel albums** and run again later.
- If you set a maximum charge limit, the run stops when it's reached and the rest is skipped.
- Exact duplicate entries are collected once.

***

### 📧 Support and feedback

Found a bug or want a field added? Please create an issue on the [Issues tab](https://apify.com/insights_data/apple-music-album-scraper/issues/open).

Need a **custom solution**, more fields or a different music data source? Contact us at hello.insights.data@gmail.com.

Built and maintained by [insights_data](https://apify.com/insights_data).

# Changelog

This Actor's version history is a separate document: https://apify.com/insights_data/apple-music-album-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Apple Music album links, one per row (for example https://music.apple.com/us/album/lover/1468058165). Add as many as you like. Each link carries its own storefront country.

## `albumIds` (type: `array`):

Optional numeric album IDs (for example 1468058165), one per row. They use the storefront country selected below.

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

Two-letter storefront (us, gb, de, jp ...) used for album IDs. Album URLs always use their own storefront.

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

How many albums are collected at the same time (1-10). Lower it if you see many blocked requests.

## `useBackupSource` (type: `boolean`):

When the main source has no usable data for an album, try a second public source and return the same record shape.

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

Default: no proxy. If a request is rejected, the run switches automatically to a datacenter proxy and then to a residential proxy.

## Actor input object example

```json
{
  "startUrls": [
    "https://music.apple.com/us/album/lover/1468058165"
  ],
  "country": "us",
  "maxConcurrency": 5,
  "useBackupSource": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `albums` (type: `string`):

One row per album: title, artists, cover, release info and track count.

## `tracks` (type: `string`):

One row per track of every album.

## `artists` (type: `string`):

One row per credited artist of every album.

## `status` (type: `string`):

Result of each requested album or ID (found, notFound, blocked, error, invalidInput).

## `summary` (type: `string`):

Counts of stored and failed albums plus request statistics.

# 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 = {
    "startUrls": [
        "https://music.apple.com/us/album/lover/1468058165"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("insights_data/apple-music-album-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 = {
    "startUrls": ["https://music.apple.com/us/album/lover/1468058165"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("insights_data/apple-music-album-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 '{
  "startUrls": [
    "https://music.apple.com/us/album/lover/1468058165"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call insights_data/apple-music-album-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,insights_data/apple-music-album-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/F68CCUvbD5XX1bc46/builds/mtCkapStg42Kry7gS/openapi.json
