# Spotify Playlist Scraper — Tracks, Artists & Metadata (`junipr/spotify-playlist`) Actor

Extract Spotify playlist tracks, artists, albums, ISRCs, durations, popularity, audio features, and playlist metadata for music analysis.

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

## Pricing

from $17.19 / 1,000 playlist checkeds

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 — Tracks, Artists & Metadata

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

**$17.19 per 1,000 Spotify sources checked** ($0.01719 per playlist, album, artist, or track URL) using the live Store pricing entry and `playlist-checked` event. A one-time `actor-start` event is scheduled at $0.0125 per run.

Platform usage handling follows the actor's live Store pricing entry. Track rows emitted from a charged source are not charged per track.

| Use Case | Sources | Cost |
|----------|---------|------|
| Single playlist | 1 | $0.03 |
| 10 playlists | 10 | $0.18 |
| 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/Pnw4aF1h4v0cbWTgh/builds/jmN9d8Ldt6EtotuWX/openapi.json
