# Spotify Play Count Scraper (`piotrv1001/spotify-play-count-scraper`) Actor

The Spotify Play Count Scraper extracts exact per-track play counts, artist monthly listeners, followers, world rank and top cities from track, artist, album, playlist URLs and keyword searches — ideal for catalogue monitoring, A\&R research and playlist analytics.

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

## Pricing

from $4.00 / 1,000 tracks

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?

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

Get the exact numbers Spotify shows on the web player but never exposes in its public API. The **Spotify Play Count Scraper** returns per-track play counts, artist monthly listeners, followers and world rank, plus full album, playlist and search results, as clean structured rows ready for catalogue monitoring, A\&R research and playlist analysis.

### ✨ Features

- 🎵 **Exact play counts**: Every track row carries the current play count, from any track, album or playlist URL.
- 🎤 **Artist analytics**: Monthly listeners, followers, world rank, top listener cities, biography, external links and the top 10 tracks with their play counts.
- 💿 **Full discography**: One switch turns an artist URL into every track from every album and single, each with its play count.
- 🔍 **Keyword search**: Search Spotify tracks by any term and get each match with its play count.
- ⚡ **Fast**: Hundreds of tracks per minute, no login required.

### 🛠️ How It Works

1. **Paste Spotify URLs** – Track, artist, album or playlist links from the Spotify app or website, or `spotify:` URIs.
2. **Optionally add search terms** – Each keyword returns matching tracks with play counts.
3. **Set the scope** – Choose **Max items** and, for artists, whether to include the **full discography**.
4. **Run the scraper** – Get one row per track and one row per artist.

### 📊 Sample Output Data

```json
[
    {
        "type": "artist",
        "id": "1dfeR4HaWDbWqFHLkxsg1d",
        "url": "https://open.spotify.com/artist/1dfeR4HaWDbWqFHLkxsg1d",
        "name": "Queen",
        "monthlyListeners": 48478819,
        "followers": 58411331,
        "worldRank": 78,
        "topCities": [
            { "city": "Mexico City", "country": "MX", "region": "CMX", "listeners": 896254 },
            { "city": "São Paulo", "country": "BR", "region": "SP", "listeners": 765668 }
        ],
        "topTracks": [
            { "id": "2JiDi0qAXsPwhPqA2qaKGt", "name": "Bohemian Rhapsody", "playCount": 3259992868, "url": "https://open.spotify.com/track/2JiDi0qAXsPwhPqA2qaKGt" }
        ],
        "biography": "Queen epitomize all the glittering excess of '70s arena rock…",
        "imageUrl": "https://i.scdn.co/image/ab6761610000e5eb73e4d22612ac8d944b5789b4",
        "externalLinks": [{ "name": "FACEBOOK", "url": "https://facebook.com/Queen" }],
        "source": "https://open.spotify.com/artist/1dfeR4HaWDbWqFHLkxsg1d",
        "scrapedAt": "2026-09-03T15:58:40.112Z"
    },
    {
        "type": "track",
        "id": "1tDWVeCR9oWGX8d5J9rswk",
        "uri": "spotify:track:1tDWVeCR9oWGX8d5J9rswk",
        "url": "https://open.spotify.com/track/1tDWVeCR9oWGX8d5J9rswk",
        "name": "Eclipse",
        "playCount": 121445934,
        "durationMs": 126720,
        "explicit": false,
        "trackNumber": 10,
        "discNumber": 1,
        "artists": [{ "id": "0k17h0D3J5VfsdmQ1iZtE9", "name": "Pink Floyd", "url": "https://open.spotify.com/artist/0k17h0D3J5VfsdmQ1iZtE9" }],
        "album": {
            "id": "4LH4d3cOWNNsVw41Gqt2kv",
            "name": "The Dark Side of the Moon",
            "url": "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv",
            "releaseDate": "1973-03-01T00:00:00Z",
            "coverUrl": "https://i.scdn.co/image/ab67616d0000b27328933b808bfb4cbbd0385400"
        },
        "source": "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv",
        "scrapedAt": "2026-09-03T15:58:41.503Z"
    }
]
```

### 💰 Pricing

You pay **$0.004 per track row** ($4 per 1,000) and **$0.005 per artist row**, plus platform usage. Tracking 2,000 tracks every day is about $240 per month.

Watch streams climb, compare catalogues and size up artists with **Spotify Play Count Scraper** today! 🚀

# Actor input Schema

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

Track, artist, album or playlist URLs (or spotify: URIs). Tracks return one row with the play count; albums and playlists return one row per track; artists return an artist row with monthly listeners plus their top tracks.

## `searchTerms` (type: `array`):

Keywords to search Spotify tracks for. Each matching track is returned with its play count.

## `fullDiscography` (type: `boolean`):

For artist URLs, also return every track from every album and single with its play count, not just the top 10 tracks.

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

Maximum number of rows to save in total.

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

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "startUrls": [
    "https://open.spotify.com/artist/1dfeR4HaWDbWqFHLkxsg1d",
    "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv"
  ],
  "fullDiscography": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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/1dfeR4HaWDbWqFHLkxsg1d",
        "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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/1dfeR4HaWDbWqFHLkxsg1d",
        "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/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/1dfeR4HaWDbWqFHLkxsg1d",
    "https://open.spotify.com/album/4LH4d3cOWNNsVw41Gqt2kv"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call piotrv1001/spotify-play-count-scraper --silent --output-dataset

```

## MCP server setup

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