# Spotify Scraper - Artists, Monthly Listeners and Play Counts (`sweet_stickball/spotify-scraper`) Actor

Spotify scraper and API alternative: extract any artist's monthly listeners, followers, top tracks with all-time play counts, latest release, discography, related artists, social links and biography, plus album and playlist tracklists with play counts. Music market research, no login.

- **URL**: https://apify.com/sweet_stickball/spotify-scraper.md
- **Developed by:** [CrawlKit](https://apify.com/sweet_stickball) (community)
- **Categories:** Social media
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 artists

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?

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 Scraper - Artists, Monthly Listeners and Play Counts

Scrape public Spotify artist pages: monthly listeners, followers, top tracks with all-time play counts, latest release, discography, biography, related artists and social links. Album and playlist URLs return one record per track (name, artists, album, duration, position, and play count for playlist tracks). No Spotify account, no API key.

### What it does

- Takes a list of Spotify URLs (`urls`): artist pages, album pages, playlist pages, `spotify:` URIs or bare artist IDs.
- For each **artist**, returns one flat record with `monthlyListeners`, `followers`, `topTracks` (track ID, name, play count, album), `latestRelease`, optional `albums`, `relatedArtists`, `externalLinks`, `imageUrl` and a short `biography`.
- For each **album** or **playlist**, returns one record per track with `trackId`, `name`, `artists`, `album`, `durationMs`, `position` and `playcount` (playlists).
- Reads the data that open.spotify.com embeds in its public, server-rendered pages. Pages are fetched in parallel; a typical artist takes well under a second.

Use it to track artists' monthly listeners and stream counts over time (schedule it daily), compare artists for booking or A\&R research, or export the tracklist of a playlist with play counts.

### Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `urls` | array of strings | Yes | — | Spotify artist, album or playlist URLs (`https://open.spotify.com/artist/<id>`, `/album/<id>`, `/playlist/<id>`), `spotify:artist:<id>` URIs or 22-character artist IDs. Localized URLs (`/intl-fr/...`) and share links with `?si=` work. |
| `includeTopTracks` | boolean | No | `true` | Add the artist's top tracks (usually 5) with their all-time play counts. |
| `includeAlbums` | boolean | No | `false` | Add the albums, singles and compilations shown on the artist page (ID, name, type, year). |
| `maxItems` | integer | No | 20 | Maximum number of records in total (artists plus tracks). |

Example:

```json
{
    "urls": [
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
    ],
    "includeTopTracks": true,
    "maxItems": 20
}
```

### Output

One dataset item per artist (`type: "artist"`). Real example (top tracks, related artists and links shortened; emoji removed from the biography):

```json
{
    "type": "artist",
    "artistId": "06HL4z0CvFAxyc27GXpf02",
    "name": "Taylor Swift",
    "url": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "monthlyListeners": 102495990,
    "followers": 165950331,
    "topTracks": [
        {"trackId": "53iuhJlwXhSER5J2IYYv1W", "name": "The Fate of Ophelia", "playcount": 1755165721, "albumId": "4a6NzYL1YHRUgx9e3YZI6I", "albumName": "The Life of a Showgirl"},
        {"trackId": "1p80LdxRV74UKvL8gnD7ky", "name": "Blank Space", "playcount": 2649938628, "albumId": "2QJmrSgbdM35R67eoGQo4j", "albumName": "1989"}
    ],
    "albums": null,
    "latestRelease": {"albumId": "3rU7c934ngxDXPfjgXyzyu", "name": "Patient Zero", "type": "SINGLE", "year": 2026},
    "relatedArtists": ["Olivia Rodrigo", "Sabrina Carpenter", "Gracie Abrams"],
    "externalLinks": [
        {"name": "instagram", "url": "https://instagram.com/taylorswift"},
        {"name": "twitter", "url": "https://twitter.com/taylorswift13"}
    ],
    "imageUrl": "https://i.scdn.co/image/ab6761610000e5eb12184bdd29403de54cb9d9c7",
    "biography": "And, baby, that’s sh0w business f0r y0u",
    "scrapedAt": "2026-10-28T10:15:02.411+00:00"
}
```

One dataset item per album or playlist track (`type: "track"`):

```json
{
    "type": "track",
    "trackId": "2sFepQNyl1WjpROruP8bJ0",
    "name": "Housewife",
    "url": "https://open.spotify.com/track/2sFepQNyl1WjpROruP8bJ0",
    "artists": ["Tate McRae"],
    "album": "Housewife",
    "albumId": "6JvmSyocXef7RZDZFaymNl",
    "durationMs": 208810,
    "playcount": 77026941,
    "position": 1,
    "sourceType": "playlist",
    "sourceId": "37i9dQZF1DXcBWIGoYBM5M",
    "sourceName": "Today's Top Hits",
    "scrapedAt": "2026-10-28T10:15:02.902+00:00"
}
```

The dataset has two views: **Artists** and **Album and playlist tracks**.

### Pricing

Pay-per-event, no start fee: **$2.80 per 1,000 records** on the Apify Free plan, lower on paid plans. Each artist record is one `ARTIST` event and each album or playlist track is one `TRACK` event.

| Event | Free | Starter | Scale | Business | Enterprise |
|-------|------|---------|-------|----------|------------|
| `ARTIST` | $2.80 | $2.40 | $2.10 | $1.70 | $1.70 |
| `TRACK` | $2.80 | $2.40 | $2.10 | $1.70 | $1.70 |

Prices in USD per 1,000 events. The run stops cleanly when the maximum cost per run you set is reached.

### Limitations

- Data comes from the public artist page. The **world rank**, **top listener cities** and **genres** are not part of that page and are not returned.
- `topTracks` contains the tracks the artist page shows (usually 5, not 10).
- `albums` lists the releases shown on the artist page (the most recent albums, singles and compilations), not the complete discography.
- Playlists: only the **first 30 tracks** are on the public page, so at most 30 tracks per playlist are returned.
- Album tracks have no play count (`playcount` is null): Spotify does not show it on the public album page. Play counts are available for artist top tracks and playlist tracks.
- Monthly listeners and play counts are Spotify's own figures, refreshed by Spotify roughly once a day.
- Podcasts, episodes, audiobooks and user profiles are not supported.

# Actor input Schema

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

Spotify artist URLs (https://open.spotify.com/artist/<id>), album URLs (/album/<id>) or playlist URLs (/playlist/<id>). Spotify URIs (spotify:artist:<id>) and bare 22-character artist IDs are also accepted. Localized URLs (/intl-fr/artist/...) and share links with ?si= parameters work. Artist URLs give one artist record each; album and playlist URLs give one record per track.

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

Add the artist's top tracks (as shown on the artist page, usually 5) with their all-time play count to each artist record.

## `includeAlbums` (type: `boolean`):

Add the albums, singles and compilations shown on the artist page (the most recent ones, not the full discography) with ID, name, type and release year to each artist record.

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

Maximum number of records to return in total (artists plus album or playlist tracks). Each record is billed as one event.

## Actor input object example

```json
{
  "urls": [
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/album/4hF2gTGuPYlykYuphDxi8J",
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "includeTopTracks": true,
  "includeAlbums": false,
  "maxItems": 10
}
```

# Actor output Schema

## `artists` (type: `string`):

Artist records (monthly listeners, followers, top tracks) shown with the 'artists' view.

## `tracks` (type: `string`):

Track records of the requested albums and playlists shown with the 'tracks' view.

# 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/artist/06HL4z0CvFAxyc27GXpf02",
        "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ",
        "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X"
    ],
    "maxItems": 10
};

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

# Run the Actor and wait for it to finish
run = client.actor("sweet_stickball/spotify-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/artist/06HL4z0CvFAxyc27GXpf02",
    "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ",
    "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X"
  ],
  "maxItems": 10
}' |
apify call sweet_stickball/spotify-scraper --silent --output-dataset

```

## MCP server setup

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