# Spotify Playlist Track Extractor (`axlymxp/spotify-playlist-track-extractor`) Actor

Extract every track from any Spotify playlist as clean JSON — one row per track with artists, album, duration, play count, added date, and the ISRC code for royalty and catalog work. Handles playlists of any size with pagination and resume. No API key. Pay only for results.

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

## Pricing

from $4.00 / 1,000 dataset items

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 Track Extractor

Turn any **Spotify playlist** into a complete, structured dataset — **one clean row
per track**. Get artists, album, duration, play count, the date each track was
added, and the industry **ISRC** code. Handles playlists of any size with automatic
pagination and checkpoint resume. No API key, no login.

> Not affiliated with Spotify. Reads public playlist data from Spotify's own web and
> mobile backends for research, analytics and interoperability.

### Who it's for

- **Playlist curators & pluggers** — audit tracklists, spot placements, and export
  playlists for pitching.
- **Labels, distributors & rights teams** — capture **ISRC** codes per track for
  royalty matching and catalog reconciliation.
- **A\&R, marketers & analysts** — analyze what's on editorial and competitor
  playlists, with play counts and added-dates.
- **Researchers & data teams** — build track-level datasets from any set of
  playlists as clean JSON.

### What you get (output fields)

One row per track, stamped with its playlist context.

| Field | Type | Description |
| ----- | ---- | ----------- |
| `playlistId` / `playlistName` / `playlistUrl` | string | Source playlist |
| `playlistOwner` / `playlistOwnerUsername` | string | Playlist owner |
| `playlistFollowers` | integer | Playlist follower count |
| `playlistTotalTracks` | integer | Total tracks in the playlist |
| `position` | integer | 1-based position in the playlist |
| `addedAt` | string | When the track was added (ISO-8601) |
| `trackId` / `trackUri` / `trackUrl` | string | Track identifiers + link |
| `trackName` | string | Track title |
| `artists` / `artistNames` | array / string | Contributing artists |
| `albumName` / `albumId` / `albumUri` | string | Parent album |
| `releaseDate` | string | Album release date (YYYY-MM-DD) |
| `durationMs` / `durationText` | int / string | Track length |
| `isrc` | string | **International Standard Recording Code** |
| `popularity` | integer | Spotify popularity 0–100 |
| `playCount` | integer | Lifetime stream count |
| `trackNumber` / `discNumber` | integer | Position on the album |
| `explicit` | boolean | Explicit flag |
| `imageUrl` | string | Album cover image |
| `scrapedAt` | string | UTC ISO-8601 timestamp |

### Use cases

- **Royalty & catalog matching** — export ISRC codes for every track on a playlist
  and reconcile them against your catalog.
- **Playlist auditing** — snapshot editorial or competitor playlists over time to
  see what was added and when.
- **Placement tracking** — check whether your roster's tracks appear on target
  playlists, and where in the order.
- **Music datasets** — combine many playlists into a single track-level dataset for
  analysis or ML.

### Input parameters

| Parameter | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| `playlistUrls` | array | — | Spotify playlist URLs or URIs (required) |
| `maxTracksPerPlaylist` | integer | 0 | Cap tracks per playlist (0 = all) |
| `maxItems` | integer | 0 | Global cap across playlists (0 = no cap) |
| `includeISRC` | boolean | true | Add ISRC + popularity (one extra request per track) |
| `market` | string | US | ISO country code |
| `locale` | string | en | Language for text fields |
| `proxyConfiguration` | object | none | Optional Apify proxy (not required) |

#### Example input

```json
{
  "playlistUrls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxTracksPerPlaylist": 50,
  "includeISRC": true
}
```

#### Example output (one track row)

```json
{
  "playlistId": "37i9dQZF1DXcBWIGoYBM5M",
  "playlistName": "Today's Top Hits",
  "playlistFollowers": 33987576,
  "position": 1,
  "addedAt": "2026-08-01T00:00:00Z",
  "trackId": "70pVCVMGjmIWPbWXDwf11e",
  "trackName": "Some Hit Song",
  "artistNames": "An Artist",
  "albumName": "An Album",
  "durationMs": 201000,
  "durationText": "3:21",
  "isrc": "USxxx0000001",
  "popularity": 92,
  "playCount": 123456789,
  "scrapedAt": "2026-08-05T07:00:00+00:00"
}
```

### Scheduling & integrations

- **Schedule** runs to snapshot playlists on a cadence and track changes over time.
- **Webhooks** on run completion push new tracks into your pipeline.
- Export to **CSV, JSON, Excel, XML** or via the **Apify API**; connect to **Google
  Sheets, Make, Zapier, Airbyte** or **S3**.

### Use with AI agents (MCP)

Available over Apify's **MCP** interface — an assistant like Claude or ChatGPT can
call it as a tool, e.g. "list every track and its ISRC on this Spotify playlist".

### FAQ

**Do I need a Spotify API key or account?** No. It reads public playlist data
anonymously.

**How big a playlist can it handle?** Any size — it paginates through the whole
playlist and checkpoints progress, so interrupted runs resume without duplicating
rows. Use `maxTracksPerPlaylist` / `maxItems` to cap output.

**What is ISRC?** The International Standard Recording Code — a unique identifier for
a recording, used across the music industry for royalties and catalog matching.

**Why is ISRC enrichment optional?** It adds one extra request per track. Turn it
off (`includeISRC: false`) for the fastest, cheapest runs on very large playlists.

**Is a proxy required?** No. Spotify's endpoints have no anti-bot here; a proxy is
optional for a specific egress region.

**Is this legal / allowed?** You are responsible for your use. This accesses publicly
available data; review Spotify's terms and your local laws, and prefer the official
Spotify API where it fits.

# Actor input Schema

## `playlistUrls` (type: `array`):

One or more Spotify playlist links or URIs, e.g. https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M or spotify:playlist:37i9dQZF1DXcBWIGoYBM5M.

## `maxTracksPerPlaylist` (type: `integer`):

Cap tracks extracted from each playlist. 0 = all tracks.

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

Global cap across all playlists in the run. 0 = no global cap.

## `includeISRC` (type: `boolean`):

Add each track's ISRC code and popularity (one extra request per track via Spotify's mobile backend). Turn off for faster/cheaper runs on very large playlists.

## `market` (type: `string`):

ISO 3166-1 alpha-2 market for availability/metadata, e.g. US, GB, DE.

## `locale` (type: `string`):

Language for text fields where available, e.g. en, es, de.

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

Optional Apify proxy. Spotify's endpoints work without a proxy; use one only if you need a specific egress region.

## Actor input object example

```json
{
  "playlistUrls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxTracksPerPlaylist": 0,
  "maxItems": 0,
  "includeISRC": true,
  "market": "US",
  "locale": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "playlistUrls": [
        "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/spotify-playlist-track-extractor").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 = { "playlistUrls": ["https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"] }

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/spotify-playlist-track-extractor").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 '{
  "playlistUrls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ]
}' |
apify call axlymxp/spotify-playlist-track-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axlymxp/spotify-playlist-track-extractor"
        }
    }
}

```

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/6jDeqQfIGcGoTumsu/builds/a1RGZK2E18iXOl5Rl/openapi.json
