# Spotify Scraper (`axlymxp/spotify-scraper`) Actor

Scrape Spotify tracks, artists, albums and playlists by keyword or URL. Get monthly listeners, followers, play counts, durations, release dates, popularity, images — plus ISRC and UPC codes for royalty matching and catalog work. Clean JSON, no API key. Pay only for results.

- **URL**: https://apify.com/axlymxp/spotify-scraper.md
- **Developed by:** [axly](https://apify.com/axlymxp) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 dataset items

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/platform/actors/running/actors-in-store#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

## Spotify Scraper

Extract structured data from **Spotify** — tracks, artists, albums and playlists —
by keyword search or direct URL. Get the fields most scrapers skip: **ISRC** codes
per track and **UPC** codes per album, alongside monthly listeners, followers, play
counts, durations, release dates, popularity and images. Clean JSON, no API key,
no login.

> Not affiliated with Spotify. Reads public catalog data from Spotify's own web and
> mobile backends for research, analytics and interoperability.

### Who it's for

- **Labels, distributors & rights teams** — map Spotify IDs to **ISRC/UPC** codes
  for royalty matching, catalog reconciliation and metadata QA.
- **Artist marketers, A\&R & analysts** — track monthly listeners, followers, play
  counts, top tracks and discography size across artists.
- **Playlist & curation teams** — pull playlist metadata and tracklists.
- **SaaS / data teams & researchers** — a stable, documented JSON feed with no API
  key and an MCP endpoint for AI agents.

### What you get (output fields)

Every row has a `type` (`track` / `artist` / `album` / `playlist`) plus common
identity fields and type-specific data.

| Field | Type | Applies to | Description |
| ----- | ---- | ---------- | ----------- |
| `type` | string | all | `track`, `artist`, `album` or `playlist` |
| `spotifyId` / `uri` / `url` | string | all | Spotify identifiers and open.spotify.com link |
| `name` | string | all | Entity name |
| `artists` / `artistNames` | array / string | track, album | Contributing artists |
| `albumName` / `albumId` | string | track | Parent album |
| `durationMs` / `durationText` | int / string | track | Length |
| `isrc` | string | track | **International Standard Recording Code** |
| `popularity` | int | track, album | Spotify popularity 0–100 |
| `playCount` | int | track | Lifetime stream count |
| `explicit` | bool | track | Explicit flag |
| `followers` | int | artist, playlist | Follower count |
| `monthlyListeners` | int | artist | Monthly listeners |
| `worldRank` | int | artist | Global popularity rank |
| `biography` | string | artist | Artist bio |
| `topTracks` | array | artist | Top tracks with play counts |
| `topCities` | array | artist | Top listener cities |
| `externalLinks` | array | artist | Social / external links |
| `albumCount` / `singleCount` / `compilationCount` | int | artist | Discography sizes |
| `label` | string | album | Record label |
| `releaseDate` | string | album | Release date (YYYY-MM-DD) |
| `upc` | string | album | **Universal Product Code** |
| `totalTracks` | int | album, playlist | Track count |
| `copyrights` | array | album | Copyright lines |
| `ownerName` / `ownerUsername` | string | playlist | Playlist owner |
| `description` | string | playlist | Playlist description |
| `tracks` | array | album, playlist | Embedded tracklist (optional) |
| `imageUrl` | string | all | Cover / avatar image |
| `scrapedAt` | string | all | UTC ISO-8601 timestamp |

### Use cases

- **Royalty & catalog reconciliation** — export ISRC/UPC ↔ Spotify ID mappings to
  match your catalog against streaming metadata.
- **Artist monitoring** — schedule daily runs to track monthly listeners, followers
  and play-count momentum for a roster of artists.
- **Playlist intelligence** — capture playlist followers and tracklists for pitching
  and placement analysis.
- **Music datasets** — build search-driven datasets for ML, recommendation or trend
  research.
- **Metadata enrichment** — feed clean track/album metadata into your app or DB.

### Input parameters

| Parameter | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| `searchQueries` | array | — | Keywords to search Spotify for |
| `startUrls` | array | — | Direct track/artist/album/playlist URLs or URIs |
| `resultTypes` | array | all | Types to keep from search: tracks, artists, albums, playlists |
| `maxItems` | integer | 100 | Stop after this many rows |
| `searchLimit` | integer | 20 | Items per type per query (1–50) |
| `includeISRC` | boolean | true | Add ISRC/UPC + popularity (one extra request per entity) |
| `includeAlbumTracks` | boolean | false | Embed album tracklists |
| `includePlaylistTracks` | boolean | false | Embed playlist tracks |
| `playlistTrackLimit` | integer | 100 | Cap embedded playlist tracks |
| `market` | string | US | ISO country code |
| `locale` | string | en | Language for text fields |
| `proxyConfiguration` | object | none | Optional Apify proxy (not required) |

Provide at least one of `searchQueries` or `startUrls`.

#### Example input

```json
{
  "searchQueries": ["daft punk"],
  "startUrls": ["https://open.spotify.com/album/4m2880jivSbbyEGAKfITCa"],
  "resultTypes": ["tracks", "artists", "albums"],
  "maxItems": 50,
  "includeISRC": true,
  "includeAlbumTracks": true
}
```

#### Example output (artist row)

```json
{
  "type": "artist",
  "spotifyId": "4tZwfgrHOc3mvqYlEYSvVi",
  "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi",
  "url": "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi",
  "name": "Daft Punk",
  "verified": true,
  "followers": 11652253,
  "monthlyListeners": 29432983,
  "worldRank": 0,
  "topTracks": [{ "name": "One More Time", "uri": "spotify:track:0DiWol3AO6WpXZgp0goxAV", "playCount": 946944562 }],
  "albumCount": 6,
  "imageUrl": "https://i.scdn.co/image/...",
  "scrapedAt": "2026-08-05T07:38:27+00:00"
}
```

### Scheduling & integrations

- **Schedule** runs (hourly/daily/weekly) from the Apify Console to keep datasets
  fresh.
- **Webhooks** can fire on run completion to push new data into your pipeline.
- Export to **CSV, JSON, Excel, XML** or pull via the **Apify API**; connect to
  **Google Sheets, Make, Zapier, Airbyte** or **S3**.

### Use with AI agents (MCP)

This actor is available over Apify's **MCP** interface, so assistants like Claude or
ChatGPT can call it as a tool — e.g. "get the ISRC and monthly listeners for these
Spotify artists". Point your MCP client at the Apify MCP server and enable this
actor.

### FAQ

**Do I need a Spotify API key or account?** No. The actor reads public catalog data
anonymously.

**How fresh is the data?** Every run fetches live data from Spotify at run time.

**What is ISRC / UPC?** ISRC is the International Standard Recording Code that
uniquely identifies a recording; UPC identifies a release. Both are used across the
music industry for royalties and catalog matching.

**Can it handle large jobs?** Yes — set `maxItems`, and the actor checkpoints
progress so interrupted runs resume without duplicating rows. For extracting every
track from big playlists, use the companion **Spotify Playlist Track Extractor**.

**Is a proxy required?** No. Spotify's endpoints have no anti-bot here; a proxy is
optional for a specific egress region.

**Is this legal / allowed?** You are responsible for your use. This tool accesses
publicly available data; review Spotify's terms and your local laws before scraping,
and use the official Spotify API where it fits.

**A field is empty — why?** Fields only appear when Spotify provides them for that
entity (e.g. `playCount` for tracks, `monthlyListeners` for artists). Null fields
are omitted from each row.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search Spotify for, e.g. "daft punk", "lo-fi beats". Each query returns the top tracks/artists/albums/playlists (see Result types). Leave empty if you only pass Start URLs.

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

Direct Spotify links or URIs to scrape: track, artist, album or playlist. Accepts https://open.spotify.com/... URLs and spotify:track:... URIs. The type is detected automatically.

## `resultTypes` (type: `array`):

Which entity types to keep from each search query. Ignored for Start URLs (their type is detected).

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

Stop after this many top-level rows (each track/artist/album/playlist is one row).

## `searchLimit` (type: `integer`):

How many items to take from each result type per search query (1–50).

## `includeISRC` (type: `boolean`):

Enrich tracks with their ISRC code and popularity, and albums with their UPC code (one extra request per entity via Spotify's mobile backend). These industry identifiers are used for royalty matching and catalog reconciliation.

## `includeAlbumTracks` (type: `boolean`):

For albums, embed the full ordered tracklist (name, artists, duration, track number) inside the album row.

## `includePlaylistTracks` (type: `boolean`):

For playlists, embed the tracks (up to the limit below) inside the playlist row. For large-scale playlist extraction use the dedicated Spotify Playlist Track Extractor.

## `playlistTrackLimit` (type: `integer`):

When 'Include playlist tracks' is on, cap embedded tracks per playlist.

## `market` (type: `string`):

ISO 3166-1 alpha-2 market for availability/metadata, e.g. US, GB, DE.

## `locale` (type: `string`):

Language for text fields where available, e.g. en, es, de.

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

Optional Apify proxy. Spotify's endpoints work without a proxy; use one only if you need a specific egress region.

## Actor input object example

```json
{
  "searchQueries": [
    "daft punk"
  ],
  "startUrls": [
    "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi",
    "https://open.spotify.com/album/4m2880jivSbbyEGAKfITCa"
  ],
  "resultTypes": [
    "tracks",
    "artists",
    "albums",
    "playlists"
  ],
  "maxItems": 100,
  "searchLimit": 20,
  "includeISRC": true,
  "includeAlbumTracks": false,
  "includePlaylistTracks": false,
  "playlistTrackLimit": 100,
  "market": "US",
  "locale": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searchQueries": [
        "daft punk"
    ],
    "startUrls": [
        "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi",
        "https://open.spotify.com/album/4m2880jivSbbyEGAKfITCa"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/spotify-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 = {
    "searchQueries": ["daft punk"],
    "startUrls": [
        "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi",
        "https://open.spotify.com/album/4m2880jivSbbyEGAKfITCa",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/spotify-scraper").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 '{
  "searchQueries": [
    "daft punk"
  ],
  "startUrls": [
    "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi",
    "https://open.spotify.com/album/4m2880jivSbbyEGAKfITCa"
  ]
}' |
apify call axlymxp/spotify-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/n5hQpNZX2x57cdLAX/builds/rGPiidEauIPuavW5Q/openapi.json
