# Spotify Scraper — Artists, Tracks, Playlists & Play Counts (`trakk/spotify-scraper`) Actor

Scrape Spotify without login: artists, tracks, albums, playlists, podcasts & episodes — with real play counts, monthly listeners, followers and world rank that the official API hides. Bonus: playlist placement + growth monitoring. Fast, request-only, no API key. Export to JSON, CSV, Excel.

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

## Pricing

from $5.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.

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

<div align="center">

## 🎧 Spotify Scraper

#### Artists, tracks, albums, playlists & podcasts — with real play counts

Pull the data Spotify's official API hides: **exact play counts, monthly listeners, follower counts and world rank** — plus full metadata for artists, tracks, albums, playlists, podcasts and episodes. No login, no API keys, request-only.

**🎤 Artists · 🎵 Tracks · 💿 Albums · 📃 Playlists · 🎙️ Podcasts · 🔎 Search**

</div>

***

### 🚀 What this Actor gives you

The official Spotify Web API returns metadata — but **not play counts or monthly listeners**. This Actor reads the same internal data the Spotify web player uses, so you get the numbers that actually matter.

| Capability | What you get |
|---|---|
| 🎤 **Artists** | **Monthly listeners**, followers, **world rank**, top tracks (with play counts), top cities, "fans also like", biography, verified status |
| 🎵 **Tracks** | **Exact play count**, artists, album, release date, duration |
| 💿 **Albums** | Track list with **per-track play counts**, total play count, label, release date |
| 📃 **Playlists** | Followers, owner, full track list (paginated) with play counts |
| 🎙️ **Podcasts & episodes** | Show + episode metadata, episode counts, durations, release dates |
| 🔎 **Search** | Turn any keyword into fully-scraped entities |

#### Great for

- 📈 Artist & label analytics, A\&R and momentum tracking
- 🎯 Playlist-pitching and placement research
- 🥊 Competitor and catalog benchmarking
- 🤖 Music datasets for dashboards, ML and RAG
- 📁 JSON, CSV, Excel, API, webhook, Make & Zapier workflows

***

### ✨ Our extras (beyond the usual scrapers)

- **🎯 Playlist Placement** — for any artist, list the playlists that feature them, with reach (followers). The intel labels pay for when pitching.
- **📈 Growth Monitor** — compare monthly listeners / followers / play counts against your previous run and get the **deltas** attached automatically. Schedule it to track momentum over time.

***

### ⚡ Quick start

#### Scrape an artist (with play counts + monthly listeners)

```json
{
  "spotifyUrls": ["https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"]
}
```

#### Mix any entity types — auto-detected

```json
{
  "spotifyUrls": [
    "https://open.spotify.com/track/0V3wPSX9ygBnCm8psDIegu",
    "https://open.spotify.com/album/151w1FgRZfnKZA9FEcg9Z3",
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ]
}
```

#### Search, then fully scrape the matches

```json
{ "searchQueries": ["taylor swift", "the weeknd"], "searchType": "artist", "maxSearchResults": 5 }
```

#### Track an artist's growth + playlist placement

```json
{
  "spotifyUrls": ["https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ"],
  "growthMonitor": true,
  "monitorKey": "my-roster",
  "playlistPlacement": true
}
```

***

### 🎛️ Input reference

| Field | Type | Default | Description |
|---|---|---:|---|
| `spotifyUrls` | url list | — | Any Spotify URLs/URIs (artist/track/album/playlist/show/episode) |
| `searchQueries` | string list | — | Keywords; matched entities are fully scraped |
| `searchType` | select | `all` | Keep `artist`, `track`, `album`, `playlist`, `podcast`, or `all` |
| `maxSearchResults` | integer | `10` | Entities scraped per query |
| `artistIds` … `episodeIds` | string list | — | Bare IDs per type |
| `includePlaylistTracks` | boolean | `true` | Fetch full playlist track lists |
| `maxPlaylistTracks` | integer | `1000` | Cap on tracks per playlist |
| `playlistPlacement` | boolean | `false` | Add playlists featuring each artist |
| `growthMonitor` | boolean | `false` | Attach deltas vs the previous run |
| `monitorKey` | string | `default` | Groups Growth Monitor snapshots |
| `maxItems` | integer | `0` | Global cap (0 = unlimited) |
| `proxyConfiguration` | object | Residential US | The default is recommended |

***

### 📦 Example — artist

```json
{
  "type": "artist",
  "name": "Taylor Swift",
  "monthlyListeners": 100769724,
  "followers": 161769264,
  "worldRank": 6,
  "verified": true,
  "topTracks": [{ "name": "Anti-Hero", "playcount": 2036599665 }],
  "relatedArtists": [{ "name": "Olivia Rodrigo" }],
  "topCities": [{ "city": "London", "country": "GB", "listeners": 1635219 }],
  "url": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
}
```

***

### 🧾 Output fields

Every record is flat and clean, with a `type` field so you can tell them apart. Empty optional fields are dropped.

| Type | Fields you get |
|---|---|
| 🎤 **artist** | `name`, `monthlyListeners`, `followers`, `worldRank`, `verified`, `topTracks` (name + play count), `relatedArtists`, `topCities`, `biography`, `avatarImage`, `externalLinks`, `url` |
| 🎵 **track** | `name`, `playcount`, `artists`, `albumName`, `releaseDate`, `durationMs`, `trackNumber`, `explicit`, `coverArt`, `url` |
| 💿 **album** | `name`, `label`, `releaseDate`, `trackCount`, `artists`, `totalPlaycount`, `tracks` (each with play count), `coverArt`, `url` |
| 📃 **playlist** | `name`, `description`, `followers`, `ownerName`, `trackCount`, `tracks` (each with play count), `url` |
| 🎙️ **podcast** | `name`, `episodeCount`, `episodes` (name, date, duration), `url` |
| 🎧 **episode** | `name`, `description`, `durationMs`, `releaseDate`, `podcastName`, `url` |

With add-ons: artists gain `featuredPlaylists` (Playlist Placement) and, in monitored runs, a `growth` object with `monthlyListenersDelta` / `followersDelta` / `playcountDelta` since the previous run.

***

### 🔒 How it works

The Actor talks to Spotify's public web-player data layer over plain HTTP requests — no browser, no account, no API key. Residential proxies (the default) keep access reliable. Rate limits and transient blocks are retried automatically.

### ❓ FAQ

**Do I need a Spotify account or API key?** No. It's request-only and anonymous.

**Are play counts real?** Yes — the same numbers shown on the Spotify web player, which the official API does not expose.

**Why did an item come back empty?** Some episodes/tracks are geo-restricted; those are reported in the `errors` dataset, never crashing the run.

**Can I schedule growth tracking?** Yes — enable `growthMonitor` with a stable `monitorKey` and schedule the run; each run attaches deltas since the last.

***

<div align="center">

**The play counts the API won't give you. One run.** 🎧

</div>

# Actor input Schema

## `spotifyUrls` (type: `array`):

Any Spotify URLs/URIs — artist, track, album, playlist, podcast (show) or episode. Type is auto-detected.

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

Keywords to search on Spotify. Matched entities are fully scraped (with play counts).

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

Which entity type to keep from search results.

## `maxSearchResults` (type: `integer`):

Cap on entities scraped per search query.

## `artistIds` (type: `array`):

Bare Spotify artist IDs.

## `trackIds` (type: `array`):

Bare Spotify track IDs.

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

Bare Spotify album IDs.

## `playlistIds` (type: `array`):

Bare Spotify playlist IDs.

## `podcastIds` (type: `array`):

Bare Spotify show IDs.

## `episodeIds` (type: `array`):

Bare Spotify episode IDs.

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

Fetch the full track list for playlists (paginated). Turn off for playlist metadata only.

## `maxPlaylistTracks` (type: `integer`):

Cap on tracks fetched per playlist.

## `playlistPlacement` (type: `boolean`):

For each artist, also list the playlists that feature them, with reach (followers). Great for playlist-pitching intelligence.

## `growthMonitor` (type: `boolean`):

Compare monthly listeners / followers / play counts against the previous run and attach the deltas. Schedule the run to track momentum over time.

## `monitorKey` (type: `string`):

Stable key that groups Growth Monitor snapshots. Reuse the same key across scheduled runs.

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

Global cap on saved items. 0 = unlimited.

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

Residential US proxy is recommended for reliable access.

## `selfTest` (type: `boolean`):

Scrape a known artist and verify play counts / monthly listeners still work. Fails the run if Spotify changed something — use it for scheduled monitoring.

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

Parallel requests.

## `maxRetries` (type: `integer`):

Retries per request.

## Actor input object example

```json
{
  "spotifyUrls": [
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
  ],
  "searchType": "all",
  "maxSearchResults": 10,
  "includePlaylistTracks": true,
  "maxPlaylistTracks": 1000,
  "playlistPlacement": false,
  "growthMonitor": false,
  "monitorKey": "default",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "selfTest": false,
  "maxConcurrency": 5,
  "maxRetries": 5
}
```

# 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 = {
    "spotifyUrls": [
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trakk/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 = { "spotifyUrls": ["https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"] }

# Run the Actor and wait for it to finish
run = client.actor("trakk/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 '{
  "spotifyUrls": [
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
  ]
}' |
apify call trakk/spotify-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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