# Spotify Monthly Listeners Scraper (`codenest/spotify-monthly-listeners-scraper`) Actor

Input search keywords, preferred location or Spotify URLs to extract monthly listeners including metadata: title, authors, narrators, publisher, star ratings, duration. Delivers a clean, null-free dataset ready for Excel, CSV, or JSON.

- **URL**: https://apify.com/codenest/spotify-monthly-listeners-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Monthly Listeners & Audience Intelligence 👥

**Spotify Monthly Listeners & Audience Intelligence** is the all-in-one streaming performance and audience-sizing actor for Spotify. It extracts verified **Monthly Listeners, Global World Rank, Followers, and Top Cities** across **Artists, Tracks, Albums, and Playlists**, with built-in **City and Country geo-filtering**.

Whether you want an artist's global monthly audience, a song's play count with its artist's monthly listeners, an album's total streams and artist stats, or a playlist's total audience reach, this actor delivers clean, analysis-ready structured data.

***

### ✨ Key Features & Capabilities

- **Multi-Mode Scraping:**
  - **🎤 Artist Mode:** Global monthly listeners, world rank, total followers, top listener cities, genres, and verification status.
  - **🎵 Track / Song Mode:** Song stream play count, duration, explicit rating, album info, AND the primary artist's monthly listeners, world rank & followers.
  - **💿 Album Mode:** Total album streams (summed track play counts), total track count, release date, AND the album artist's monthly listeners.
  - **🎧 Playlist Mode:** Playlist followers/saves, owner, track count, total potential audience reach, and featured artists' monthly listeners.
  - **⚡ Auto-Detect Mode:** Automatically detects entity type from any direct Spotify URL or URI (`artist`, `track`, `album`, or `playlist`).
- **🌍 City & Country Geo-Filtering:**
  - Filter top cities by city name (e.g. *London*, *Santiago*, *Jakarta*, *Tokyo*).
  - Filter top cities by country code (e.g. *US*, *GB*, *MX*, *CL*, *ID*).
  - Calculates `filteredListeners` and returns `matchedCities`.
  - Toggle `onlyMatchingCities` to return only entities with listeners in your targeted region.
- **⚡ High Performance & Zero Redundancy:**
  - In-memory artist caching avoids duplicate network calls when multiple tracks or playlists feature the same artists.
  - Resilient GraphQL engine with automatic token bootstrap and multi-fallback signatures.
- **🧹 Clean Output:**
  - Zero clutter: all `null` values are pruned recursively so every output row is concise and professional.

***

### 💰 Pricing & Pay-Per-Event (PPE) Model

This actor uses Apify's **Pay-Per-Event (PPE)** pricing model. You only pay for successful results scraped:

| Event Name | Price (USD) | Description |
|---|---|---|
| `apify-actor-start` | **$0.00005** / run | Container startup and proxy initialization |
| `result` | **$0.005** / result | Extracted Spotify entity with monthly listeners, streams, or audience intelligence |

#### 🎁 Free Tier Policy

- Free users (`APIFY_USER_IS_PAYING != 1`) can scrape up to **5 results per run**, with a maximum lifetime limit of **20 results across all runs**.
- To scrape unlimited results and run high-volume batch queries, simply upgrade to any Apify paid plan.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | String | `"artist"` | Scraper mode: `artist`, `track`, `album`, `playlist`, or `auto`. |
| `keyword` | Array | `["Coldplay"]` | Search keywords based on the selected mode. |
| `spotifyUris` | Array | `[]` | Direct Spotify URLs or URIs (`spotify:artist:`, `spotify:track:`, `spotify:album:`, `spotify:playlist:`). |
| `filterCity` | String | `""` | Filter top listener cities by name (case-insensitive, e.g. "London"). |
| `filterCountry` | String | `""` | Filter top listener cities by 2-letter country code (e.g. "GB", "US"). |
| `onlyMatchingCities` | Boolean | `false` | When true, only outputs entities that have listeners in the filtered city/country. |
| `proxyCountry` | String | `"US"` | Residential proxy exit country for geo-specific catalog coverage. |
| `searchLimit` | Integer | `10` | Maximum number of results to fetch per keyword. |
| `includeTopCities` | Boolean | `false` | Include full top cities breakdown (automatically populated if city/country filter is set). |
| `includeTopTracks` | Boolean | `false` | Include artist's popular tracks with play counts. |
| `includeRelatedArtists` | Boolean | `false` | Include "Fans Also Like" related artists. |
| `includeBiography` | Boolean | `false` | Include artist biography text. |
| `includeSocialLinks` | Boolean | `false` | Include external social media links (Instagram, Twitter, etc.). |
| `includeGallery` | Boolean | `false` | Include photo gallery image URLs. |

***

### 📤 Sample Outputs

#### 1. 🎤 Artist Mode (with City Filtering)

```json
{
  "mode": "artist",
  "artist_name": "Coldplay",
  "artist_id": "4gzpq5DPGxSnKTe4SA8HAU",
  "uri": "spotify:artist:4gzpq5DPGxSnKTe4SA8HAU",
  "url": "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
  "followers": 66138430,
  "monthlyListeners": 89919450,
  "worldRank": 10,
  "avatarImage": "https://i.scdn.co/image/ab6761610000e5eb1ba8fc5f5c73e7e9313cc6eb",
  "filterApplied": {
    "city": "London"
  },
  "filteredListeners": 1059381,
  "matchedCities": [
    {
      "numberOfListeners": 1059381,
      "city": "London",
      "country": "GB",
      "region": "ENG"
    }
  ],
  "topCities": [
    {
      "numberOfListeners": 1059381,
      "city": "London",
      "country": "GB",
      "region": "ENG"
    }
  ],
  "keyword": "Coldplay",
  "timestamp": "2026-11-11T17:49:10.221650+00:00"
}
```

#### 2. 🎵 Track Mode

```json
{
  "mode": "track",
  "track_name": "Yellow",
  "track_id": "3AJwUDP919kvQ9QcozQPxg",
  "uri": "spotify:track:3AJwUDP919kvQ9QcozQPxg",
  "url": "https://open.spotify.com/track/3AJwUDP919kvQ9QcozQPxg",
  "playcount": "4083334888",
  "duration_ms": 266773,
  "duration_formatted": "4m 26s",
  "content_rating": "NONE",
  "album_name": "Parachutes",
  "album_id": "6ZG5lRT77aJ3btmArcykra",
  "album_url": "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra",
  "cover_image_url": "https://i.scdn.co/image/ab67616d00001e029164bafe9aaa168d93f4816a",
  "artist_name": "Coldplay",
  "artist_id": "4gzpq5DPGxSnKTe4SA8HAU",
  "artist_url": "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
  "artist_monthly_listeners": 89919450,
  "artist_world_rank": 10,
  "artist_followers": 66138430,
  "timestamp": "2026-11-11T17:49:59.657746+00:00"
}
```

#### 3. 💿 Album Mode

```json
{
  "mode": "album",
  "album_name": "Parachutes",
  "album_id": "6ZG5lRT77aJ3btmArcykra",
  "uri": "spotify:album:6ZG5lRT77aJ3btmArcykra",
  "url": "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra",
  "type": "ALBUM",
  "release_date": "2000-07-10T00:00:00Z",
  "total_tracks": 10,
  "cover_image_url": "https://i.scdn.co/image/ab67616d00001e029164bafe9aaa168d93f4816a",
  "artist_name": "Coldplay",
  "artist_id": "4gzpq5DPGxSnKTe4SA8HAU",
  "artist_url": "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
  "artist_monthly_listeners": 89919450,
  "artist_world_rank": 10,
  "artist_followers": 66138430,
  "timestamp": "2026-11-11T17:50:19.274505+00:00"
}
```

#### 4. 🎧 Playlist Mode (with City Filtering)

```json
{
  "mode": "playlist",
  "playlist_name": "Coldplay Radio",
  "playlist_id": "37i9dQZF1E4FhRRLh0mmxG",
  "uri": "spotify:playlist:37i9dQZF1E4FhRRLh0mmxG",
  "url": "https://open.spotify.com/playlist/37i9dQZF1E4FhRRLh0mmxG",
  "owner_name": "Spotify",
  "total_tracks": 30,
  "total_audience_reach": 417608573,
  "average_artist_monthly_listeners": 41760857,
  "top_artist_name": "Coldplay",
  "top_artist_monthly_listeners": 90111798,
  "top_artist_followers": 66253821,
  "featured_artists": [
    {
      "artist_name": "Coldplay",
      "artist_id": "4gzpq5DPGxSnKTe4SA8HAU",
      "artist_url": "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
      "monthlyListeners": 90111798,
      "worldRank": 9,
      "followers": 66253821,
      "matchedCities": [
        {
          "numberOfListeners": 1002080,
          "city": "London",
          "country": "GB",
          "region": "ENG"
        }
      ],
      "filteredListeners": 1002080
    },
    {
      "artist_name": "Ed Sheeran",
      "artist_id": "6eUKZXaKkcviH0Ku9w2n3V",
      "artist_url": "https://open.spotify.com/artist/6eUKZXaKkcviH0Ku9w2n3V",
      "monthlyListeners": 81653709,
      "worldRank": 14,
      "followers": 129128101,
      "matchedCities": [
        {
          "numberOfListeners": 943780,
          "city": "London",
          "country": "GB",
          "region": "ENG"
        }
      ],
      "filteredListeners": 943780
    }
  ],
  "filterApplied": {
    "city": "london"
  },
  "filteredListeners": 4341631,
  "matchedCities": [
    {
      "city": "London",
      "country": "GB",
      "region": "ENG",
      "numberOfListeners": 4341631,
      "matchedArtistsCount": 9
    }
  ],
  "timestamp": "2026-11-22T03:41:54.093161+00:00"
}
```

***

### 💡 Use Cases

- **A\&R & Talent Scouting:** Evaluate real audience depth and geo-popularity before signing or booking talent.
- **Tour Booking & Event Planning:** Use `filterCity` and `filterCountry` to determine which cities have the highest listener base for upcoming tour stops.
- **Playlist & Curator Analytics:** Measure total audience reach and artist caliber within curated playlists.
- **Competitive Music Benchmarking:** Compare song streams vs. artist audience footprint side-by-side.

# Actor input Schema

## `mode` (type: `string`):

Choose what Spotify entity to scrape monthly listeners and audience data for. Track mode returns song play count + artist listeners; Album mode returns album streams + artist listeners; Playlist mode returns playlist followers + artist audience reach; Auto-Detect infers type from URL/URI.

## `keyword` (type: `array`):

One or more search keywords (artists, tracks, albums, or playlists based on chosen mode). Leave empty if using direct Spotify URLs/URIs only.

## `spotifyUris` (type: `array`):

One or more direct Spotify URLs (open.spotify.com) or URIs (spotify:artist:, spotify:track:, spotify:album:, spotify:playlist:).

## `filterCity` (type: `string`):

Filter artist top listener cities by name (e.g. 'London', 'Santiago', 'Jakarta', 'Tokyo'). Case-insensitive. Filters top cities list and calculates total listeners for matched city.

## `filterCountry` (type: `string`):

Filter artist top listener cities by 2-letter country code (e.g. 'US', 'GB', 'MX', 'CL', 'ID'). Filters top cities list and calculates total country listeners.

## `onlyMatchingCities` (type: `boolean`):

If enabled (true), only outputs entities that have listeners in your specified city or country. If false (default), keeps all results and attaches matched listeners summary.

## `proxyCountry` (type: `string`):

Residential proxy exit country. US is recommended for the widest Spotify catalog coverage.

## `searchOffset` (type: `integer`):

Starting position for keyword search pagination. 0 = first result.

## `searchLimit` (type: `integer`):

Maximum number of items to return per keyword before enrichment.

## `numberOfTopResults` (type: `integer`):

Number of top-ranked Spotify matches to request per search query.

## `includeBiography` (type: `boolean`):

Adds artist biography text to the output.

## `includeSocialLinks` (type: `boolean`):

Adds social links like Instagram, Twitter, Facebook, and Wikipedia when available.

## `includeTopCities` (type: `boolean`):

Adds top listener cities breakdown. (Note: automatically included if Filter by City or Filter by Country is set).

## `includeRelatedArtists` (type: `boolean`):

Adds 'Fans Also Like' related artists list.

## `includeTopTracks` (type: `boolean`):

Adds artist's top popular tracks with stream play counts.

## `includeGallery` (type: `boolean`):

Adds artist gallery photo URLs when Spotify provides them.

## `topCitiesLimit` (type: `integer`):

Maximum number of top cities to keep per artist.

## `relatedArtistsLimit` (type: `integer`):

Maximum number of related artists to keep per result.

## `topTracksLimit` (type: `integer`):

Maximum number of top tracks to keep per artist.

## Actor input object example

```json
{
  "mode": "artist",
  "keyword": [
    "Coldplay",
    "Taylor Swift"
  ],
  "spotifyUris": [
    "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
    "https://open.spotify.com/track/3AJwUDP919kvQ9QcozQPxg",
    "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra"
  ],
  "onlyMatchingCities": false,
  "proxyCountry": "US",
  "searchOffset": 0,
  "searchLimit": 10,
  "numberOfTopResults": 10,
  "includeBiography": false,
  "includeSocialLinks": false,
  "includeTopCities": false,
  "includeRelatedArtists": false,
  "includeTopTracks": false,
  "includeGallery": false,
  "topCitiesLimit": 10,
  "relatedArtistsLimit": 10,
  "topTracksLimit": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Comprehensive list of scraped Spotify entities containing monthly listeners, world ranks, top cities, and follower counts.

# 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 = {
    "keyword": [
        "Coldplay",
        "Taylor Swift"
    ],
    "spotifyUris": [
        "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
        "https://open.spotify.com/track/3AJwUDP919kvQ9QcozQPxg",
        "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/spotify-monthly-listeners-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 = {
    "keyword": [
        "Coldplay",
        "Taylor Swift",
    ],
    "spotifyUris": [
        "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
        "https://open.spotify.com/track/3AJwUDP919kvQ9QcozQPxg",
        "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("codenest/spotify-monthly-listeners-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 '{
  "keyword": [
    "Coldplay",
    "Taylor Swift"
  ],
  "spotifyUris": [
    "https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU",
    "https://open.spotify.com/track/3AJwUDP919kvQ9QcozQPxg",
    "https://open.spotify.com/album/6ZG5lRT77aJ3btmArcykra"
  ]
}' |
apify call codenest/spotify-monthly-listeners-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codenest/spotify-monthly-listeners-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/Yo2uXl6xVtFVdP86u/builds/TK0uetUd7xBxCdQl8/openapi.json
