# Spotify Playlists Scraper (`maximedupre/spotify-playlist`) Actor

Find public Spotify playlists by keyword or read playlist links and IDs. Get playlist details, owners, and ordered tracks in one dataset, with track changes when a prior read can be compared.

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

## Pricing

from $1.10 / 1,000 playlists

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

### 🎵 Find Spotify playlists and read their tracks

Music researchers, playlist curators, and developers can find public Spotify playlists by keyword or read known playlist links, IDs, and URIs. Get playlist details, owners, and tracks in playlist order in one dataset. When a prior successful read can be compared, the row also shows track changes.

- Collect public playlist details with **[Spotify Playlist Scraper](https://apify.com/maximedupre/spotify-playlist/examples/spotify-playlist-scraper)**.
- Find playlists for a music phrase with **[Spotify Playlist Search](https://apify.com/maximedupre/spotify-playlist/examples/spotify-playlist-search)**.
- Review songs in playlist order with **[Spotify Playlist Tracks](https://apify.com/maximedupre/spotify-playlist/examples/spotify-playlist-tracks)**.
- Save a playlist for later data work with **[Spotify Playlist Export](https://apify.com/maximedupre/spotify-playlist/examples/spotify-playlist-export)**.
- Read owner details and available follower counts with **[Spotify Playlist Data](https://apify.com/maximedupre/spotify-playlist/examples/spotify-playlist-data)**.

#### 🎧 Playlist details and ordered tracks

Each saved row holds one public playlist with its ID, name, and retrieved tracks. It can also include the description, Spotify link, artwork, owner, follower count, total track count, editorial status, format, and artwork colors when available.

Tracks can include artist and album details, duration, explicit status, playability, album track and disc numbers, play counts, and dates added. The total track count reported by Spotify may exceed the number of tracks returned.

The first eligible occurrence of a playlist is saved as it is found. Later matches for the same playlist are ignored, even when they come from another keyword or submitted link. For keyword searches, `keyword` keeps only the first saved match.

#### ▶️ Search or read a public playlist

1. Choose Keywords or Playlist links or IDs.
2. Enter one or more values for that method. Only the chosen method's inputs are used.
3. Set playlist and track limits if you want to stop early.
4. Start the run and open the Spotify playlists link in the output.
5. Export the dataset or read it through the Apify API.

You do not need to supply a Spotify login or API key. The Actor reads public playlists. It does not read private playlists, download music, play tracks, or change playlists.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
| --- | --- | --- |
| `discoveryMethod` | string | Required. Choose `keywords` to search or `playlists` to read known playlists. The form pre-fills `playlists`. |
| `keywords` | array of strings | Search terms, such as jazz or workout. Used only with `keywords`. |
| `maxPlaylists` | integer | Stops after this many playlists across all keywords. The minimum is 1. Leave it empty to return all available results until the source is exhausted. Used only with `keywords`. |
| `playlists` | array of strings | Spotify playlist URLs, IDs, or URIs, one per entry. A URI looks like `spotify:playlist:37i9dQZF1DXcBWIGoYBM5M`. Used only with `playlists`. |
| `maxTracks` | integer | Gets up to this many tracks per playlist, in playlist order. The minimum is 1, and the form pre-fills 10. Leave it empty to return all available tracks until the source is exhausted. Applies to both methods. |

Empty limits use what the source makes available. They do not promise every playlist on Spotify or unlimited source access.

**Example input**

This is the public input from the successful current-beta run using the form's prefilled playlist and track limit.

```json
{
  "discoveryMethod": "playlists",
  "playlists": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxTracks": 10
}
```

#### 🧾 Output

**Run output**

| Field | Type | What it does |
| --- | --- | --- |
| `playlists` | string | Links to playlist rows in the default dataset. |

**Playlist row fields**

Both methods use the same playlist row shape. `id`, `name`, and `tracks` are required. Other fields appear when available. Dotted paths below show nested fields, and `[]` means an entry in an array.

| Field | Type | What it does |
| --- | --- | --- |
| `id` | string | Spotify playlist ID. |
| `name` | string | Playlist name. |
| `description` | string | Playlist description from Spotify. |
| `url` | string | Playlist link from Spotify. |
| `images` | array of objects | Playlist cover artwork. |
| `images[].url` | string | Image URL. |
| `images[].width` | integer | Image width in pixels, when available. |
| `images[].height` | integer | Image height in pixels, when available. |
| `owner` | object | Playlist owner details. |
| `owner.id` | string | Spotify owner ID. |
| `owner.name` | string | Owner display name. |
| `owner.images` | array of objects | Owner profile artwork. |
| `owner.images[].url` | string | Owner image URL. |
| `owner.images[].width` | integer | Owner image width in pixels, when available. |
| `owner.images[].height` | integer | Owner image height in pixels, when available. |
| `followerCount` | integer | Playlist follower count reported by Spotify. |
| `trackCount` | integer | Total track count reported by Spotify, which may exceed the returned tracks. |
| `editorial` | boolean | Whether Spotify marks the playlist as editorial. |
| `format` | string | Playlist format reported by Spotify. |
| `artworkColors` | object | Artwork colors supplied by Spotify. |
| `artworkColors.background` | string | Background color. |
| `artworkColors.primary` | string | Primary color. |
| `artworkColors.secondary` | string | Secondary color. |
| `keyword` | string | Search keyword that first found the saved playlist. Later matches are ignored. |
| `tracks` | array of objects | Successfully read tracks in playlist order, up to the chosen limit. |
| `tracks[].id` | string | Spotify track ID. |
| `tracks[].name` | string | Track name. |
| `tracks[].artists` | array of objects | Artists credited on the track. |
| `tracks[].artists[].id` | string | Spotify artist ID. |
| `tracks[].artists[].name` | string | Artist name. |
| `tracks[].album` | object | Album that contains the track. |
| `tracks[].album.id` | string | Spotify album ID. |
| `tracks[].album.name` | string | Album name. |
| `tracks[].album.images` | array of objects | Album artwork. |
| `tracks[].album.images[].url` | string | Album image URL. |
| `tracks[].album.images[].width` | integer | Album image width in pixels, when available. |
| `tracks[].album.images[].height` | integer | Album image height in pixels, when available. |
| `tracks[].durationMs` | integer | Track duration in milliseconds. |
| `tracks[].explicit` | boolean | Whether Spotify marks the track as explicit. |
| `tracks[].playable` | boolean | Whether Spotify says the track can be played. |
| `tracks[].trackNumber` | integer | Track number on the album. |
| `tracks[].discNumber` | integer | Disc number on the album. |
| `tracks[].playCount` | integer | Track play count reported by Spotify. |
| `tracks[].addedAt` | string | Date and time when the track was added to the playlist. |
| `comparison` | object | Changes since the previous successful read. Present only when both track lists can be compared. |
| `comparison.added` | array of objects | Track occurrences added since the previous read. |
| `comparison.added[].trackId` | string | Added track ID. |
| `comparison.added[].currentPosition` | integer | Position in the current list, starting at 1. |
| `comparison.removed` | array of objects | Track occurrences removed since the previous read. |
| `comparison.removed[].trackId` | string | Removed track ID. |
| `comparison.removed[].previousPosition` | integer | Position in the previous list, starting at 1. |
| `comparison.moved` | array of objects | Track occurrences whose positions changed. |
| `comparison.moved[].trackId` | string | Moved track ID. |
| `comparison.moved[].previousPosition` | integer | Position in the previous list, starting at 1. |
| `comparison.moved[].currentPosition` | integer | Position in the current list, starting at 1. |
| `comparison.unchanged` | array of objects | Track occurrences that kept their positions. |
| `comparison.unchanged[].trackId` | string | Unchanged track ID. |
| `comparison.unchanged[].previousPosition` | integer | Position in the previous list, starting at 1. |
| `comparison.unchanged[].currentPosition` | integer | Position in the current list, starting at 1. |

**Genuine playlist row**

This row is from a successful current-beta run of a changing public playlist. It is shortened because the complete row exceeds the example size limit. Each `"..."` string marks omitted data from the track list or moved-track list. All other values are unchanged.

```json
{
  "id": "51LYFl36bgMvKNUvLT79oZ",
  "name": "EBSM Radio (Discover Hourly)",
  "description": "Industrial bass music for dark clubbing. A dynamic playlist that always contains the last 50 tracks played on Electro Body Synth Music radio. Join the communities on discord.gg&#x2F;synthwave &amp; discord.gg&#x2F;2HaPMG3",
  "url": "https://open.spotify.com/playlist/51LYFl36bgMvKNUvLT79oZ?si=01aaTF2xT7-mCgiSpKWGQA",
  "images": [
    {
      "url": "https://image-cdn-fa.spotifycdn.com/image/ab67706c0000da84acc1781b4245859662289d16"
    }
  ],
  "owner": {
    "id": "7nuzg0h0r6660ajs8j07phpqe",
    "name": "Nightride FM",
    "images": [
      {
        "url": "https://i.scdn.co/image/ab67757000003b829406ad70c9c56e7e2e212eb2",
        "width": 64,
        "height": 64
      },
      {
        "url": "https://i.scdn.co/image/ab6775700000ee859406ad70c9c56e7e2e212eb2",
        "width": 300,
        "height": 300
      }
    ]
  },
  "followerCount": 1269,
  "trackCount": 50,
  "format": "",
  "artworkColors": {
    "background": "#1d577e",
    "secondary": "#87c1ed"
  },
  "tracks": [
    {
      "id": "42Xd8i0xhF227yNALFEylO",
      "name": "Contagion",
      "artists": [
        {
          "id": "5flDeddXEgK6WWsI6PZk3d",
          "name": "Limbo Slice"
        }
      ],
      "album": {
        "id": "66tRIWZ7MWouKb1nm58TSw",
        "name": "Contagion",
        "images": [
          {
            "url": "https://i.scdn.co/image/ab67616d00001e02e1a9eb2cb659c74bd8de7242",
            "width": 300,
            "height": 300
          },
          {
            "url": "https://i.scdn.co/image/ab67616d00004851e1a9eb2cb659c74bd8de7242",
            "width": 64,
            "height": 64
          },
          {
            "url": "https://i.scdn.co/image/ab67616d0000b273e1a9eb2cb659c74bd8de7242",
            "width": 640,
            "height": 640
          }
        ]
      },
      "durationMs": 192017,
      "explicit": false,
      "playable": true,
      "trackNumber": 1,
      "discNumber": 1,
      "playCount": 714485,
      "addedAt": "2026-10-02T12:24:02.853Z"
    },
    "..."
  ],
  "comparison": {
    "added": [
      {
        "trackId": "7610bdqLprLADEler0ozyO",
        "currentPosition": 50
      }
    ],
    "removed": [
      {
        "trackId": "5PXc9xwaKtgunD0qY3lMig",
        "previousPosition": 1
      }
    ],
    "moved": [
      {
        "trackId": "42Xd8i0xhF227yNALFEylO",
        "previousPosition": 2,
        "currentPosition": 1
      },
      "..."
    ],
    "unchanged": []
  }
}
```

#### 💳 Pricing

This Actor uses pay-per-event pricing. One Playlist event covers one public playlist saved with its retrieved tracks and any available track changes. Tracks are included in that playlist event, rather than charged as separate events. A run with no saved playlists creates no Playlist event. Check the Apify pricing panel for the current price for your tier.

#### 🔌 Integrations

Open the dataset in Apify, export it in the formats Apify offers, or read its rows through the Apify dataset API. This video shows how to use Apify integrations:

https://www.youtube.com/watch?v=bNACk1_S_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Why is there no comparison field?

It appears only when a previous successful read and the current track list can be compared. A first read has no prior list to compare. A missing comparison does not mean that no tracks changed.

##### Why does trackCount exceed the number of returned tracks?

`trackCount` is the total reported by Spotify. `tracks` contains the tracks successfully read, up to your chosen `maxTracks` limit.

##### What happens when a playlist matches several keywords or links?

The first eligible match is saved, and later matches for that playlist are ignored. The row is not rewritten to collect later matches. A search row keeps only the keyword that first found it.

##### Can I search keywords and read known playlists in the same run?

Choose one method for each run. Only the inputs for that method are used. You can submit several keywords or several playlist values for the chosen method.

##### What happens if I leave a limit empty?

Leaving `maxPlaylists` empty returns all available search results until the source is exhausted. Leaving `maxTracks` empty returns all available tracks per playlist until the source is exhausted. Search coverage still depends on what Spotify returns.

##### Do I need Spotify credentials?

No buyer-supplied Spotify login or API key is needed. The Actor reads public playlist data and does not access private or account-only content.

##### Is this the official Spotify playlists site?

No. This is an Apify Actor for reading public Spotify playlist data. Returned playlist links, when available, point to Spotify.

##### Can it download songs or edit a playlist?

No. It returns playlist and track data. It does not download music, play tracks, or create or change playlists.

### 📝 Changelog

**v0.0** (03-10-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~spotify-playlist/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Spotify Songs Scraper](https://apify.com/maximedupre/spotify-songs-scraper) - Find public Spotify tracks by keyword for song research beyond a known playlist.
- [Spotify Artist Scraper](https://apify.com/maximedupre/spotify-artists) - Read public artist profiles and available audience metrics for artists found in playlists.
- [YouTube Music Scraper](https://apify.com/maximedupre/youtube-music-scraper) - Find public playlists and music details on another music source.
- [SoundCloud Scraper](https://apify.com/maximedupre/soundcloud-scraper) - Collect public SoundCloud tracks, artists, and playlists for cross-source music research.
- [Billboard Charts History Scraper](https://apify.com/maximedupre/billboard) - Compare playlist songs with current or historical chart ranks.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `discoveryMethod` (type: `string`):

Choose how to find public Spotify playlists.

## `keywords` (type: `array`):

Enter one or more search terms, such as jazz or workout. Used when you choose Keywords.

## `maxPlaylists` (type: `integer`):

Stop after this many playlists across all keywords. Leave it empty to return all available results until the source is exhausted. Used when you choose Keywords.

## `playlists` (type: `array`):

Enter Spotify playlist URLs, IDs, or URIs, one per line. A URI looks like spotify:playlist:37i9dQZF1DXcBWIGoYBM5M. Used when you choose Playlist links or IDs.

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

Get up to this many tracks from each playlist, in playlist order. Leave it empty to return all available tracks until the source is exhausted. Applies to both methods.

## Actor input object example

```json
{
  "discoveryMethod": "playlists",
  "playlists": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "maxTracks": 10
}
```

# Actor output Schema

## `playlists` (type: `string`):

View playlist details, ordered tracks, and available track changes.

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

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/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 = {
    "discoveryMethod": "playlists",
    "playlists": ["https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"],
    "maxTracks": 10,
}

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

```

## MCP server setup

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

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/gfhGNvQEY3mEfAhsI/builds/5wTqMYJxzhtAuZCiH/openapi.json
