# Spotify Scraper & Play Counts (`wyle/spotify-scraper`) Actor

Extract Spotify tracks, play counts, artists, monthly listeners, albums, playlists, podcasts, and global charts without an API key or browser. Search by keyword or scrape Spotify URLs and URIs, then export clean datasets in CSV, Excel, JSON, or API.

- **URL**: https://apify.com/wyle/spotify-scraper.md
- **Developed by:** [Willy Lengkong](https://apify.com/wyle) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## Spotify Scraper & Play Counts

Extract Spotify tracks, stream play counts, artists, monthly listeners, albums, playlists, podcasts, and official weekly charts without a Spotify API key, login, or browser. Search by keyword or pass any Spotify URLs and URIs, then export clean, structured datasets in **CSV, Excel, JSON, or API**.

### Ways to Use

| Mode | Input Field | What You Get |
| :--- | :--- | :--- |
| **Direct Spotify URLs & URIs** | `startUrls` or `uris` | Track play counts, artist monthly listeners & top cities, full albums, paginated playlists, podcast shows, and episodes |
| **Keyword Search** | `searchQueries` + `searchType` | Search across `tracks`, `artists`, `albums`, `playlists`, `podcasts`, or `episodes` with full pagination |
| **Global Weekly Charts** | `includeCharts` + `chartType` | Official Weekly Top 50 Songs, Albums, and Artists charts with current rank, previous rank, and rank movement status |

### Supported Entities & Coverage

- **Tracks (`/track/...`, `spotify:track:...`):** Exact stream `playCount`, duration, release date, explicit flag, track/disc numbers, artist list, album info, copyright, cover art, and share URLs.
- **Artists (`/artist/...`, `spotify:artist:...`):** `monthlyListeners`, `followers`, `worldRank`, verification badge, biography, external social links (Instagram, X/Twitter, Facebook, Wikipedia), `topCities` listener breakdown, plus top tracks (with play counts) and discography releases.
- **Albums (`/album/...`, `spotify:album:...`):** Album metadata, record label, copyright, release date, and complete tracklist with per-track play counts.
- **Playlists (`/playlist/...`, `spotify:playlist:...`):** Playlist name, description, owner, follower count, total track count, track `position`, `addedAt` timestamp, and per-track `playCount` beyond the 100-track preview limit.
- **Podcasts & Episodes (`/show/...`, `/episode/...`):** Show title, publisher, description, episode count, episode duration, release dates, explicit labels, and audio preview links.
- **Global Weekly Charts:** Weekly Top 50 Songs, Albums, and Artists (`chartName`, `chartDate`, `position`, `previousRank`, `entryStatus`).

### Fast vs. Enriched Results

| Setting | Best For | Speed | Key Fields Returned |
| :--- | :--- | :--- | :--- |
| `enrichSearchDetails = false` | High-volume discovery lists | Fastest | IDs, URLs, titles, artist names, release dates, cover art |
| `enrichSearchDetails = true` (default) | Analytics, A\&R, and reporting | Fast | Adds exact `playCount` on tracks and `monthlyListeners`, `followers`, `worldRank`, `topCities`, and social links on artists |
| `flattenCollectionItems = true` (default) | Spreadsheets (`CSV` / `Excel`) | Fast | One dataset row per track/episode in playlists, albums, and podcast shows |
| `flattenCollectionItems = false` | Nested app/API ingestion | Fast | One parent playlist, album, or show record with child tracks/episodes inside `items` |

### Proxy & Run Tips

- **No login or API key needed:** Leave `proxyConfiguration` disabled (`useApifyProxy: false`) for standard runs.
- **Large batch runs:** Keep `maxConcurrency` between `4` and `6`, and enable Apify Proxy if scraping hundreds of targets or playlists in a single job.
- **Artist discography size:** Disable `includeArtistDiscography` if you only need top-level artist metrics (`monthlyListeners`, `followers`, `worldRank`, `topCities`) for smaller output rows.

### Use Cases

1. **A\&R & Music Talent Scouting:** Monitor rising artists by tracking `monthlyListeners`, `worldRank`, and city-level listener hotspots (`topCities`).
2. **Stream & Playlist Performance Tracking:** Measure exact track `playCount` across Spotify playlists, editorial lists, and albums over time.
3. **Catalog & Label Intelligence:** Extract complete album tracklists with record labels, release dates, and copyright strings into Google Sheets or databases.
4. **Podcast & Creator Outreach:** Discover shows, episodes, and verified artist social media links (`externalLinks`) for sponsorships and bookings.

### Frequently Asked Questions

**Does this scraper return exact Spotify track play counts and monthly listeners?**
Yes. Standard Spotify Web API endpoints hide track stream counts and artist monthly listeners, whereas this Actor captures exact `playCount` values for tracks and `monthlyListeners`, `followers`, `worldRank`, and `topCities` for artists.

**Can I scrape playlists with more than 100 tracks?**
Yes. Playlists, albums, podcast shows, and keyword searches automatically paginate until reaching `maxItems` (up to `10,000` items per target).

**Do I need a Spotify developer API key or account login?**
No. You only pass Spotify URLs, `spotify:` URIs, search keywords, or enable weekly charts.

**Can I export results to CSV, Excel, or connect via API?**
Yes. All records are strictly typed with zero null values and can be downloaded as CSV, Excel, JSON, or fetched programmatically via the Apify API, n8n, Make, or Zapier.

### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `startUrls` | Array | `Today's Top Hits` URL | Spotify URLs (`track`, `artist`, `album`, `playlist`, `show`, or `episode`). |
| `uris` | Array | `[]` | Optional list of `spotify:` URIs or web links. |
| `searchQueries` | Array | `[]` | Keywords to search on Spotify. |
| `searchType` | String | `"tracks"` | Search category: `tracks`, `artists`, `albums`, `playlists`, `podcasts`, or `episodes`. |
| `includeCharts` | Boolean | `false` | Fetch Spotify Global Weekly Top 50 Songs, Albums, and Artists charts. |
| `chartType` | String | `"ALL"` | Chart filter when `includeCharts` is enabled: `ALL`, `TRACK`, `ALBUM`, or `ARTIST`. |
| `maxItems` | Integer | `25` | Maximum items per playlist, album, show, search query, or chart (`1` to `10000`). |
| `flattenCollectionItems` | Boolean | `true` | Emit one row per track/episode for playlists, albums, and podcasts, or one parent JSON object when `false`. |
| `enrichSearchDetails` | Boolean | `true` | Fetch full metrics (`playCount`, `monthlyListeners`, `followers`, `topCities`) for search results. |
| `includeArtistDiscography` | Boolean | `true` | Include artist top tracks and releases inside `items` on Artist records. |
| `maxConcurrency` | Integer | `4` | Maximum concurrent requests (`1` to `10`). |
| `proxyConfiguration` | Object | `{"useApifyProxy": false}` | Optional Apify Proxy configuration. |

### Sample Output

#### Playlist / Track Record (`flattenCollectionItems = true`)

```json
{
  "recordType": "track",
  "id": "3h5T5JypYU7huFiVYhv1dr",
  "uri": "spotify:track:3h5T5JypYU7huFiVYhv1dr",
  "url": "https://open.spotify.com/track/3h5T5JypYU7huFiVYhv1dr",
  "name": "BbY WOW",
  "subtitle": "Today’s Top Hits",
  "coverImageUrl": "https://i.scdn.co/image/ab67616d0000b27321deb742375f88edfb2e7368",
  "shareUrl": "https://open.spotify.com/track/3h5T5JypYU7huFiVYhv1dr",
  "playCount": 479983890,
  "explicit": false,
  "playable": true,
  "durationMs": 225834,
  "durationFormatted": "3:45",
  "releaseDate": "2026-08-07",
  "trackNumber": 11,
  "discNumber": 1,
  "artists": [
    {
      "id": "790FomKkXshlbRYZFtlgla",
      "name": "KAROL G",
      "uri": "spotify:artist:790FomKkXshlbRYZFtlgla",
      "url": "https://open.spotify.com/artist/790FomKkXshlbRYZFtlgla"
    }
  ],
  "artistNames": "KAROL G, Judeline, rusowsky",
  "albumName": "NO ME ARREPIENTO DE SENTIR TANTO",
  "albumId": "7a0lnWtCz0eW15WsWu3dHQ",
  "albumUrl": "https://open.spotify.com/album/7a0lnWtCz0eW15WsWu3dHQ",
  "label": "",
  "copyright": "",
  "position": 1,
  "addedAt": "2026-11-06T05:02:41.791Z",
  "parentType": "playlist",
  "parentId": "37i9dQZF1DXcBWIGoYBM5M",
  "parentName": "Today’s Top Hits",
  "parentUrl": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
  "scrapedAt": "2026-11-21T07:30:00.000000+00:00"
}
```

#### Artist Record

```json
{
  "recordType": "artist",
  "id": "3Nrfpe0tUJi4K4DXYWgMUX",
  "uri": "spotify:artist:3Nrfpe0tUJi4K4DXYWgMUX",
  "url": "https://open.spotify.com/artist/3Nrfpe0tUJi4K4DXYWgMUX",
  "name": "BTS",
  "subtitle": "Artist",
  "coverImageUrl": "https://i.scdn.co/image/ab6761610000e5ebf80ec63ea7a0ef0fba60957d",
  "shareUrl": "https://open.spotify.com/artist/3Nrfpe0tUJi4K4DXYWgMUX?si=p6Aizu9bR-CTeek56cEDTQ",
  "monthlyListeners": 29166752,
  "followers": 90811376,
  "worldRank": 230,
  "verified": true,
  "description": "BTS, an acronym of Bangtan Sonyeondan or “Beyond the Scene,” are a GRAMMY-nominated South Korean boyband...",
  "externalLinks": {
    "facebook": "https://facebook.com/bangtan.official/",
    "instagram": "https://instagram.com/bts.bighitofficial/",
    "twitter": "https://twitter.com/bts_bighit"
  },
  "topCities": [
    {
      "city": "São Paulo",
      "region": "SP",
      "country": "BR",
      "listeners": 628737
    }
  ],
  "totalItems": 31,
  "items": [
    {
      "itemType": "top_track",
      "id": "68lbSrXDORS51pmyjZv712",
      "name": "SWIM",
      "url": "https://open.spotify.com/track/68lbSrXDORS51pmyjZv712",
      "playCount": 1055625822,
      "durationMs": 159007,
      "durationFormatted": "2:39",
      "artists": "BTS"
    }
  ],
  "scrapedAt": "2026-11-21T07:30:00.000000+00:00"
}
```

***

### Pricing & Cost Examples

Lightweight HTTP-only execution (`512 MB` default memory, no browser overhead). Pay-per-event pricing scales from `$0.0025` per record (Free tier) down to `$0.0010` per record (Gold+ tiers), plus `$0.005` per Actor start.

| Run Size | Free Plan Estimate | Gold+ Plan Estimate |
| :--- | :--- | :--- |
| `25` tracks (quick playlist test) | ~$0.07 | ~$0.03 |
| `1,000` tracks / artists | ~$2.51 | ~$1.01 |

***

### API & Automation Integration (Python, Node.js, cURL, n8n, MCP)

Works seamlessly with **n8n**, **Make**, **Zapier**, **Google Sheets**, and **Apify MCP** (clean entity-specific fields keep spreadsheet columns tidy and LLM context compact).

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("wyle/spotify-scraper").call(run_input={
    "startUrls": [{"url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"}],
    "maxItems": 25,
    "flattenCollectionItems": True,
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(len(items), items[0]["name"], items[0].get("playCount"))
```

#### Node.js

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "<YOUR_APIFY_TOKEN>" });
const run = await client.actor("wyle/spotify-scraper").call({
  startUrls: [{ url: "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M" }],
  maxItems: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0]);
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/wyle~spotify-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"}],"maxItems":25}'
```

***

### Related Actors by `wyle`

- [`wyle/youtube-search-channels-shorts-scraper`](https://apify.com/wyle/youtube-search-channels-shorts-scraper) — Cross-track music videos, Shorts, and YouTube channel velocity without a YouTube API key.
- [`wyle/youtube-comments-scraper`](https://apify.com/wyle/youtube-comments-scraper) — Extract fan sentiment and replies on music releases.
- [`wyle/threads-all-in-one-scraper`](https://apify.com/wyle/threads-all-in-one-scraper) — Monitor artist announcements and viral music discussions on Threads.

# Actor input Schema

## `startUrls` (type: `array`):

List of Spotify web URLs to scrape. Supports track, artist, album, playlist, podcast show, and episode links.

## `uris` (type: `array`):

Optional list of Spotify URIs (e.g. spotify:artist:3Nrfpe0tUJi4K4DXYWgMUX) or open.spotify.com URLs.

## `searchQueries` (type: `array`):

Keywords to search on Spotify (e.g. \['taylor swift', 'lofi beats']).

## `searchType` (type: `string`):

Entity type to return when Search Queries are provided.

## `includeCharts` (type: `boolean`):

Fetch Spotify Global Weekly Top 50 Songs, Albums, and Artists charts.

## `chartType` (type: `string`):

Which chart category to include when Include Global Weekly Charts is enabled.

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

Maximum number of tracks, episodes, search results, or chart rows to collect per input target.

## `flattenCollectionItems` (type: `boolean`):

When enabled, outputs each track or episode inside a playlist, album, or podcast show as its own dataset row. Disable to emit one parent record with nested items.

## `enrichSearchDetails` (type: `boolean`):

Automatically fetch full metrics (track play counts, artist monthly listeners, followers, world rank, top cities, and social links) for search results.

## `includeArtistDiscography` (type: `boolean`):

Include top tracks with play counts and album/single releases inside Artist records.

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

Maximum parallel requests (1-10).

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

Optional Apify Proxy settings. Direct connection works for most runs; enable for heavy workloads.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
    }
  ],
  "uris": [],
  "searchQueries": [],
  "searchType": "tracks",
  "includeCharts": false,
  "chartType": "ALL",
  "maxItems": 25,
  "flattenCollectionItems": true,
  "enrichSearchDetails": true,
  "includeArtistDiscography": true,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
        }
    ],
    "uris": [],
    "searchQueries": []
};

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

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

```

## MCP server setup

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