# Spotify Play Count Scraper & API (`parsebird/spotify-play-count-scraper`) Actor

Extract exact Spotify play counts (stream counts) for any artist, album, or track URL, plus monthly listeners, followers, world rank, top cities, discography, and biography. Export JSON, CSV, Excel.

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

## Pricing

from $3.20 / 1,000 urls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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 Play Count Scraper & API

Extract the **exact Spotify play count** (total stream count) for any artist, album, or track from a single [open.spotify.com](https://open.spotify.com/) URL — the number Spotify's own Web API never exposes — plus monthly listeners, followers, world rank, top cities, full discography, and biography.

<table><tr>
<td style="border-left:4px solid #1DB954;padding:12px 16px;font-weight:600">
Paste any Spotify artist, album, or track URL and get back exact stream counts per track, monthly listeners, follower counts, global rank, the top 5 listener cities, the complete discography with play counts, artist biography, and social links — as structured JSON plus a flat play_counts.csv.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
Spotify Play Count Scraper & API (parsebird/spotify-play-count-scraper) extracts exact Spotify play counts (stream counts) and statistics from open.spotify.com URLs. Inputs: urls (array of open.spotify.com/{artist|album|track}/{id} URLs, required), followAlbums (boolean, default false — for an artist URL also scrape every album), followSingles (boolean, default false — also scrape every single/EP), followPopularReleases (boolean, default false — also scrape the curated popular releases), scrapePreviewUrls (boolean, default false — return each track's 30-second preview URL instead of its stream count), proxyConfiguration (object, default Apify Proxy). Output per URL: a track / album / artist record. Track: id, name, streamCount, duration (ms), contentRating, trackNumber, album{...tracklist}, artists[]. Album: id, name, albumType, releaseDate, artists[], label, copyright[], tracks[] (each with streamCount), coverArt[], moreAlbums[]. Artist: id, name, verified, followers, monthlyListeners, worldRank, topCities[], topTracks[] (with streamCount), albums[], singles[], popularReleases[], biography, externalLinks[], coverArt[]. Also writes play_counts.csv (one row per track: artist_url, artist_name, album_url, album_name, track_url, track_name, play_count) to the key-value store. Pricing: pay-per-event, $0.0038/URL on Free down to $0.0032/URL on Gold. API: https://apify.com/parsebird/spotify-play-count-scraper/api - Token: https://console.apify.com/account/integrations
```

### What is Spotify Play Count Scraper?

**Spotify Play Count Scraper** is an Apify Actor that pulls **exact stream counts** and analytics for Spotify artists, albums, and tracks straight from the data behind [open.spotify.com](https://open.spotify.com/). It is the practical **Spotify API alternative** for play-count data: Spotify's official Web API returns only a relative 1–100 popularity score and no stream counts at all, while this Actor returns the real play count that Spotify displays next to each track.

Give it one or more Spotify URLs — `https://open.spotify.com/artist/…`, `/album/…`, or `/track/…` — and it returns clean JSON for each, plus a flat `play_counts.csv`. No Spotify account, API key, or `sp_dc` cookie required.

### What can Spotify Play Count Scraper do?

- 🔢 **Exact play counts** — the real total stream count per track, not a popularity score.
- 🎤 **Artist analytics** — monthly listeners, follower count, global world rank, verified status, and the top 5 listener cities with country and listener numbers.
- 💿 **Full album data** — every track with its stream count, plus label, copyright (C and P), release date, contributing artists, and cover art in multiple resolutions.
- 🎼 **Track detail** — stream count, duration, explicit flag, track number, and the full parent-album tracklist.
- 📚 **Discography expansion** — for an artist URL, optionally follow and scrape every album, single/EP, or curated popular release.
- 🎧 **Preview URLs** — switch to preview mode to collect the 30-second audio preview URL for every track.
- 📈 **Change tracking** — schedule recurring runs (hourly, daily, weekly) to build a time series of play counts and monthly listeners.
- ⚡ Runs on Apify with API access, webhooks, integrations, and export to JSON, CSV, Excel, HTML, or XML.

### What data can you extract from Spotify?

| Field | Where | Description |
|-------|-------|-------------|
| `streamCount` | track, album tracks, artist top tracks | Exact total number of Spotify plays |
| `monthlyListeners` | artist | Current monthly listener count |
| `followers` | artist | Total Spotify followers |
| `worldRank` | artist | Global rank by monthly listeners |
| `verified` | artist | Whether the artist profile is verified |
| `topCities` | artist | Top 5 listener cities with country and listener count |
| `topTracks` | artist | 10 most popular tracks, each with stream count and duration |
| `albums` / `singles` / `popularReleases` | artist | Discography lists with ID, name, type, and release date |
| `biography` | artist | Full artist biography text |
| `externalLinks` | artist | Social media links (Facebook, Instagram, Twitter, …) |
| `label` / `copyright` | album | Record label and C / P copyright notices |
| `releaseDate` | album, track, releases | Full release date |
| `duration` | track | Track length in milliseconds |
| `contentRating` | track | `none` or `explicit` |
| `coverArt` | artist, album | Images in multiple resolutions |
| `previewUrl` | tracks (preview mode) | 30-second audio preview URL |

### How to get Spotify play counts

1. Open [Spotify Play Count Scraper](https://apify.com/parsebird/spotify-play-count-scraper) on Apify Store and click **Try for free**.
2. Copy a Spotify link — from the desktop app or web player, use **Share → Copy link to artist / album / song**.
3. Paste one or more URLs into **Spotify URLs**.
4. (Optional) For an artist URL, turn on **Follow albums**, **Follow singles**, or **Follow popular releases** to also scrape those releases.
5. Click **Start**. Each URL is processed in a few seconds.
6. Open the **Dataset** tab for the JSON, or the **Storage** tab for `play_counts.csv`. Export as JSON, CSV, Excel, HTML, or XML.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `urls` | array | **Yes** | — | Spotify artist, album, or track URLs (any `open.spotify.com` link) |
| `followAlbums` | boolean | No | `false` | For artist URLs, also scrape every album in the discography |
| `followSingles` | boolean | No | `false` | For artist URLs, also scrape every single and EP |
| `followPopularReleases` | boolean | No | `false` | For artist URLs, also scrape the curated "Popular releases" list |
| `scrapePreviewUrls` | boolean | No | `false` | Return each track's 30-second preview URL instead of its stream count |
| `proxyConfiguration` | object | No | Apify Proxy | Proxy settings for the run |

#### Input example

```json
{
    "urls": [
        "https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH",
        "https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm",
        "https://open.spotify.com/track/2x8evxqUlF0eRabbW2JBJd"
    ],
    "followAlbums": false,
    "followSingles": false,
    "followPopularReleases": false,
    "scrapePreviewUrls": false
}
```

### Output example

**Track**

```json
{
    "type": "track",
    "id": "2x8evxqUlF0eRabbW2JBJd",
    "spotifyUrl": "https://open.spotify.com/track/2x8evxqUlF0eRabbW2JBJd",
    "name": "Fluorescent Adolescent",
    "streamCount": 1221647852,
    "duration": 183893,
    "contentRating": "none",
    "trackNumber": 5,
    "album": {
        "id": "1XkGORuUX2QGOEIL4EbJKm",
        "name": "Favourite Worst Nightmare",
        "type": "album",
        "releaseDate": "2007-04-22",
        "tracks": [{ "id": "7f9I5WdyXm5q1XqnSYgQZb", "trackNumber": 1 }]
    },
    "artists": [{ "id": "7Ln80lUS6He07XvHI8qqHH", "name": "Arctic Monkeys" }]
}
```

**Artist** (abridged)

```json
{
    "type": "artist",
    "id": "7Ln80lUS6He07XvHI8qqHH",
    "name": "Arctic Monkeys",
    "verified": true,
    "followers": 35381594,
    "monthlyListeners": 55872649,
    "worldRank": 48,
    "topCities": [{ "country": "GB", "city": "London", "numberOfListeners": 976819 }],
    "topTracks": [{ "id": "5XeFesFbtLpXzIVDNQP22n", "name": "I Wanna Be Yours", "streamCount": 3961364689, "duration": 183956, "contentRating": "none" }],
    "albums": [{ "id": "78bpIziExqiI9qztvNFlQu", "name": "AM", "type": "album", "releaseDate": "2013-09-09" }],
    "externalLinks": [{ "label": "instagram", "url": "https://instagram.com/arcticmonkeys" }]
}
```

Every run also writes **`play_counts.csv`** to the key-value store — one row per track with `artist_url`, `artist_name`, `album_url`, `album_name`, `track_url`, `track_name`, `play_count`. In preview mode it is `preview_urls.csv` with a `preview_url` column. Download the dataset in JSON, CSV, Excel, HTML, or XML from the [Dataset tab](https://docs.apify.com/platform/storage/dataset).

### Use cases

📊 **Music analytics & reporting** — Track stream counts and monthly listeners over time for artists, labels, or catalogs.

🎯 **A\&R and scouting** — Compare play counts across an artist's discography to spot breakout tracks and momentum.

📀 **Playlist curation** — Rank candidate tracks by real stream counts instead of the coarse popularity score.

💵 **Royalty and catalog valuation** — Estimate streaming revenue from exact play counts and release dates.

📰 **Music journalism & research** — Cite precise, current stream figures in articles and academic work.

🤖 **AI & data pipelines** — Feed play-count data into LLM agents through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) or your own database.

### How it works

1. The Actor reads the Spotify entity type and ID from each URL.
2. It obtains an anonymous web access token from Spotify's public web player (no login or API key).
3. It queries Spotify's internal GraphQL endpoint — the same one open.spotify.com uses — for the artist, album, or track, including the `playcount` field.
4. Albums with many tracks are paginated automatically; artist discography is expanded when a follow option is enabled.
5. Each entity becomes one dataset record, and every track is appended to `play_counts.csv`.
6. Each record is billed as one pay-per-event result.

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

Spotify Play Count Scraper uses pay-per-event pricing. You are charged **once per record** — one artist, album, or track (including each followed release). Track volume inside an album or artist does not change the price.

| Plan | Price per record | Price per 1,000 records |
|------|------------------|--------------------------|
| Free | $0.0038 | **$3.80** |
| Bronze | $0.0036 | **$3.60** |
| Silver | $0.0034 | **$3.40** |
| Gold | $0.0032 | **$3.20** |

Apify platform usage (compute and proxy) is billed separately but is minimal — each URL is a handful of small API calls. Scraping one album with 12 tracks or one artist costs a single record. Following an artist's full discography bills one record per release. See the [Apify pricing page](https://apify.com/pricing).

### API usage examples

Run Spotify Play Count Scraper with the [Apify API](https://docs.apify.com/api/v2).

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "urls": [
        "https://open.spotify.com/artist/7Ln80lUS6He07XvHI8qqHH",
        "https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm",
    ],
    "followAlbums": False,
}

run = client.actor("parsebird/spotify-play-count-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item["name"], item.get("streamCount") or item.get("monthlyListeners"))
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('parsebird/spotify-play-count-scraper').call({
    urls: ['https://open.spotify.com/track/2x8evxqUlF0eRabbW2JBJd'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].name, items[0].streamCount);
```

Connect finished datasets to [Google Sheets](https://docs.apify.com/platform/integrations/google-sheets), [Slack](https://docs.apify.com/platform/integrations/slack), [Zapier](https://docs.apify.com/platform/integrations/zapier), [Make](https://docs.apify.com/platform/integrations/make), webhooks, or your own pipeline.

### Is it legal to scrape Spotify play counts?

Spotify Play Count Scraper reads only publicly visible data — the same artist, album, and track information any visitor sees on open.spotify.com. It does not log in, use personal account cookies, download audio, or access private data. You should still review Spotify's Terms of Service and make sure your use case complies with applicable laws and platform policies. For background, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

### Related Actors

- [Apple Podcasts Scraper](https://apify.com/parsebird/apple-podcasts-scraper) — Extract podcast, episode, and chart data from Apple Podcasts.
- [YouTube Search Scraper](https://apify.com/parsebird/youtube-search-scraper) — Scrape YouTube search results, video metadata, and view counts.
- [YouTube Channel Search Scraper](https://apify.com/parsebird/youtube-channel-search-scraper) — Search within a YouTube channel's videos.
- [Product Hunt Scraper](https://apify.com/parsebird/product-hunt-scraper) — Scrape product launches, makers, and upvotes.

### FAQ

**Does this return the real play count or just the popularity score?**
The real play count — the exact total number of streams Spotify shows next to a track. Spotify's official Web API only exposes a 1–100 popularity score.

**Do I need a Spotify account or API key?**
No. The Actor uses Spotify's public web player data. No login, API key, or `sp_dc` cookie.

**How current are the numbers?**
They are the values Spotify is showing at scrape time. Spotify refreshes play counts roughly once a day.

**How do I get all of an artist's albums or singles?**
Provide the artist URL and enable **Follow albums** and/or **Follow singles**. Each release is scraped in full and added as its own record.

**Can I get 30-second previews?**
Yes. Enable **Scrape 30-second preview URLs** to return each track's `previewUrl` instead of its stream count.

**Can I schedule recurring runs to track growth?**
Yes. Use Apify [schedules](https://docs.apify.com/platform/schedules) to run daily or weekly and build a play-count time series.

**A run failed with a "persisted query" or token error — what now?**
Spotify occasionally changes its web player. The Actor auto-recovers by reloading query identifiers, but if it cannot, report it on the [Issues tab](https://apify.com/parsebird/spotify-play-count-scraper/issues) and it will be fixed quickly.

**Can I use this as a Spotify play count API?**
Yes. Call the Actor through the [Apify API](https://docs.apify.com/api/v2), use webhooks, or connect it to AI assistants with the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

# Actor input Schema

## `urls` (type: `array`):

Spotify URLs of the artists, albums, or tracks to extract play counts and statistics for. Supports any open.spotify.com/{artist|album|track}/{id} URL.

## `followAlbums` (type: `boolean`):

For artist URLs, also retrieve full data and play counts for every studio album in the artist's discography.

## `followSingles` (type: `boolean`):

For artist URLs, also retrieve full data and play counts for every single and EP.

## `followPopularReleases` (type: `boolean`):

For artist URLs, also retrieve full data and play counts for the releases in Spotify's curated 'Popular releases' list.

## `scrapePreviewUrls` (type: `boolean`):

Return the 30-second audio preview URL for each track instead of its stream count. Useful for building music preview applications.

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

Proxy for the Spotify requests. The default Apify Proxy is recommended; a run rarely needs residential proxies.

## Actor input object example

```json
{
  "urls": [
    "https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm"
  ],
  "followAlbums": false,
  "followSingles": false,
  "followPopularReleases": false,
  "scrapePreviewUrls": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `playCountsCsv` (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 = {
    "urls": [
        "https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm"
    ],
    "followAlbums": false,
    "followSingles": false,
    "followPopularReleases": false,
    "scrapePreviewUrls": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "urls": ["https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm"],
    "followAlbums": False,
    "followSingles": False,
    "followPopularReleases": False,
    "scrapePreviewUrls": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/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 '{
  "urls": [
    "https://open.spotify.com/album/1XkGORuUX2QGOEIL4EbJKm"
  ],
  "followAlbums": false,
  "followSingles": false,
  "followPopularReleases": false,
  "scrapePreviewUrls": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call parsebird/spotify-play-count-scraper --silent --output-dataset

```

## MCP server setup

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