# Spotify Playlist Scraper (`codenest/spotify-playlist-scraper`) Actor

Extract Spotify playlists via keywords or playlist links. Get follower metrics, track counts, complete tracklists, stream playcounts, BPM, Camelot keys, and curator details. Fast, reliable export to JSON/CSV with pay-per-event pricing and no API keys required.

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

## Pricing

from $2.30 / 1,000 playlist search results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Playlist Scraper: Followers, Tracks & Audio Analytics

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?style=flat-square\&logo=apify)](https://apify.com)
[![Pricing](https://img.shields.io/badge/Pricing-Pay--Per--Event-brightgreen?style=flat-square)](https://apify.com)
[![No API Key Needed](https://img.shields.io/badge/Spotify%20API-Not%20Required-1DB954?style=flat-square\&logo=spotify)](https://open.spotify.com)
[![Output Formats](https://img.shields.io/badge/Export-JSON%20|%20CSV%20|%20Excel-blue?style=flat-square)](https://apify.com)
[![DJ & Music Ready](https://img.shields.io/badge/Analytics-BPM%20%26%20Camelot%20Keys-purple?style=flat-square)](https://apify.com)

> **The ultimate Spotify Playlist Scraper.** Extract deep public Spotify playlist data that the official Web API restricts: **follower counts, total track counts, complete track sequences, stream playcounts, audio key analysis, BPM tempos, curator profiles, cover art, and collaborator members** without requiring Spotify developer accounts or OAuth tokens.

***

### 🌟 Why Use This Spotify Playlist Scraper?

Spotify's official Web API enforces strict rate limits, requires cumbersome developer tokens, and conceals essential public playlist analytics like track playcounts and audio characteristics. This actor extracts everything out of the box:

| Data Point | Official Spotify API | 🎧 This Scraper |
|---|:---:|:---:|
| **Playlist Followers** | ⚠️ Partial | ✅ **Exact live follower & save counts** |
| **Track Playcounts** | ❌ Not available | ✅ **Exact stream counts for every track (e.g. 2.4B+ plays)** |
| **Audio Key & BPM** | ⚠️ Complex separate calls | ✅ **Exact BPM and Camelot musical keys included** |
| **Total Track Count** | ⚠️ Buried in nested objects | ✅ **Promoted top-level `totalTracks` metric** |
| **Curator Details** | ⚠️ Restricted IDs only | ✅ **Curator display name, profile link, and avatar** |
| **High-Res Cover Art** | ⚠️ Nested color structures | ✅ **Instant direct high-res `coverArt` link** |
| **Authentication & Tokens** | ❌ Mandatory OAuth | ✅ **Zero setup — No API key or login required** |

***

### 🚀 Key Features

- **🔍 Dual Input Flexibility**: Search playlists globally by keyword (e.g. `Rock`, `Workout Hits`, `Chill Lo-Fi`) or paste specific Spotify playlist URLs and URIs (`https://open.spotify.com/playlist/...` or `spotify:playlist:...`).
- **🎵 Full Paginated Track Sequences**: Retrieve complete track listings, song titles, artist credits, album names, and release dates.
- **🎧 Audio Analytics (BPM & Camelot Keys)**: Automatically extract tempo (BPM) and harmonic Camelot musical keys for DJ set preparation and seamless transitions.
- **📈 Stream Playcounts**: Track exact public stream counts on popular tracks to benchmark viral hit potential.
- **👤 Curator & Owner Insights**: Scrape curator profile names, Spotify user links, avatars, and collaborative member permissions.
- **💳 Transparent Pay-Per-Event (PPE)**: Ultra-cost-effective event pricing with zero wasteful subscription fees. Pay only for what you scrape!
- **⚡ Built-in Rotating Proxies**: Automated residential IP rotation with automatic retry logic to bypass geo-blocks and rate limits.

***

### 🎯 Use Cases

- **🎵 Playlist Pitching & Artist Promotion**: Identify influential indie curators and high-follower playlists to pitch newly released tracks directly.
- **🎧 DJs & Music Producers**: Instantly analyze track tempos (BPM) and Camelot harmonic keys to assemble cohesive, mixed sets in minutes.
- **📊 Music Marketing & Label A\&R**: Monitor algorithmic editorial mixes ("Rock Mix", "2000s Mix") to see which songs Spotify recommends to listeners.
- **📈 Competitor & Catalog Tracking**: Track playlist follower growth, song placements, and track order modifications over time.
- **🤖 Music Data Pipelines & ML**: Feed recommendation engines and playlist analysis models with clean, standardized playlist metadata.

***

### ⚙️ Input Parameters

Configure your scraper run through the Apify Console or API:

| Parameter | Type | Default | Description |
|---|---|:---:|---|
| `keyword` | `array` | `["Workout", "Chill"]` | **Search Keyword(s)**. Search terms to find playlists across Spotify. Each term runs as a separate query. |
| `spotifyUris` | `array` | `[]` | **Spotify Playlist URIs / URLs**. Direct Spotify playlist links or URIs (e.g. `https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M`). |
| `playlists_search_limit` | `integer` | `30` | **Search Limit**. Maximum number of playlist results to retrieve per keyword. |
| `playlists_fetchDetails` | `boolean` | `false` | **Fetch Full Playlist Details**. When `false`, extracts essential playlist info instantly. When `true`, enriches every search result with full track listings, total track count, follower counts, and audio attributes. *(Note: Direct URLs always fetch complete rich details).* |
| `playlists_get_limit` | `integer` | `25` | **Track List Limit**. Maximum number of tracks to extract per playlist. |

***

### 📋 Output Format & Sample Data

The Actor produces clean, structured JSON ready for CSV, Excel, or database export.

#### 🔹 Sample Enriched Playlist Record:

```json
{
  "id": "1ti3v0lLrJ4KhSTuxt4loZ",
  "name": "Top Classic Rock Hits Of All Time",
  "totalTracks": 716,
  "followers": 291030,
  "ownerName": "Tom Schumacher",
  "ownerUrl": "https://open.spotify.com/user/12162444321",
  "coverArt": "https://mosaic.scdn.co/640/ab67616d00001e0243058ea096fa35ac33c43587...",
  "url": "https://open.spotify.com/playlist/1ti3v0lLrJ4KhSTuxt4loZ",
  "searchQuery": "rock",
  "description": "The greatest classic rock songs of all time.",
  "content": {
    "items": [
      {
        "addedAt": { "isoString": "2018-09-06T18:58:33Z" },
        "itemV2": {
          "data": {
            "name": "Highway to Hell",
            "playcount": "2465877395",
            "trackDuration": { "totalMilliseconds": 208110 },
            "playlistAudioAttributes": {
              "bpm": 115.6,
              "key": {
                "key": "G#",
                "mode": "MODE_MAJOR",
                "camelotKey": { "value": "4B", "color": "#deca73" }
              }
            },
            "artists": {
              "items": [
                {
                  "profile": { "name": "AC/DC" },
                  "uri": "spotify:artist:711MCceyCBcFnzjGY4Q7Un"
                }
              ]
            }
          }
        }
      }
    ]
  }
}
```

***

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

This scraper uses transparent Pay-Per-Event monetization. You only pay for what you extract:

| Event Name | Event Code | Price per Unit | Description |
|---|---|---|---|
| **Playlist Search Result** | `search-result` | **$0.0025 USD** | Charged for each basic playlist record returned from keyword search. |
| **Detail Enrichment** | `detail` | **$0.0025 USD** | Additional charge when **Fetch Full Playlist Details** is ON to enrich search results with full track listings, audio keys, BPM, and follower counts ($0.0050 total). |
| **Direct Playlist Profile** | `playlist-profile` | **$0.0050 USD** | Charged for each playlist extracted directly from a Spotify playlist URL or URI with complete track sequences. |

> 🎁 **Free Plan Tier**: Users without an active Apify paid subscription can test up to **3 playlists per run** completely free!

***

### ❓ Frequently Asked Questions (FAQ)

##### Can I get track stream counts from the official Spotify Web API?

No. Spotify's official Web API does not expose playcounts for playlist tracks. This actor extracts exact public stream playcounts.

##### Does this actor require a Spotify account or proxy?

No! You do not need any Spotify login, developer credentials, or external proxies. Everything is handled out of the box with automated residential IP rotation.

##### Can I export to CSV or Excel?

Yes! On the Apify platform, you can download all results in **CSV, Excel (XLSX), JSON, XML, or HTML table format** with a single click.

# Actor input Schema

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

One or more search terms to find playlists on Spotify. Each keyword runs as a separate search.

💡 Leave empty and fill Spotify URIs below to use Get Details mode instead.

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

One or more Spotify playlist URIs or URLs to fetch full metadata.
Examples: spotify:playlist:ID · https://open.spotify.com/playlist/ID

⚠️ Only playlist URIs/URLs are accepted. Other types will be skipped.
💡 Leave empty and fill Search Keywords above to use Search mode instead.

## `playlists_search_limit` (type: `integer`):

Maximum number of playlist results to return per keyword.

## `playlists_fetchDetails` (type: `boolean`):

💡 Search mode only — when using Playlist URIs/URLs, full details are always fetched automatically.

✅ When ON — runs fetchPlaylist for every search result. You get: full paginated track listings, follower count, total track count, audio attributes, BPM & keys, owner profile, and cover art.

❌ When OFF — you only get basic search data: playlist name, owner name, cover image, and URI. You will NOT get track listings or follower counts.

⚠️ Slower — one extra API call per search result.

## `playlists_get_limit` (type: `integer`):

Maximum number of tracks to return from the playlist.

## Actor input object example

```json
{
  "keyword": [
    "Workout",
    "Chill"
  ],
  "spotifyUris": [
    "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
    "https://open.spotify.com/playlist/51NIMAKN9Qpe1nzsXGfFH8"
  ],
  "playlists_search_limit": 30,
  "playlists_fetchDetails": false,
  "playlists_get_limit": 25
}
```

# Actor output Schema

## `overview` (type: `string`):

Tabular overview of scraped Spotify playlists with name, followers, total tracks, owner, and links.

## `allResults` (type: `string`):

Complete dataset containing all playlist metadata, full paginated track sequences, audio attributes, and owner details.

# 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": [
        "Workout",
        "Chill"
    ],
    "spotifyUris": [
        "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
        "https://open.spotify.com/playlist/51NIMAKN9Qpe1nzsXGfFH8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/spotify-playlist-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": [
        "Workout",
        "Chill",
    ],
    "spotifyUris": [
        "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
        "https://open.spotify.com/playlist/51NIMAKN9Qpe1nzsXGfFH8",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("codenest/spotify-playlist-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": [
    "Workout",
    "Chill"
  ],
  "spotifyUris": [
    "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
    "https://open.spotify.com/playlist/51NIMAKN9Qpe1nzsXGfFH8"
  ]
}' |
apify call codenest/spotify-playlist-scraper --silent --output-dataset

```

## MCP server setup

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