# Spotify Play Count Scraper: Tracks, Albums, Artists, Playlists (`gouda_studios/spotify-play-count-scraper`) Actor

Get exact Spotify play counts for any track, album, artist or playlist. Returns stream counts per track, album totals, artist monthly listeners, followers, world rank, top cities and top tracks. No login, no proxy, $0.001 per track.

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

## Pricing

Pay per event

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

## Spotify Play Count Scraper: tracks, albums, artists and playlists

Get the exact play count (stream count) Spotify shows for any track, plus album totals, artist monthly listeners, followers, world rank, top cities and top tracks. Paste any mix of track, album, artist or playlist links and get clean JSON back. No Spotify login, no API key, no proxy.

### What you get

| Input | Output rows |
|---|---|
| Track URL or URI | 1 track row with `playCount`, artists, album, release date, duration, explicit flag |
| Album URL | 1 row per track with its play count, plus a free album summary row with `totalPlayCount` |
| Artist URL | 1 artist row: `monthlyListeners`, `followers`, `worldRank`, `topCities`, and `topTracks` with play counts |
| Playlist URL | 1 row per track with play count and playlist position (public playlists) |

### Pricing

- **$0.001 per track row** with a play count
- **$0.002 per artist profile** row
- $0.00005 per run start
- Album summary and error rows are free

That's 1,000 exact play counts for $1, cheaper than the other Spotify play count actors on the Store.

### Example input

```json
{
  "startUrls": [
    "https://open.spotify.com/album/1NAmidJlEaVgA3MpcPFYGq",
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "spotify:track:4cOdK2wGLETKBW3PvgPWqT"
  ],
  "maxTracksPerInput": 500
}
```

### Example output

```json
{
  "type": "track",
  "trackId": "1BxfuPKGuaTgP7aM0Bbdwr",
  "trackName": "Cruel Summer",
  "playCount": 3533019101,
  "artists": ["Taylor Swift"],
  "albumName": "Lover",
  "releaseDate": "2019-08-23",
  "durationMs": 178426,
  "explicit": false,
  "trackUrl": "https://open.spotify.com/track/1BxfuPKGuaTgP7aM0Bbdwr",
  "scrapedAt": "2026-11-10T19:55:00+00:00"
}
```

### Use cases

- Music analytics, A\&R and label dashboards: track daily stream growth by scheduling runs and diffing `playCount`.
- Royalty and catalog valuation: estimate streams for whole discographies.
- Playlist pitching and curator research: see how many plays each track on a playlist has.
- AI agents and automations: call it from the Apify API, MCP server or integrations (Make, Zapier, n8n) to answer "how many streams does this song have?"

### Notes

- Play counts are the numbers Spotify shows publicly in its apps. Spotify updates them about once a day.
- Bad or private links return a free `error` row so your pipeline never breaks.
- Run it on a schedule to build a daily play count history.

# Actor input Schema

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

Track, album, artist or playlist links (open.spotify.com/...) or URIs (spotify:track:...). Mix types freely.

## `maxTracksPerInput` (type: `integer`):

Caps how many track rows each album or playlist returns.

## `includeAlbumSummary` (type: `boolean`):

For album inputs, also output one album row with total play count across all tracks (not charged).

## Actor input object example

```json
{
  "startUrls": [
    "https://open.spotify.com/album/1NAmidJlEaVgA3MpcPFYGq",
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"
  ],
  "maxTracksPerInput": 500,
  "includeAlbumSummary": 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/album/1NAmidJlEaVgA3MpcPFYGq",
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gouda_studios/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/album/1NAmidJlEaVgA3MpcPFYGq",
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gouda_studios/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/album/1NAmidJlEaVgA3MpcPFYGq",
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"
  ]
}' |
apify call gouda_studios/spotify-play-count-scraper --silent --output-dataset

```

## MCP server setup

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