# Spotify Track Metadata Scraper (`w3crawler/spotify-track-intelligence-scraper`) Actor

Collect transparent public Spotify track metadata and provenance.

- **URL**: https://apify.com/w3crawler/spotify-track-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 track 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 Track Metadata Scraper

Collect public Spotify track metadata from anonymous rendered track pages: track identity, artist and album links, release facts, duration, visible play count, explicit status, and public preview metrics when Spotify exposes them. Audio-feature values are reported as unavailable rather than estimated or decoded from audio.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/spotify-track-intelligence-scraper) and select **Try for free**, or open the **Input** tab.
2. Add one or more Spotify track URLs or 22-character track IDs to `trackUrls`.
3. Keep `market` and the browser 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

`trackUrls` is required. All other fields are optional. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `trackUrls` | string array | Required | Not supplied | One to 25 Spotify track URLs or IDs. 1–25 items, each 1–300 characters. |
| `market` | string | Optional | `"US"` | Two-letter output context. No market-filtered API request is made. |
| `requestDelayMs` | integer | Optional | `1000` | Polite delay before each browser navigation, in milliseconds. 0–30000. |
| `timeoutSecs` | integer | Optional | `45` | Per-page timeout, in seconds. 10–90. |
| `maxResponseBytes` | integer | Optional | `3000000` | Maximum initial page response size, in bytes. 100000–5000000. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":false}` | Optional Apify Proxy configuration; direct browsing is the default. |

Full default input:

```json
{
  "market": "US",
  "requestDelayMs": 1000,
  "timeoutSecs": 45,
  "maxResponseBytes": 3000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

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

### Output

The dataset contains one `trackMetadata` row per saved track page. 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 | Always | Row discriminator, always `trackMetadata`. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |
| `trackId` | string | Always | Public Spotify track ID. |
| `name` | string | Always | Track name. |
| `spotifyUrl` | string | Always | Public Spotify track URL. |
| `description` | string | When published | Public track description when rendered. |
| `imageUrl` | string | When published | Public artwork URL when rendered. |
| `artists` | object array | Always | Linked artist records with `artistId`, `name`, and `spotifyUrl` when exposed. |
| `artistNames` | string array | Always | Artist display names. |
| `album` | string | Always | Album name. |
| `albumId` | string | Always | Public Spotify album ID. |
| `albumUrl` | string | Always | Public Spotify album URL. |
| `releaseDate` | string | Always | Release date or year displayed by Spotify. |
| `releaseYear` | integer | Always | Release year parsed from the displayed release date. |
| `durationMs` | integer | Always | Track duration in milliseconds. |
| `durationFormatted` | string | Always | Rendered duration in `minutes:seconds` form. |
| `playCount` | integer | Always | Public play count displayed for the track. |
| `explicit` | boolean | When published | Explicit marker when the page displays one. |
| `market` | string | Always | Requested market context. |
| `marketObserved` | string | Always | Observed locale or market label. |
| `marketApplied` | boolean | Always | Always `false`; no market filter is applied. |
| `publicPreviewAvailable` | boolean | Always | Whether public preview metadata was observable. |
| `previewUrl` | string | When published | Public preview URL when a lawful preview is exposed. |
| `previewMimeType` | string | When published | Preview MIME type when exposed. |
| `previewDurationMs` | integer | When published | Preview duration in milliseconds when exposed. |
| `previewSource` | string | When published | Source of the public preview metadata. |
| `previewMetricsStatus` | string | Always | Preview-metric outcome, such as `unavailable_public_preview_metadata`. |
| `audioFeaturesAvailable` | boolean | Always | Whether audio features were publicly observable. |
| `audioFeaturesNote` | string | Always | Explanation of the public audio-feature limitation. |
| `sourceUrl` | string | Always | Public track page used for the row. Observed in saved rows; not declared in the dataset schema. |

#### Full JSON output

The example below is an unchanged row saved by the 2026-10-25 run. It shows the unavailable audio-feature declaration and the shape of the `artists` array.

```json
{
  "recordId": "spotify_track_3C0nOe05EIt1390bVABLyN",
  "recordType": "trackMetadata",
  "trackId": "3C0nOe05EIt1390bVABLyN",
  "name": "On The Floor",
  "spotifyUrl": "https://open.spotify.com/track/3C0nOe05EIt1390bVABLyN",
  "artists": [
    {
      "artistId": "2DlGxzQSjYe5N6G9nkYghR",
      "name": "Jennifer Lopez",
      "spotifyUrl": "https://open.spotify.com/artist/2DlGxzQSjYe5N6G9nkYghR"
    }
  ],
  "artistNames": [
    "Jennifer Lopez"
  ],
  "album": "Love?",
  "albumId": "3sysiYphqNRQw7VKLCg1yE",
  "albumUrl": "https://open.spotify.com/album/3sysiYphqNRQw7VKLCg1yE",
  "releaseDate": "2011",
  "releaseYear": 2011,
  "durationMs": 284000,
  "durationFormatted": "4:44",
  "playCount": 1313346286,
  "market": "US",
  "marketObserved": "US",
  "marketApplied": false,
  "publicPreviewAvailable": false,
  "previewMetricsStatus": "unavailable_public_preview_metadata",
  "audioFeaturesAvailable": false,
  "audioFeaturesNote": "Public track pages expose no audio feature values; no audio was downloaded or decoded.",
  "sourceUrl": "https://open.spotify.com/track/3C0nOe05EIt1390bVABLyN",
  "scrapedAt": "2026-10-25T20:46:10.981Z"
}
```

### 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`. |
| `requestedTrackCount` | Track inputs requested. |
| `trackRecordCount` | Track rows produced. |
| `recordsStored` | Track rows saved. |
| `errorRecordCount` | Error records; diagnostics are kept out of the dataset. |
| `market` | Requested market context. |
| `marketApplied` | Whether market filtering was applied; always `false`. |
| `publicPreviewAvailableCount` | Tracks with observable public preview metadata. |
| `previewMetricsComputedCount` | Preview metrics computed. |
| `audioFeaturesAvailableCount` | Tracks with publicly observable audio features. |
| `audioFeaturesUnavailableCount` | Tracks whose public page exposed no audio features. |
| `authenticationMode` | Extraction mode, `anonymous_public_page` in the saved run. |
| `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` | Track rows were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Track rows were saved, but a later problem prevented a complete run. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | The pages completed cleanly with no usable 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",
  "requestedTrackCount": 1,
  "trackRecordCount": 1,
  "recordsStored": 1,
  "errorRecordCount": 0,
  "market": "US",
  "marketApplied": false,
  "publicPreviewAvailableCount": 0,
  "previewMetricsComputedCount": 0,
  "audioFeaturesAvailableCount": 0,
  "audioFeaturesUnavailableCount": 1,
  "authenticationMode": "anonymous_public_page",
  "startedAt": "2026-10-25T20:45:58.451Z",
  "completedAt": "2026-10-25T20:46:11.525Z",
  "durationMs": 13074,
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "failureCount": 0,
  "outputWriteFailureCount": 0
}
```

### Coverage and limitations

The Actor reads one rendered public track page per input and records only values displayed there. `playCount` is Spotify's displayed public counter at collection time, not a stream count guaranteed to match any other source. `releaseDate` may be a year, month, or full date; `releaseYear` is parsed only from what is displayed.

Public track pages in the saved run exposed no audio-feature values. The Actor does not download, decode, or analyze audio, and it does not infer tempo, key, energy, or similar features. `publicPreviewAvailable` can be `false`; preview URL, MIME type, duration, and source are present only when Spotify exposes lawful public preview metadata. `description`, `imageUrl`, and `explicit` are omitted when the page does not display them. Deleted tracks, region-restricted pages, login walls, and access challenges cannot be recovered. `market` is output context only. `sourceUrl` is present in saved rows even though the dataset schema does not declare it.

### Usage and support

Compute and storage charges vary with the number of track pages, browser duration, page size, and output rows. Each track requires its own browser visit, so start with one or a few URLs and inspect the rows before scaling. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/spotify-track-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-track-intelligence-scraper/changelog.md

# Actor input Schema

## `trackUrls` (type: `array`):

One to 25 Spotify track URLs or IDs.

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

Two-letter output context; no market API request is made.

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

Polite delay before each browser navigation.

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

Per-page timeout seconds.

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

Maximum initial page response size.

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

Optional Apify Proxy configuration; direct browsing is default.

## Actor input object example

```json
{
  "trackUrls": [
    "https://open.spotify.com/track/3RiPr603aXAoi4GHyXx0uy"
  ],
  "market": "US",
  "requestDelayMs": 1000,
  "timeoutSecs": 45,
  "maxResponseBytes": 3000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

Run status and counters stored by the Actor.

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

No description

## `compatibilitySummary` (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 = {
    "trackUrls": [
        "https://open.spotify.com/track/3RiPr603aXAoi4GHyXx0uy"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/spotify-track-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 = { "trackUrls": ["https://open.spotify.com/track/3RiPr603aXAoi4GHyXx0uy"] }

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

```

## MCP server setup

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