# Spotify Playlist (`junipr/spotify-playlist`) Actor

Extract track listings, artist info, audio features, and metadata from Spotify playlists, albums, and artist discographies. BPM, key, danceability scores. No Spotify API key required. Uses residential proxy for reliable results on all Apify plans.

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

## Pricing

$5.20 / 1,000 track scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Playlist Scraper

Extract complete track listings, artist information, audio features, and metadata from Spotify playlists, albums, and artist discographies. Get **BPM, key, danceability, energy** scores, ISRC codes, and playlist follower counts — **no Spotify developer account required**.

### Proxy Configuration

The default input runs without proxy for a small public playlist sample. If Spotify blocks your workload from datacenter IPs, enable residential proxy in the Proxy Configuration field.

- **Paid Apify plan users:** Enable Apify residential proxy when you need higher reliability.
- **Free Apify plan users:** Provide your own residential proxy URL if direct requests are blocked.
- **High-volume runs:** Split work into capped runs; this actor allows up to 3 URLs per run and 100 tracks per source.

### What Data Can You Extract?

| Field | Description |
|-------|-------------|
| `title` / `titleClean` | Track name (with and without feat. suffix) |
| `artists` | Artist names, IDs, URLs, genres, follower counts |
| `album` | Album name, type, release date, cover images |
| `durationMs` / `durationFormatted` | Duration in ms and MM:SS format |
| `explicit` | Explicit content flag |
| `popularity` | Spotify popularity score (0–100) |
| `isrc` | International Standard Recording Code |
| `previewUrl` | 30-second preview URL |
| `playlistFollowers` | Playlist follower count |
| `addedAt` | Date track was added to playlist |
| `audioFeatures.tempo` | BPM |
| `audioFeatures.key` / `keyName` | Musical key (0–11 and "C", "C#", etc.) |
| `audioFeatures.danceability` | Danceability score (0.0–1.0) |
| `audioFeatures.energy` | Energy score (0.0–1.0) |
| `audioFeatures.valence` | Happiness score (0.0–1.0) |

### How to Use

**Scrape a playlist:**
```json
{
  "urls": ["https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"]
}
````

**Scrape with audio features:**

```json
{
  "urls": ["https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"],
  "includeAudioFeatures": true
}
```

**Scrape multiple sources:**

```json
{
  "urls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
    "https://open.spotify.com/album/4aawyAB9vmqN3uQ7FjRGTy",
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
  ],
  "includeAudioFeatures": true,
  "includeArtistDetails": true
}
```

### Input Configuration

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `urls` | array | **Required** | Spotify playlist, album, artist, or track URLs |
| `includeAudioFeatures` | boolean | `false` | Fetch BPM, key, energy, danceability per track |
| `includeArtistDetails` | boolean | `false` | Fetch artist genres, follower counts |
| `includeAlbumDetails` | boolean | `false` | Fetch album label, UPC |
| `maxTracks` | integer | `1` | Max tracks per source, capped at 100 |
| `includeLocalFiles` | boolean | `false` | Include local file entries |
| `maxConcurrency` | integer | `2` | Conservative request concurrency, capped at 3 |
| `requestDelay` | integer | `100` | Delay between API calls (ms) |

### Output Example

```json
{
  "sourceUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
  "sourceType": "playlist",
  "playlistName": "Today's Top Hits",
  "playlistFollowers": 32000000,
  "trackPosition": 1,
  "addedAt": "2026-03-10T00:00:00Z",
  "trackId": "4Dvkj6JhhA12EX05fT7y2e",
  "title": "Blinding Lights",
  "titleClean": "Blinding Lights",
  "durationMs": 200040,
  "durationFormatted": "3:20",
  "explicit": false,
  "popularity": 93,
  "isrc": "USUG11904978",
  "artists": [
    {
      "id": "1Xyo4u8uXC1ZmMpatF05PJ",
      "name": "The Weeknd",
      "isPrimary": true
    }
  ],
  "album": {
    "name": "After Hours",
    "albumType": "album",
    "releaseDate": "2020-03-20",
    "releaseDatePrecision": "day"
  },
  "audioFeatures": {
    "tempo": 171.005,
    "key": 1,
    "keyName": "C#",
    "mode": 1,
    "modeName": "major",
    "danceability": 0.514,
    "energy": 0.73,
    "valence": 0.334
  },
  "scrapedAt": "2026-03-11T12:00:00.000Z"
}
```

### Audio Features Explained

Spotify calculates audio features using audio analysis algorithms:

| Feature | Range | Description |
|---------|-------|-------------|
| `tempo` | 0–250 BPM | Track tempo |
| `key` / `keyName` | 0–11 / "C"–"B" | Musical key (Pitch Class notation) |
| `mode` | 0=minor, 1=major | Modality |
| `danceability` | 0.0–1.0 | How suitable for dancing |
| `energy` | 0.0–1.0 | Intensity and activity |
| `valence` | 0.0–1.0 | Musical positiveness (happiness) |
| `speechiness` | 0.0–1.0 | Presence of spoken words |
| `acousticness` | 0.0–1.0 | Confidence of acoustic sound |
| `instrumentalness` | 0.0–1.0 | Predicts no vocals |
| `liveness` | 0.0–1.0 | Presence of live audience |
| `loudness` | dB | Overall loudness |

### Pricing

**$3.90 per 1,000 tracks scraped** (PPE — pay per track record)

Pricing includes all platform compute costs — no hidden fees.

| Use Case | Tracks | Cost |
|----------|--------|------|
| Single playlist (50 tracks) | 50 | $0.20 |
| 10 playlists | 500 | $1.95 |
| Album catalog | 1,000 | $3.90 |
| Weekly monitoring (10K tracks) | 10,000 | $39.00 |

Unavailable/deleted tracks and failed playlist loads are NOT billed.

### FAQ

#### Do I need a Spotify account to use this?

No. This actor uses Spotify's public client credential flow — no developer account, no OAuth app setup required.

#### What are audio features and why are they useful?

Audio features are computed by Spotify's audio analysis algorithms. DJs use BPM and key for mixing. Music researchers use danceability and energy for genre analysis. A\&R teams use popularity trends for playlist monitoring.

#### Why can't I scrape a private playlist?

Private playlists require authentication with the playlist owner's account. Only public playlists are accessible.

#### What's an ISRC code?

International Standard Recording Code — a unique identifier for a specific recording used in rights management, licensing, and royalty tracking.

#### Does this work with Spotify podcasts?

Podcast episodes in playlists are handled gracefully but audio features are not available for episodes.

#### Can I monitor playlist additions over time?

Yes — combine with Apify's scheduled runs. Run weekly on the same playlist URL and compare results to detect new additions.

***

Legal notice: Accessing public Spotify data for analysis is generally accepted practice. Do not use for audio extraction or DRM circumvention. ISRC codes are for identification only.

Related actors by Junipr: [Medium Scraper](https://apify.com/junipr/medium-scraper) | [AI Content Detector](https://apify.com/junipr/ai-content-detector)

# Actor input Schema

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

Spotify URLs to scrape. Supports playlists, albums, artists, and individual tracks. Must start with open.spotify.com. Max 3 URLs per run.

## `includeAudioFeatures` (type: `boolean`):

Fetch audio features per track (BPM, key, energy, danceability). Requires additional API calls.

## `includeArtistDetails` (type: `boolean`):

Fetch full artist profiles (genres, follower count, popularity).

## `includeAlbumDetails` (type: `boolean`):

Fetch full album details (label, copyrights, UPC).

## `maxTracks` (type: `integer`):

Maximum tracks to extract per playlist/album/artist source. Capped at 100 per source.

## `includeLocalFiles` (type: `boolean`):

Include local file entries in playlists.

## `maxConcurrency` (type: `integer`):

Maximum concurrent requests to Spotify API. Kept conservative for reliability.

## `requestDelay` (type: `integer`):

Delay between API calls in milliseconds.

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

Optional proxy settings. Enable residential proxy if Spotify blocks datacenter requests for your workload.

## Actor input object example

```json
{
  "urls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "includeAudioFeatures": false,
  "includeArtistDetails": false,
  "includeAlbumDetails": false,
  "maxTracks": 1,
  "includeLocalFiles": false,
  "maxConcurrency": 2,
  "requestDelay": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Track name, artists, album, duration, popularity, ISRC, explicit flag, audio features (BPM, key, energy, danceability, valence), artist genres, and album label.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/spotify-playlist").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/spotify-playlist").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call junipr/spotify-playlist --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=junipr/spotify-playlist",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Playlist",
        "description": "Extract track listings, artist info, audio features, and metadata from Spotify playlists, albums, and artist discographies. BPM, key, danceability scores. No Spotify API key required. Uses residential proxy for reliable results on all Apify plans.",
        "version": "1.0",
        "x-build-id": "mLWFT1qrGoMEhgRbV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/junipr~spotify-playlist/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-junipr-spotify-playlist",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/junipr~spotify-playlist/runs": {
            "post": {
                "operationId": "runs-sync-junipr-spotify-playlist",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/junipr~spotify-playlist/run-sync": {
            "post": {
                "operationId": "run-sync-junipr-spotify-playlist",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Spotify URLs",
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "description": "Spotify URLs to scrape. Supports playlists, albums, artists, and individual tracks. Must start with open.spotify.com. Max 3 URLs per run.",
                        "default": [
                            "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeAudioFeatures": {
                        "title": "Include Audio Features",
                        "type": "boolean",
                        "description": "Fetch audio features per track (BPM, key, energy, danceability). Requires additional API calls.",
                        "default": false
                    },
                    "includeArtistDetails": {
                        "title": "Include Artist Details",
                        "type": "boolean",
                        "description": "Fetch full artist profiles (genres, follower count, popularity).",
                        "default": false
                    },
                    "includeAlbumDetails": {
                        "title": "Include Album Details",
                        "type": "boolean",
                        "description": "Fetch full album details (label, copyrights, UPC).",
                        "default": false
                    },
                    "maxTracks": {
                        "title": "Max Tracks",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum tracks to extract per playlist/album/artist source. Capped at 100 per source.",
                        "default": 1
                    },
                    "includeLocalFiles": {
                        "title": "Include Local Files",
                        "type": "boolean",
                        "description": "Include local file entries in playlists.",
                        "default": false
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 3,
                        "type": "integer",
                        "description": "Maximum concurrent requests to Spotify API. Kept conservative for reliability.",
                        "default": 2
                    },
                    "requestDelay": {
                        "title": "Request Delay (ms)",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Delay between API calls in milliseconds.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optional proxy settings. Enable residential proxy if Spotify blocks datacenter requests for your workload.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
