# Spotify Extended Scraper (`musicae/spotify-extended-scraper`) Actor

Scrape & Search Spotify Tracks, Artists, Genres & Albums with 🎛️ Audio Features. ✅ 99% success rate. ⚡ Results in seconds. 📦 Clean output.

- **URL**: https://apify.com/musicae/spotify-extended-scraper.md
- **Developed by:** [Musicae](https://apify.com/musicae) (community)
- **Categories:** Social media, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 173 total users, 24 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.99 / 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.

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

**The most complete Spotify scraper on Apify.** Extract Tracks, Artists, Genres & Albums with full metadata, rich relational data, and optional audio features, all in one run. Structured JSON, ready to export.

No Spotify developer account needed. No API key required. Just paste URLs, IDs, or search keywords and hit **Run**.

***

### ⚡ Why this scraper?

Most Spotify scrapers give you basic metadata. This one goes further.

- 🎯 **3-in-1**: Scrape Tracks, Artists, and Albums in a single run. No need to chain multiple actors or run separate jobs.
- 🔀 **Flexible input**: Pass Spotify URLs, raw IDs, or plain search keywords. Mix and match freely in the same run.
- 🔗 **Rich relational data**: Each Track comes with its full Artist profiles and Album details. Each Artist includes their Top Tracks and discography (up to 50 releases for artists resolved live outside our catalog).
- 🎛️ **Audio Features included**: Tempo, energy, danceability, key, and 8 more audio attributes per track (optional).
- 📦 **Clean, structured output**: Flat JSON ready for spreadsheets, databases, or downstream pipelines. No post-processing needed.

***

### 🏆 How it compares

| Feature | This scraper | Spotify Web API | Other scrapers |
|---|:---:|:---:|:---:|
| 🎵 Track metadata | ✅ | ✅ | ✅ |
| 🎤 Artist metadata | ✅ | ✅ | ⚠️ Partial |
| 📀 Album metadata | ✅ | ✅ | ⚠️ Partial |
| 🎛️ Audio Features | ✅ | ❌ Deprecated | ❌ |
| 🔍 Search by keyword | ✅ | ✅ | ❌ Most don't |
| 🔑 API key required | ❌ None | ✅ Required | ❌ None |
| 🧩 All entities in one run | ✅ | ❌ Separate calls | ❌ Separate actors |
| 📁 Individual JSON files | ✅ | ❌ | ❌ |

***

### 📊 What data can you extract?

| Category | Data points |
|---|---|
| 🎵 **Tracks** | Name, ID, popularity, duration, ISRC, explicit flag, disc/track number, preview URL, cover art |
| 🎤 **Artists** | Name, ID, popularity, followers, genres, profile image |
| 📀 **Albums** | Name, ID, type (album/single/compilation), release date, label, UPC, total tracks, copyright, cover art |
| 🎛️ **Audio Features** | Tempo, key, mode, time signature, energy, danceability, valence, acousticness, instrumentalness, speechiness, liveness, loudness |
| 🌍 **Markets** | Countries where content is available (ISO 3166-1 alpha-2 codes) |

#### 🎵 Scraping a Track

You get the track's own metadata **plus** its credited artists (with full profiles), its parent album, and audio features. One input, four layers of data.

#### 🎤 Scraping an Artist

You get the Artist's profile, their **top 10 most popular tracks**, and their **discography** (albums, singles, compilations — up to 50 releases for artists resolved live outside our catalog). Perfect for building rich artist profiles.

#### 📀 Scraping an Album

You get the Album's metadata, its **full tracklist** with durations and disc numbers, and all **credited artists** with their profiles.

***

### 🚀 How to use

1. **Choose your targets**: Enter Spotify URLs, IDs, or keywords in the Tracks, Artists, or Albums fields. You can use all three at once.
2. **Toggle options**: Enable or disable artists, albums, audio features, or available markets per entity type.
3. **Run**: Click Start and get structured results in seconds.

#### ⚙️ Include options

Fine-tune exactly what data you get back. Each entity type has its own set of toggles:

| Option | Applies to | Default | Description |
|---|---|:---:|---|
| 🎤 **Include Artists** | Tracks, Albums | ✅ On | Full artist profiles (name, genres, popularity, followers) for each credited artist |
| 📀 **Include Album** | Tracks | ✅ On | Parent album metadata (name, type, release date, label, cover art) |
| 🎛️ **Include Audio Features** | Tracks | ✅ On | 12 audio attributes per track (tempo, energy, danceability, key, valence, and more) |
| 🎵 **Include Top Tracks** | Artists | ✅ On | Up to 10 most popular tracks for each artist |
| 📀 **Include Albums** | Artists | ✅ On | Discography (albums, singles, compilations — up to 50 releases for artists resolved live outside our catalog) |
| 🎵 **Include Tracks** | Albums | ✅ On | Complete tracklist with durations and disc numbers |
| 🌍 **Include Available Markets** | All | ⬜ Off | Comma-separated list of countries where content is available (ISO 3166-1 codes) |
| 🔢 **Max results per keyword** | Search | `10` | Cap the number of results returned per search keyword |

All options are independent, so you only pay for and receive the data you actually need.

#### Input examples

You can mix input types freely:

```
https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV
1NeLwFETswx8Fzxl2AFl91
One More Time
```

- 🔗 **URL**: Any `open.spotify.com` link (track, artist, or album)
- 🆔 **ID**: The 22-character Spotify ID (e.g. `1NeLwFETswx8Fzxl2AFl91`)
- 🔍 **Keyword**: A search term returning up to 50 results (configurable)

***

### 📤 Output

Each result is a JSON object with all requested data nested inside. Results are pushed to the **dataset** (browse, export, or query via API) and also saved as **individual JSON files** in the key-value store, one per entity (e.g. `track_0DiWol3AO6WpXZgp0goxAV.json`).

```json
{
    "name": "One More Time",
    "type": "track",
    "url": "https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV",
    "image": "https://i.scdn.co/image/ab67616d0000b273...",
    "success": true,
    "tracks": [
        {
            "track_name": "One More Time",
            "track_id": "0DiWol3AO6WpXZgp0goxAV",
            "track_popularity": 80,
            "track_duration_ms": 320357,
            "track_explicit": false,
            "track_isrc": "GBDUW0000053"
        }
    ],
    "artists": [
        {
            "artist_name": "Daft Punk",
            "artist_id": "4tZwfgrHOc3mvqYlEYSvVi",
            "artist_popularity": 82,
            "artist_followers": 10553313,
            "artist_genres": ["french house", "electronic", "electro"]
        }
    ],
    "albums": [
        {
            "album_name": "Discovery",
            "album_id": "2noRn2Aes5aoNVsU6iWThc",
            "album_type": "album",
            "album_release_date": "2001-03-12",
            "album_label": "Daft Life Ltd./ADA France"
        }
    ],
    "audio_features": [
        {
            "track_tempo": 122.746,
            "track_key": 2,
            "track_energy": 0.697,
            "track_danceability": 0.613,
            "track_valence": 0.476,
            "track_acousticness": 0.0194
        }
    ]
}
```

Available as **JSON**, **CSV**, **Excel**, or via the **Apify API** and **dataset exports**.

***

### 🎛️ Audio Features

Since Spotify removed public access to their Audio Features endpoint in November 2024, most tools and scrapers can no longer retrieve this data. **This scraper can.**

For every Track, you get up to 12 audio attributes:

| Attribute | Description |
|---|---|
| **Tempo** | BPM (beats per minute) |
| **Key** | Musical key (0 = C, 1 = C#/Db, ..., 11 = B) |
| **Mode** | Major (1) or Minor (0) |
| **Time Signature** | Time signature (e.g. 3/4, 4/4) |
| **Energy** | Intensity and activity (0.0 to 1.0) |
| **Danceability** | How suitable for dancing (0.0 to 1.0) |
| **Valence** | Musical positivity / happiness (0.0 to 1.0) |
| **Acousticness** | Confidence the track is acoustic (0.0 to 1.0) |
| **Instrumentalness** | Likelihood of no vocals (0.0 to 1.0) |
| **Speechiness** | Presence of spoken words (0.0 to 1.0) |
| **Liveness** | Probability of live recording (0.0 to 1.0) |
| **Loudness** | Overall loudness in decibels (dB) |

Audio features are enabled by default and charged as a separate pay-per-event item (1 event per Track). You can disable them in the input settings if you only need basic metadata.

***

### 💡 Use cases

- 📈 **Music analytics**: Track popularity trends, compare audio profiles across genres, analyze release patterns at scale
- 🎶 **Playlist research**: Understand what makes playlists work by analyzing the audio features and metadata of their tracks
- 📊 **Market research**: Monitor artist growth, follower counts, and genre movements over time with scheduled runs
- 📰 **Data journalism**: Build datasets for stories about music trends, regional availability, and label activity
- 🎓 **Academic research**: Collect structured music data for musicology, computational analysis, or cultural studies
- 🔭 **A\&R / Talent scouting**: Discover emerging artists by analyzing popularity trajectories and genre positioning

***

### ❓ FAQ

**Do I need a Spotify account or API key?**
No. No developer account, no token, no setup. Just paste your input and **Run**.

**What can I scrape?**
Spotify tracks, artists, and albums, by URL, ID, or search keyword. Mix all of them in a single run.

**Spotify deprecated audio features, can I still get them?**
Yes. This scraper still returns the full audio-feature set (tempo, key, energy, danceability, valence, acousticness and more) for every track.

**What happens if the source is temporarily unavailable?**
Targets are scraped in chunks. A temporary upstream failure is retried once; if it persists, that chunk is flagged in the log and the run continues with the remaining targets, so results may be partial rather than lost. If nothing at all could be scraped, the run fails instead of reporting an empty success — re-running a few minutes later normally works.

**How many results does a keyword return?**
Up to your "Max results per keyword" setting (default 10, up to 50). URL and ID inputs always return exactly one result each.

**What metadata do I get?**
Names, IDs, popularity, followers, genres, release dates, labels, cover art, available markets and more, for tracks, artists, and albums.

**What formats can I export?**
JSON, CSV, Excel, or via the Apify API and dataset exports.

**Are the results consistent?**
Yes. The same input always returns the same data, and results come back in seconds.

***

### 🔌 Integrations

Connect results to your existing workflow:

- 📗 **Google Sheets**: Auto-export results to a spreadsheet
- 🪝 **Webhooks**: Trigger downstream actions when a run completes
- ⚡ **Zapier / Make**: Plug into 1000+ apps
- 🛠️ **API**: Fetch results programmatically from any language
- 🔄 **Scheduled runs**: Monitor changes over time with recurring scrapes

# Actor input Schema

## `tracks` (type: `array`):

One entry per line. Accepts Spotify track URLs (e.g. open.spotify.com/track/...), track IDs, or search keywords to find tracks.

## `tracksIncludeArtists` (type: `boolean`):

Include the full list of artists credited on each track (name, ID, genres, popularity, followers).

## `tracksIncludeAlbum` (type: `boolean`):

Include album metadata for each track: name, type, release date, total tracks, and cover art URLs.

## `tracksIncludeAudioFeatures` (type: `boolean`):

Include audio analysis for each track: tempo (BPM), key, energy, danceability, valence, acousticness, and more. Costs 1 additional Spotify request per track.

## `tracksIncludeAvailableMarkets` (type: `boolean`):

Include the list of countries where the track is available (ISO 3166-1 alpha-2 codes). Disabled by default as it significantly increases output size.

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

One entry per line. Accepts Spotify artist URLs (e.g. open.spotify.com/artist/...), artist IDs, or search keywords to find artists.

## `artistsIncludeTopTracks` (type: `boolean`):

Include each artist's most popular tracks on Spotify (up to 10 per artist).

## `artistsIncludeAlbums` (type: `boolean`):

Include the discography for each artist: albums, singles, and compilations (up to 50 releases for artists resolved live outside our catalog).

## `artistsIncludeAvailableMarkets` (type: `boolean`):

Include the list of countries where each artist's content is available (ISO 3166-1 alpha-2 codes). Disabled by default as it significantly increases output size.

## `albums` (type: `array`):

One entry per line. Accepts Spotify album URLs (e.g. open.spotify.com/album/...), album IDs, or search keywords to find albums.

## `albumsIncludeTracks` (type: `boolean`):

Include the full tracklist for each album with track names, durations, and disc numbers.

## `albumsIncludeArtists` (type: `boolean`):

Include the full list of artists credited on each album (name, ID, genres, popularity, followers).

## `albumsIncludeAvailableMarkets` (type: `boolean`):

Include the list of countries where the album is available (ISO 3166-1 alpha-2 codes). Disabled by default as it significantly increases output size.

## `searchKeywordLimit` (type: `integer`):

Cap the number of results returned per search keyword. Only applies when using keywords (URL and ID inputs always return one result each).

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

Select proxies to be used by the scraper. Apify Proxy is enabled by default.

## Actor input object example

```json
{
  "tracks": [
    "https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV",
    "49X0LAl6faAusYq02PRAY6",
    "Music Sounds Better With You"
  ],
  "tracksIncludeArtists": true,
  "tracksIncludeAlbum": true,
  "tracksIncludeAudioFeatures": true,
  "tracksIncludeAvailableMarkets": false,
  "artists": [
    "https://open.spotify.com/artist/0L8ExT028jH3ddEcZwqJJ5",
    "4Z8W4fKeB5YxbusRsdQVPb",
    "System Of A Down"
  ],
  "artistsIncludeTopTracks": false,
  "artistsIncludeAlbums": false,
  "artistsIncludeAvailableMarkets": false,
  "albums": [
    "https://open.spotify.com/album/2ANVost0y2y52ema1E9xAZ",
    "25WE9xmZIYadg5lhdgscTJ",
    "The Dark Side Of The Moon"
  ],
  "albumsIncludeTracks": true,
  "albumsIncludeArtists": true,
  "albumsIncludeAvailableMarkets": false,
  "searchKeywordLimit": 3,
  "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 = {
    "tracks": [
        "https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV",
        "49X0LAl6faAusYq02PRAY6",
        "Music Sounds Better With You"
    ],
    "tracksIncludeArtists": true,
    "tracksIncludeAlbum": true,
    "tracksIncludeAudioFeatures": true,
    "tracksIncludeAvailableMarkets": false,
    "artists": [
        "https://open.spotify.com/artist/0L8ExT028jH3ddEcZwqJJ5",
        "4Z8W4fKeB5YxbusRsdQVPb",
        "System Of A Down"
    ],
    "artistsIncludeTopTracks": false,
    "artistsIncludeAlbums": false,
    "artistsIncludeAvailableMarkets": false,
    "albums": [
        "https://open.spotify.com/album/2ANVost0y2y52ema1E9xAZ",
        "25WE9xmZIYadg5lhdgscTJ",
        "The Dark Side Of The Moon"
    ],
    "albumsIncludeTracks": true,
    "albumsIncludeArtists": true,
    "albumsIncludeAvailableMarkets": false,
    "searchKeywordLimit": 3,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("musicae/spotify-extended-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 = {
    "tracks": [
        "https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV",
        "49X0LAl6faAusYq02PRAY6",
        "Music Sounds Better With You",
    ],
    "tracksIncludeArtists": True,
    "tracksIncludeAlbum": True,
    "tracksIncludeAudioFeatures": True,
    "tracksIncludeAvailableMarkets": False,
    "artists": [
        "https://open.spotify.com/artist/0L8ExT028jH3ddEcZwqJJ5",
        "4Z8W4fKeB5YxbusRsdQVPb",
        "System Of A Down",
    ],
    "artistsIncludeTopTracks": False,
    "artistsIncludeAlbums": False,
    "artistsIncludeAvailableMarkets": False,
    "albums": [
        "https://open.spotify.com/album/2ANVost0y2y52ema1E9xAZ",
        "25WE9xmZIYadg5lhdgscTJ",
        "The Dark Side Of The Moon",
    ],
    "albumsIncludeTracks": True,
    "albumsIncludeArtists": True,
    "albumsIncludeAvailableMarkets": False,
    "searchKeywordLimit": 3,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("musicae/spotify-extended-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 '{
  "tracks": [
    "https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV",
    "49X0LAl6faAusYq02PRAY6",
    "Music Sounds Better With You"
  ],
  "tracksIncludeArtists": true,
  "tracksIncludeAlbum": true,
  "tracksIncludeAudioFeatures": true,
  "tracksIncludeAvailableMarkets": false,
  "artists": [
    "https://open.spotify.com/artist/0L8ExT028jH3ddEcZwqJJ5",
    "4Z8W4fKeB5YxbusRsdQVPb",
    "System Of A Down"
  ],
  "artistsIncludeTopTracks": false,
  "artistsIncludeAlbums": false,
  "artistsIncludeAvailableMarkets": false,
  "albums": [
    "https://open.spotify.com/album/2ANVost0y2y52ema1E9xAZ",
    "25WE9xmZIYadg5lhdgscTJ",
    "The Dark Side Of The Moon"
  ],
  "albumsIncludeTracks": true,
  "albumsIncludeArtists": true,
  "albumsIncludeAvailableMarkets": false,
  "searchKeywordLimit": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call musicae/spotify-extended-scraper --silent --output-dataset

```

## MCP server setup

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