# Spotify Artist Scraper (`khadinakbar/spotify-artist-scraper`) Actor

Scrape Spotify artist data — monthly listeners, followers, world rank, top cities, top tracks, and discography — by URL, ID, or artist name. HTTP-only, no API key.

- **URL**: https://apify.com/khadinakbar/spotify-artist-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, MCP servers
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 artist scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Artist Scraper

Scrape **Spotify artist data** — monthly listeners, followers, world rank, top cities, biography, verified status, top tracks, and a discography summary — from a Spotify **URL, URI, ID, or just an artist name**. HTTP-only, no login, no API key. Built for AI agents (MCP-ready) and bulk lists alike.

### What you get

One flat record per artist:

| Field | Description |
|---|---|
| `name`, `id`, `uri`, `url` | Artist identity + canonical Spotify link |
| `verified` | Whether the artist profile is verified |
| `biography` | Artist bio text (when present) |
| `monthlyListeners` | Current monthly listeners (Partner API) |
| `followers` | Total followers |
| `worldRank` | Global popularity rank (when available) |
| `topCities[]` | Top listener cities — `city`, `country`, `region`, `listeners` |
| `topTracks[]` | Top tracks — `name`, `id`, `uri`, `playcount`, `durationMs`, `explicit` |
| `discography` | `albumCount`, `singleCount`, `compilationCount`, and `latest` release |
| `externalLinks[]` | Artist's linked socials/sites |
| `avatarImage`, `headerImage` | Profile + header image URLs |
| `popularityDataAvailable`, `dataSource`, `scrapedAt` | Provenance + ISO-8601 timestamp |

### When to use it

- A&R scouts and labels tracking an artist's reach, growth, and geography
- Music marketers and playlist pluggers prioritising by monthly listeners / world rank
- Analysts building artist datasets keyed on top cities and catalog size
- AI agents that need structured Spotify artist data from a name or URL

**Not for** albums, tracks, playlists, or podcasts — use the **Spotify All-in-One Scraper** for those.

### Input

| Field | Type | Notes |
|---|---|---|
| `artists` | string[] | Artist URLs, URIs, or bare 22-char IDs |
| `artistNames` | string[] | Free-text names; resolved to the top-matching artist via search |
| `maxResults` | integer | Cap on artists returned/billed (default 50) |
| `responseFormat` | `concise` \| `detailed` | `detailed` returns the full top-track list |
| `proxyConfiguration` | object | Defaults to Apify Residential (required) |

#### Example input

```json
{
  "artists": [
    "https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg",
    "spotify:artist:06HL4z0CvFAxyc27GXpf02"
  ],
  "artistNames": ["Billie Eilish"],
  "maxResults": 50,
  "responseFormat": "concise"
}
````

#### Example output (truncated, synthetic)

```json
{
  "type": "artist",
  "id": "0TnOYISbd1XYRBk9myaseg",
  "url": "https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg",
  "name": "Example Artist",
  "verified": true,
  "monthlyListeners": 41250000,
  "followers": 9800000,
  "worldRank": 42,
  "topCities": [
    { "city": "Mexico City", "country": "MX", "region": null, "listeners": 980000 }
  ],
  "topTracks": [
    { "name": "Example Track", "id": "1abc...", "playcount": 512000000, "durationMs": 201000, "explicit": false }
  ],
  "discography": { "albumCount": 6, "singleCount": 28, "compilationCount": 1, "latest": { "name": "New Single", "type": "SINGLE", "date": "2026-05-01" } },
  "popularityDataAvailable": true,
  "dataSource": "partner",
  "scrapedAt": "2026-06-20T00:00:00.000Z"
}
```

### Pricing

Pay-per-event:

- **Actor start** — $0.00005 per run
- **Artist scraped** — $0.005 per artist record returned

A 50-artist run costs about **$0.25**. You are billed only for records actually returned.

### How it works

The actor extracts Spotify's current web-player TOTP secret and GraphQL operation hashes **at runtime**, so it self-heals when Spotify rotates them. It calls Spotify's Partner API for rich popularity data and falls back to the public embed page for baseline metadata if the token is unavailable. Apify Residential proxies are used by default because Spotify's edge (Akamai) blocks datacenter IPs.

### MCP / AI agents

This actor is MCP-ready. Exposed via Apify MCP as `apify--spotify-artist-scraper`. Give an agent an artist name or URL and it returns structured JSON it can reason over directly.

### Legal

Use this actor in compliance with Spotify's Terms of Service and applicable laws. It collects only publicly available data and performs no login or authentication. You are responsible for how you use the data. This actor is not affiliated with or endorsed by Spotify.

# Actor input Schema

## `artists` (type: `array`):

Spotify artists to scrape, each as a profile URL (https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg), a URI (spotify:artist:0TnOYISbd1XYRBk9myaseg), or a bare 22-character artist ID. Locale URL prefixes like /intl-de/ are accepted. Non-artist references (album, track, playlist, podcast) are skipped with a warning — this actor returns artists only.

## `artistNames` (type: `array`):

Artist names to look up when you do not have a URL or ID (e.g. 'Taylor Swift', 'Bad Bunny'). Each name is resolved to the top-matching Spotify artist via search, then scraped. One search request is used per name. Use the 'artists' field instead when you already have the exact URL/ID to avoid ambiguous matches.

## `maxResults` (type: `integer`):

Maximum number of artist records to return and bill for in one run. The run stops once this cap is hit. Defaults to 50. Set lower to cap cost on large input lists; one artist is billed per record at $0.005.

## `responseFormat` (type: `string`):

Controls record richness. 'concise' (default) returns the artist profile, stats, top cities, discography summary, and up to 10 top tracks — compact for AI agents. 'detailed' returns the full top-track list. It does NOT page through the full discography; both modes return discography counts plus the latest release.

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

Proxy settings. Defaults to Apify automatic (datacenter) proxy, which clears Spotify's token and Partner API and is available on every Apify account. Residential also works if you prefer it — set it here. Geo is not required; Spotify popularity data is global, so the actor uses US automatically.

## Actor input object example

```json
{
  "artists": [
    "spotify:artist:3TVXtAsR1Inumwj472S9r4"
  ],
  "artistNames": [
    "The Weeknd",
    "Dua Lipa"
  ],
  "maxResults": 50,
  "responseFormat": "concise",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "artists": [
        "https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg",
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
    ],
    "artistNames": [
        "Billie Eilish"
    ],
    "maxResults": 50,
    "responseFormat": "concise",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/spotify-artist-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 = {
    "artists": [
        "https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg",
        "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02",
    ],
    "artistNames": ["Billie Eilish"],
    "maxResults": 50,
    "responseFormat": "concise",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/spotify-artist-scraper").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 '{
  "artists": [
    "https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg",
    "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"
  ],
  "artistNames": [
    "Billie Eilish"
  ],
  "maxResults": 50,
  "responseFormat": "concise",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call khadinakbar/spotify-artist-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/spotify-artist-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Artist Scraper",
        "description": "Scrape Spotify artist data — monthly listeners, followers, world rank, top cities, top tracks, and discography — by URL, ID, or artist name. HTTP-only, no API key.",
        "version": "0.2",
        "x-build-id": "fzEI6JgVnpjKNLVZg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~spotify-artist-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-spotify-artist-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/khadinakbar~spotify-artist-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-spotify-artist-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/khadinakbar~spotify-artist-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-spotify-artist-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "artists": {
                        "title": "Spotify artist URLs / URIs / IDs",
                        "type": "array",
                        "description": "Spotify artists to scrape, each as a profile URL (https://open.spotify.com/artist/0TnOYISbd1XYRBk9myaseg), a URI (spotify:artist:0TnOYISbd1XYRBk9myaseg), or a bare 22-character artist ID. Locale URL prefixes like /intl-de/ are accepted. Non-artist references (album, track, playlist, podcast) are skipped with a warning — this actor returns artists only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "artistNames": {
                        "title": "Artist names (free-text search)",
                        "type": "array",
                        "description": "Artist names to look up when you do not have a URL or ID (e.g. 'Taylor Swift', 'Bad Bunny'). Each name is resolved to the top-matching Spotify artist via search, then scraped. One search request is used per name. Use the 'artists' field instead when you already have the exact URL/ID to avoid ambiguous matches.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max artists",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of artist records to return and bill for in one run. The run stops once this cap is hit. Defaults to 50. Set lower to cap cost on large input lists; one artist is billed per record at $0.005.",
                        "default": 50
                    },
                    "responseFormat": {
                        "title": "Response format",
                        "enum": [
                            "concise",
                            "detailed"
                        ],
                        "type": "string",
                        "description": "Controls record richness. 'concise' (default) returns the artist profile, stats, top cities, discography summary, and up to 10 top tracks — compact for AI agents. 'detailed' returns the full top-track list. It does NOT page through the full discography; both modes return discography counts plus the latest release.",
                        "default": "concise"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Defaults to Apify automatic (datacenter) proxy, which clears Spotify's token and Partner API and is available on every Apify account. Residential also works if you prefer it — set it here. Geo is not required; Spotify popularity data is global, so the actor uses US automatically.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
