# Spotify Playlist Intelligence Scraper (`w3crawler/spotify-playlist-intelligence-scraper`) Actor

Collect public Spotify playlist metadata and ordered rendered track rows with bounded scrolling, source provenance, and honest truncation diagnostics; no credentials or private API.

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

## Pricing

from $2.99 / 1,000 playlist intelligences

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Intelligence Scraper

Collect public Spotify playlist metadata and ordered track rows from anonymous rendered playlist pages. For each requested playlist, the Actor saves one `playlistMetadata` row and up to the configured bound of `playlistTrack` rows, including playlist context, track and artist identities, album links, date-added text, durations, explicit markers, and source provenance.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/spotify-playlist-intelligence-scraper) and select **Try for free**, or open the **Input** tab.
2. Add one or more public playlist URLs or 22-character playlist IDs to `playlistUrls`.
3. Keep `maxTracksPerPlaylist`, `timeoutSecs`, and the other limits at their defaults for the first run.
4. Start the Actor and open the dataset. Export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### Input

`playlistUrls` is required. All other fields are optional, and the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `playlistUrls` | string array | Required | Not supplied | Public Spotify playlist URLs or 22-character IDs. Duplicate IDs are removed. 1–50 items, each 1–200 characters. |
| `market` | string | Optional | `"US"` | Two-letter context copied to output. Public playlist pages are not market-filtered. |
| `maxTracksPerPlaylist` | integer | Optional | `10000` | Safety bound for rendered track rows, 1–10000. |
| `timeoutSecs` | integer | Optional | `90` | Navigation and page-operation timeout per playlist, in seconds. 10–180. |
| `maxResponseBytes` | integer | Optional | `5000000` | Maximum rendered HTML size accepted for each playlist page. 200000–15000000. |
| `requestDelayMs` | integer | Optional | `500` | Delay between bounded public-page scroll passes, in milliseconds. 0–5000. |
| `maxRetries` | integer | Optional | `1` | Retries for transient public-page navigation failures. 0–2. |

Full default input:

```json
{
  "market": "US",
  "maxTracksPerPlaylist": 10000,
  "timeoutSecs": 90,
  "maxResponseBytes": 5000000,
  "requestDelayMs": 500,
  "maxRetries": 1
}
```

The default input omits the required `playlistUrls` field; supply at least one playlist before running. The Actor reads anonymous public Spotify pages. It does not use the Spotify Web API, credentials, login sessions, Web Player tokens, audio downloads, or access-control bypasses.

### Output

The dataset contains two row types. Each successfully processed playlist contributes one `playlistMetadata` row plus zero or more `playlistTrack` rows in rendered playlist order. Missing optional values are omitted rather than inferred, and no diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordId` | string | Always | Stable Actor record key. |
| `recordType` | string enum | Always | Row discriminator: `playlistMetadata` or `playlistTrack`. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |
| `playlistId` | string | Always | Public Spotify playlist ID. |
| `playlistName` | string | Always | Playlist name observed on the rendered page. |
| `name` | string | Metadata row | Playlist name on the `playlistMetadata` row. |
| `playlistUrl` | string | Always | Canonical public playlist URL. |
| `spotifyUrl` | string | Always | Playlist URL on metadata rows, or track URL on track rows. |
| `ownerName` | string | Metadata row | Public playlist owner display name, when exposed. |
| `ownerId` | string | Metadata row | Public playlist owner ID, when exposed. |
| `ownerUrl` | string | Metadata row | Public playlist owner URL, when exposed. |
| `description` | string | Metadata row | Public playlist description, when exposed. |
| `imageUrl` | string | Always | Public artwork URL observed for the playlist or track row. |
| `declaredItemCount` | integer | Metadata row | Item count declared in the page header, when exposed. |
| `declaredSaveCount` | integer | Metadata row | Save count declared in the page header, when exposed. |
| `durationHours` | number | Metadata row | Approximate playlist duration declared in the header, when exposed. |
| `durationText` | string | Always | Duration text observed in the header or rendered track row. |
| `isPublicPlaylist` | boolean | Metadata row | Whether the page exposed the Public Playlist label. |
| `observedTrackCount` | integer | Metadata row | Track rows observed for the playlist under the configured bound. |
| `position` | integer | Track row | One-based position in the rendered playlist. |
| `trackId` | string | Track row | Public Spotify track ID. |
| `trackName` | string | Track row | Track title observed in the rendered row. |
| `trackUrl` | string | Track row | Public Spotify track URL. |
| `artists` | object array | Track row | Linked artist identities from the track row, with `id`, `name`, and `url` when exposed. |
| `artistNames` | string array | Track row | Artist display names from the rendered track row. |
| `albumId` | string | Track row | Public Spotify album ID, when exposed. |
| `albumName` | string | Track row | Album title from the rendered track row, when exposed. |
| `albumUrl` | string | Track row | Public Spotify album URL, when exposed. |
| `dateAdded` | string | Track row | Date-added text displayed by the playlist page. |
| `dateAddedTimestamp` | string | When parseable | ISO timestamp parsed from `dateAdded`; omitted when the displayed date cannot be parsed. |
| `durationMs` | integer | Track row | Track duration parsed from the rendered duration text. |
| `explicit` | boolean | Track row | Whether the row displayed Spotify's explicit marker. |
| `requestedMarket` | string | Always | Requested two-letter market context; not applied as a public-page filter. |
| `marketApplied` | boolean | Always | Always `false` for this public-page Actor. |
| `metadataScope` | string | Always | Scope declaration, `public_playlist_metadata_and_track_rows` in the saved run. |
| `trackDataStatus` | string | Always | Track-row availability declaration, `public_rendered_track_rows` in the saved run. |
| `sourceUrl` | string | Always | Public playlist page used as the source. |

#### Full JSON output

The example below is an unchanged `playlistTrack` row saved by the 2026-10-25 run. Metadata-only fields do not appear on track rows.

```json
{
  "recordId": "spotify_playlist_track_37i9dQZF1DXcBWIGoYBM5M_2_70cHKK8bHAfJrOGVnfRG9J",
  "recordType": "playlistTrack",
  "playlistId": "37i9dQZF1DXcBWIGoYBM5M",
  "playlistName": "Today’s Top Hits",
  "playlistUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
  "spotifyUrl": "https://open.spotify.com/track/70cHKK8bHAfJrOGVnfRG9J",
  "position": 2,
  "trackId": "70cHKK8bHAfJrOGVnfRG9J",
  "trackName": "Nicole Kidman",
  "trackUrl": "https://open.spotify.com/track/70cHKK8bHAfJrOGVnfRG9J",
  "artists": [
    {
      "id": "2qanRMyA5bNuTvz1dK45OP",
      "name": "ADÉLA",
      "url": "https://open.spotify.com/artist/2qanRMyA5bNuTvz1dK45OP"
    }
  ],
  "artistNames": [
    "ADÉLA"
  ],
  "albumId": "2yDFVH9CeOHt0sc9eI0aBs",
  "albumName": "PRIMA",
  "albumUrl": "https://open.spotify.com/album/2yDFVH9CeOHt0sc9eI0aBs",
  "imageUrl": "https://i.scdn.co/image/ab67616d00004851ac9d5d5263e9f03802d6864c",
  "dateAdded": "Sep 11, 2026",
  "dateAddedTimestamp": "2026-09-11T00:00:00.000Z",
  "durationText": "3:01",
  "durationMs": 181000,
  "explicit": true,
  "requestedMarket": "US",
  "marketApplied": false,
  "metadataScope": "public_playlist_metadata_and_track_rows",
  "trackDataStatus": "public_rendered_track_rows",
  "sourceUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
  "scrapedAt": "2026-10-25T20:55:32.172Z"
}
```

### Run summary

**Run summary** is stored in the run's key-value store under `OUTPUT_SUMMARY`. The same object is mirrored to `OUTPUT` for compatibility.

| Field | Meaning |
| --- | --- |
| `recordType` | Always `runSummary`. |
| `status` | Actor process outcome: `SUCCEEDED` or `FAILED`. |
| `requestedPlaylistCount` | Playlist inputs requested. |
| `playlistPagesProcessed` | Playlist pages processed. |
| `playlistRecordCount` | `playlistMetadata` rows saved. |
| `trackRecordCount` | `playlistTrack` rows saved. |
| `recordsStored` | Total dataset rows saved. |
| `playlistsWithTracks` | Playlists that produced at least one track row. |
| `emptyTrackListCount` | Playlists whose rendered track list was empty. |
| `truncatedPlaylistCount` | Playlists cut short by a page limitation. |
| `boundReachedPlaylistCount` | Playlists that reached `maxTracksPerPlaylist`. |
| `incompletePlaylistCount` | Playlists with incomplete extraction. |
| `scrollPassCount` | Bounded scroll passes performed. |
| `maxTracksPerPlaylist` | Configured track bound. |
| `requestedMarket` | Requested market context. |
| `marketApplied` | Whether market filtering was applied; always `false`. |
| `metadataScope` | Recorded scope declaration. |
| `trackDataStatus` | Recorded track-row status. |
| `extractionMode` | Extraction method used. |
| `paginationMode` | Pagination method used. |
| `publicPagePolicy` | Anonymous public-page policy statement. |
| `diagnosticCount` | Operational issues recorded for the run. |
| `errorRecordCount` | Error records; diagnostic rows are not written to the dataset. |
| `startedAt` | Run start time, in ISO UTC. |
| `completedAt` | Time the summary was written, in ISO UTC. |
| `durationMs` | Run duration in milliseconds. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `failureCount` | Operational and dataset-write failures. |
| `outputWriteFailureCount` | Summary or optional key-value writes that failed. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Rows were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Rows were saved, but a later problem prevented a complete run. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | The pages completed cleanly and returned no track rows. |
| `FAILED` | `FAILED` | A fatal error occurred before any usable row was saved. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "recordType": "runSummary",
  "status": "SUCCEEDED",
  "requestedPlaylistCount": 1,
  "playlistPagesProcessed": 1,
  "playlistRecordCount": 1,
  "trackRecordCount": 50,
  "recordsStored": 51,
  "playlistsWithTracks": 1,
  "emptyTrackListCount": 0,
  "truncatedPlaylistCount": 0,
  "boundReachedPlaylistCount": 0,
  "incompletePlaylistCount": 0,
  "scrollPassCount": 3,
  "maxTracksPerPlaylist": 10000,
  "requestedMarket": "US",
  "marketApplied": false,
  "metadataScope": "public_playlist_metadata_and_track_rows",
  "trackDataStatus": "public_rendered_track_rows",
  "extractionMode": "rendered_public_spotify_playlist",
  "paginationMode": "bounded_scroll_passes_until_public_tracklist_end",
  "publicPagePolicy": "anonymous rendered public Spotify pages only; no login, official Web API, token capture, audio download, or access-control bypass.",
  "diagnosticCount": 0,
  "errorRecordCount": 0,
  "startedAt": "2026-10-25T20:55:23.505Z",
  "completedAt": "2026-10-25T20:55:34.492Z",
  "durationMs": 10987,
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "failureCount": 0,
  "outputWriteFailureCount": 0
}
```

### Coverage and limitations

The Actor reads public playlist pages in an anonymous browser session. It reads the visible header and scrolls the rendered track table in bounded passes. It does not call the official Spotify Web API, private endpoints, login flows, Web Player tokens, or audio streams, and it does not bypass access controls.

One `playlistMetadata` row is written per processed playlist, but track rows exist only when Spotify renders them. Header counts such as `declaredItemCount` and `declaredSaveCount` are Spotify's displayed values; they can differ from `observedTrackCount` when the page limits scrolling or hides tracks. `maxTracksPerPlaylist`, timeouts, response size, retries, and delays are hard bounds. `market` is output context only. Duplicate playlist IDs are removed before processing. Missing page modules, unavailable playlists, deleted tracks, and access challenges cannot be recovered or inferred.

### Usage and support

Compute and storage charges vary with browser duration, playlist count, page size, scroll passes, and saved rows. Large playlists can require many scroll passes, so test with one playlist and a modest `maxTracksPerPlaylist` before scaling. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/spotify-playlist-intelligence-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT_SUMMARY`; do not include tokens, cookies, or private data. This Actor is an independent community tool and is not affiliated with, sponsored by, or endorsed by Spotify. Use it only for public data and in accordance with Spotify's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/spotify-playlist-intelligence-scraper/changelog.md

# Actor input Schema

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

Public Spotify playlist URLs or 22-character IDs. Duplicate IDs are removed.

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

Two-letter context copied to output; public playlist pages are not market-filtered.

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

Safety bound for rendered track rows. Set to 10000 to collect the public track list up to the Actor limit.

## `timeoutSecs` (type: `integer`):

Navigation and page-operation timeout per playlist, in seconds.

## `maxResponseBytes` (type: `integer`):

Maximum rendered HTML size accepted for each public playlist page.

## `requestDelayMs` (type: `integer`):

Delay between bounded public-page scroll passes, in milliseconds.

## `maxRetries` (type: `integer`):

Retries for transient public-page navigation failures.

## Actor input object example

```json
{
  "playlistUrls": [
    "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  ],
  "market": "US",
  "maxTracksPerPlaylist": 10000,
  "timeoutSecs": 90,
  "maxResponseBytes": 5000000,
  "requestDelayMs": 500,
  "maxRetries": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

Requested, stored, pagination, limitation, and diagnostic counts.

## `compatibilitySummary` (type: `string`):

No description

## `sourceMetadata` (type: `string`):

No description

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

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

```

## MCP server setup

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