# Spotify Scraper - Play Counts, Monthly Listeners, Playlists (`mina_safwat/spotify-play-count-scraper`) Actor

Gets exact Spotify play counts for every track of an album or playlist, an artist's monthly listeners, followers, world rank, top cities and top tracks, plus tempo and key for playlist tracks. Paste links or search.

- **URL**: https://apify.com/mina_safwat/spotify-play-count-scraper.md
- **Developed by:** [Mina](https://apify.com/mina_safwat) (community)
- **Categories:** Videos, Marketing, For creators
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 rows

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/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 Spotify Scraper - Play Counts, Monthly Listeners, Playlists do?

**Spotify Scraper** gets the **exact play count of every track** on a Spotify album or playlist, and an artist's **monthly listeners, followers, world rank, top 5 cities and top 10 tracks**, numbers the official Spotify Web API does not give you. Paste links from [open.spotify.com](https://open.spotify.com) (artists, albums, tracks or playlists) or type search words, and get clean rows ready for a spreadsheet. Playlist tracks also come with their **tempo (BPM), musical key and Camelot key**, the date each was added, and the playlist's follower count.

Try it with the two prefilled links: open the Actor, click **Start**, and the rows are ready in a few seconds. Because it runs on the Apify platform, you also get API access, scheduled runs, integrations (Google Sheets, Make, Zapier, Slack, webhooks) and run monitoring. No Spotify account, login or API key is needed.

### Why scrape Spotify play counts?

- **Track streaming performance.** Play counts per track show which songs are growing, day by day if you schedule the run.
- **Artist research and A\&R.** Monthly listeners, followers, world rank and top cities show how big an artist is and where their audience lives.
- **Playlist pitching and curator research.** See the follower count, owner and full track list of any public playlist, with each track's plays, tempo and key.
- **Label and catalogue reporting.** Read a whole album or compilation with label, release date and copyright on every row.
- **DJ and music-tech datasets.** BPM, key and Camelot key for every playlist track, ready for harmonic mixing or recommendation tools.

### How to scrape Spotify play counts and monthly listeners

1. Open Spotify in your browser (or use **Share → Copy link** in the app) on an artist, album, track or playlist.
2. Paste the link into **Spotify links**, one per line. Links like `https://open.spotify.com/album/151w1FgRZfnKZA9FEcg9Z3`, `open.spotify.com/intl-de/playlist/…?si=…` and URIs like `spotify:track:0V3wPSX9ygBnCm8psDIegu` all work.
3. Optionally type **search words** and choose whether to search for tracks, artists, albums or playlists.
4. Set **Max rows per link or search** if you want to read long playlists in full (the default is 100).
5. Click **Start**, then download the results when the run finishes.

### Input

Everything is set on the Input tab. In JSON, the input looks like this:

```json
{
    "startUrls": [
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
        "https://open.spotify.com/album/151w1FgRZfnKZA9FEcg9Z3"
    ],
    "maxItemsPerUrl": 100,
    "includeArtistTopTracks": true,
    "searchQueries": ["drake"],
    "searchType": "tracks"
}
```

| Field | What it does |
|---|---|
| `startUrls` | Artist, album, track or playlist links (or `spotify:` URIs). Plain strings and `{"url": "…"}` objects are both accepted. |
| `maxItemsPerUrl` | Stops after this many rows for each link and each search. Default: 100. Albums and playlists are read in order, so this keeps the first tracks. |
| `includeArtistTopTracks` | Adds the artist's top 10 tracks, with play counts, as a list inside the artist row. Default: on. |
| `searchQueries` | Optional search words, one search per line. |
| `searchType` | `tracks` (default), `artists`, `albums` or `playlists`. Albums and playlists found are read like pasted links, until the row limit for the search is reached. |
| `proxyConfiguration` | Leave it empty. The Actor connects directly and, if Spotify ever refuses, retries through Apify's datacenter and then residential proxies on its own. |

### Output

An **artist link** gives one artist row. An **album or playlist link** gives one row per track. A **track link** gives one row. Here is a real playlist track row:

```json
{
    "type": "track",
    "id": "3zOYmiNOuyDL0ClxJcEJ0T",
    "name": "Stop The Wedding!",
    "url": "https://open.spotify.com/track/3zOYmiNOuyDL0ClxJcEJ0T",
    "playcount": 85210573,
    "durationMs": 198840,
    "trackNumber": 1,
    "discNumber": 1,
    "explicit": false,
    "artistNames": "Ashe",
    "artists": [{ "id": "6P5NO5hzJbuOqSdyPB7SJM", "name": "Ashe", "url": "https://open.spotify.com/artist/6P5NO5hzJbuOqSdyPB7SJM" }],
    "albumId": "4dem9qxmFf4RD6fqoCH6wc",
    "albumName": "Stop The Wedding!",
    "albumUrl": "https://open.spotify.com/album/4dem9qxmFf4RD6fqoCH6wc",
    "albumType": null,
    "releaseDate": "2026-08-07",
    "label": null,
    "copyright": null,
    "coverImage": "https://i.scdn.co/image/ab67616d0000b2730893a0c33fd4b8497b0ef2f6",
    "playlistId": "37i9dQZF1DXcBWIGoYBM5M",
    "playlistName": "Today’s Top Hits",
    "playlistUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
    "playlistFollowers": 33739476,
    "playlistOwner": "Spotify",
    "playlistOwnerUrl": "https://open.spotify.com/user/spotify",
    "position": 1,
    "addedAt": "2026-09-04T04:02:23.110Z",
    "addedBy": null,
    "bpm": 134.1,
    "musicalKey": "E major",
    "camelotKey": "12B",
    "sourceUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
    "searchQuery": null,
    "scrapedAt": "2026-10-11T07:41:08.679394+00:00"
}
```

And a real artist row, with its lists shortened:

```json
{
    "type": "artist",
    "id": "06HL4z0CvFAxyc27GXpf02",
    "name": "Taylor Swift",
    "url": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "verified": true,
    "followers": 165359906,
    "monthlyListeners": 106586692,
    "worldRank": 5,
    "topCities": [{ "city": "London", "country": "GB", "region": "ENG", "listeners": 1706341 }],
    "albumsCount": 34,
    "singlesCount": 80,
    "compilationsCount": 1,
    "image": "https://i.scdn.co/image/ab6761610000e5eb12184bdd29403de54cb9d9c7",
    "biography": "And, baby, that’s sh0w business f0r y0u ❤️‍🔥",
    "externalLinks": [{ "name": "FACEBOOK", "url": "https://facebook.com/TaylorSwift" }],
    "topTracks": [{ "id": "11hcBLPtbMp4aQI6zGQLub", "name": "Patient Zero", "url": "https://open.spotify.com/track/11hcBLPtbMp4aQI6zGQLub", "playcount": 79472191, "durationMs": 225868, "explicit": false, "albumUrl": "https://open.spotify.com/album/4hF2gTGuPYlykYuphDxi8J" }],
    "sourceUrl": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "searchQuery": null,
    "scrapedAt": "2026-10-11T08:45:04.630229+00:00"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. The Output tab has two views: **Tracks** and **Artists**.

### Data fields

Track rows (`"type": "track"`):

| Field | Description |
|---|---|
| `id`, `name`, `url` | The track's Spotify ID, title and link. |
| `playcount` | Total plays on Spotify, as a number. |
| `durationMs` | Length in milliseconds. |
| `trackNumber`, `discNumber` | Position on its album. `discNumber` is empty for track links and track searches, where Spotify does not send it. |
| `explicit` | `true` when Spotify marks the track explicit. |
| `artistNames`, `artists` | All credited artists, as one text and as a list with ID, name and link. |
| `albumId`, `albumName`, `albumUrl`, `releaseDate`, `coverImage` | The album the track is on. `releaseDate` is `YYYY-MM-DD`, or `YYYY-MM` / `YYYY` when Spotify only knows that much. |
| `albumType` | `ALBUM`, `SINGLE`, `EP` or `COMPILATION`. Empty for playlist tracks. |
| `label`, `copyright` | Record label and copyright lines. `label` is filled for album links and album searches; `copyright` for album and track links and track searches. |
| `playlistId`, `playlistName`, `playlistUrl`, `playlistFollowers`, `playlistOwner`, `playlistOwnerUrl` | The playlist the track was read from (playlist links and playlist searches only). |
| `position`, `addedAt`, `addedBy` | The track's place in the playlist, when it was added (UTC), and who added it, when Spotify shows it. |
| `bpm`, `musicalKey`, `camelotKey` | Tempo, key (such as `E major`) and Camelot key (such as `12B`), for playlist tracks. |

Artist rows (`"type": "artist"`):

| Field | Description |
|---|---|
| `id`, `name`, `url` | The artist's Spotify ID, name and link. |
| `verified` | `true` for verified artists. |
| `followers`, `monthlyListeners` | Follower count and monthly listeners. |
| `worldRank` | The artist's world rank, for the top 500 artists; empty otherwise. |
| `topCities` | Up to 5 cities with the most listeners: `city`, `country`, `region`, `listeners`. |
| `topTracks` | Up to 10 top tracks with `id`, `name`, `url`, `playcount`, `durationMs`, `explicit`, `albumUrl` (when "Include artist top tracks" is on). |
| `albumsCount`, `singlesCount`, `compilationsCount` | How many releases the artist has of each kind. |
| `image`, `biography`, `externalLinks` | Profile picture, the "About" text, and the social links the artist lists. |

Every row also has `sourceUrl` (the link it came from) or `searchQuery` (the search it came from), and `scrapedAt` (when it was collected, in UTC).

### How much does it cost to scrape Spotify?

The Actor uses **pay-per-event** pricing: you pay a small fixed price for each row saved (each track or artist), and nothing for links that give no data. See the **Pricing** tab for the exact price.

It reads Spotify's own web player data over plain HTTP, without a browser, so runs are fast and cheap: the two prefilled links (51 rows) finish in a few seconds. Apify's free plan includes monthly credit you can use to try it. If you set a maximum cost for a run, the Actor stops as soon as it is reached.

### Tips for scraping Spotify

- **Read whole playlists** by raising **Max rows per link or search**; it applies to each link separately, so one long playlist doesn't use up the limit for the others.
- **Track growth over time** by scheduling the same links daily and comparing `playcount` and `monthlyListeners` between runs.
- **Use links rather than search** when you know exactly what you want. Spotify's search returns a short ranked list (often a few dozen results) and always fills it: when few things match your words it adds popular or related items, and even made-up words return results, which are saved and charged like any other rows. Every search row carries its `searchQuery`, so you can filter them afterwards.
- **Turn off "Include artist top tracks"** if you only need artist numbers and want a narrower spreadsheet.
- A track that appears in two of your playlists is saved once for each, with that playlist's details; the same track twice in one playlist is saved once.

### FAQ, disclaimers and support

**Where do the numbers come from?** From the same data Spotify's web player shows to anyone visiting open.spotify.com without logging in. Play counts are Spotify's own totals and update roughly once a day.

**Why did a link return nothing?** Private, deleted and personalised playlists (such as Discover Weekly or Daily Mix, which exist only for one listener), wrong IDs, and playlists holding only podcast episodes give no rows. You are not charged for them. Each is listed with its reason in the `FAILED_INPUTS` record of the run's key-value store, and the run's status message gives the counts. A run fails only when Spotify could not be reached for every link.

**Why did my search return things that don't match?** Spotify's own search does that: it fills its results with popular or related items when few match, the same as in the Spotify app. The Actor saves the results in Spotify's order and does not filter them.

**Are podcasts supported?** No. Podcast shows and episodes are skipped, including episodes inside playlists.

**Is it legal to scrape Spotify?** This Actor reads only public music data that Spotify shows to every visitor: catalogue details, play counts and audience statistics. It collects no listener accounts or private data; playlist owners and "added by" names are the public display names Spotify shows on the playlist. Spotify's terms of use restrict automated access, so you are responsible for making sure your use complies with them and with the laws that apply to you. If in doubt, ask a lawyer.

**Found a problem or need a custom solution?** Open an issue on the **Issues** tab and we will look into it. Custom music data feeds are available on request.

# Actor input Schema

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

Artist, album, track or playlist links from open.spotify.com, one per line (spotify:track:… URIs work too). An artist gives one row with monthly listeners, followers, world rank, top cities and top tracks; an album or playlist gives one row per track with its play count; a track gives one row. Podcasts, user profiles and short spotify.link links cannot be read and are listed in the FAILED_INPUTS record.

## `maxItemsPerUrl` (type: `integer`):

Stops after this many rows for each link and each search. Albums and playlists are read in order, so this keeps the first tracks; raise it (for example to 10000) to read long playlists in full. Artist and track links always give one row.

## `includeArtistTopTracks` (type: `boolean`):

Adds the artist's top 10 tracks, each with its play count, as a list inside the artist row. Turn it off for narrower spreadsheets when you only need listener numbers.

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

Words such as an artist or song name, one search per line. Each result is read the same way as a pasted link. Spotify always fills its results, so even made-up or misspelled words return popular or related items, and those rows are charged like any other.

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

What each search looks for. Albums and playlists found are read in order until the row limit for the search is reached.

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

Leave this empty: the Actor connects directly and, if Spotify ever refuses, retries through Apify's datacenter and then residential proxies on its own.

## Actor input object example

```json
{
  "startUrls": [
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxItemsPerUrl": 60,
  "includeArtistTopTracks": true,
  "searchQueries": [],
  "searchType": "tracks",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrls": [
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
    ],
    "maxItemsPerUrl": 60
};

// Run the Actor and wait for it to finish
const run = await client.actor("mina_safwat/spotify-play-count-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://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
    ],
    "maxItemsPerUrl": 60,
}

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/spotify-play-count-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://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxItemsPerUrl": 60
}' |
apify call mina_safwat/spotify-play-count-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mina_safwat/spotify-play-count-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/1slUp41FaE5XZ7zM6/builds/GquT33njHUWNrJQ3C/openapi.json
