Spotify Scraper

Export public Spotify artists, tracks, albums, playlists, podcasts, episodes, audiobooks, images, markets, and public metrics. Direct URLs need no API key.

Data fields

FieldTypeDescription
typestringSpotify entity type.
idstringStable Spotify entity ID.
uristringCanonical spotify: URI.
urlstringCanonical public Spotify URL.
sourceUrlstringInput URL or search source that produced the row.
sourcestringPublic page or credential-backed Spotify Web API search.
namestringPublic entity name.
descriptionstring | nullPublic description or biography when available.

Input preview

startUrlsSpotify URLs or URIs
spotifyUrisSpotify URIs
searchQueriesSearch queries
searchTypesSearch result types
maxSearchResultsMaximum results per search query
marketSpotify market

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Export public Spotify artist, track, album, playlist, podcast, episode, audiobook, image, market, and public-metric metadata to structured datasets.

Direct Spotify URLs and spotify: URIs need no Spotify API key. Optional keyword search uses your Spotify app Client ID and Client Secret so it returns real catalog entities instead of a generic search-page row.

What can it do?

  • Export artists, tracks, albums, playlists, podcast shows, episodes, and audiobooks from public Spotify URLs.
  • Accept canonical and regional https://open.spotify.com/... links, including /intl-de/-style paths, plus spotify:type:id URIs.
  • Return real keyword search results across selected entity types and a chosen market when credentials are supplied.
  • Collect stable IDs and URIs, names, descriptions, artist/owner/publisher details, images, dates, durations, markets, previews, and public counts when Spotify exposes them.
  • Save RUN_SUMMARY and RUN_CHECKPOINT records with completion status, charge parity, remaining work, duplicates, and structured item errors.
  • Retry temporary network, rate-limit, and Spotify challenge responses without hiding terminal failures.

Who is it for?

  • Music and podcast researchers exporting consistent public metadata.
  • Labels, artist teams, and playlist curators monitoring public catalog pages.
  • Developers enriching internal records with stable Spotify IDs, URIs, images, markets, and dates.
  • Data teams scheduling repeatable exports to CSV, Excel, JSON, databases, or dashboards.
  • Automation builders who need explicit partial-failure diagnostics instead of silent empty runs.

Input recipes

Export mixed public Spotify pages without credentials

Example input

{
  "startUrls": [
    { "url": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02" },
    { "url": "https://open.spotify.com/track/1dGr1c8CrMLDpV6mPbImSI" },
    { "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M" },
    { "url": "https://open.spotify.com/show/6E709HRH7XaiZrMfgtNCun" }
  ],
  "spotifyUris": ["spotify:album:1NAmidJlEaVgA3MpcPFYGq"],
  "maxItems": 20
}

Search the Spotify catalog with your Spotify app credentials

{
  "searchQueries": ["indie jazz"],
  "searchTypes": ["track", "artist", "album"],
  "market": "US",
  "maxSearchResults": 10,
  "maxItems": 10,
  "clientId": "YOUR_SPOTIFY_CLIENT_ID",
  "clientSecret": "YOUR_SPOTIFY_CLIENT_SECRET"
}

What data can you collect?

Field Description
type, id, uri, url Entity type and canonical Spotify identifiers
name, description Public title, description, or artist biography
artistNames, albumName Credited artists and parent album
ownerName, publisherName Playlist owner or podcast/audiobook publisher
trackCount Visible track or episode count
followers, likes, monthlyListeners Public metrics when Spotify publishes them
durationMs, releaseDate Duration and release date at the available precision
imageUrl, previewUrl Public cover/profile image and audio preview when available
explicit, isrc, popularity Content and catalog identifiers when available
availableMarkets ISO country codes returned by the public page or credential-backed search
trackNumber, discNumber, albumType, label Additional catalog details when available
source, sourceUrl, searchQuery Provenance for direct-page and search rows
scrapedAt ISO timestamp when the record was created

Fields that do not apply to an entity remain null or an empty array. The dataset keeps the existing field names used by earlier versions and adds new fields without removing the old ones.

Example output

{
  "type": "track",
  "id": "1dGr1c8CrMLDpV6mPbImSI",
  "uri": "spotify:track:1dGr1c8CrMLDpV6mPbImSI",
  "url": "https://open.spotify.com/track/1dGr1c8CrMLDpV6mPbImSI",
  "source": "public_page",
  "name": "Lover",
  "artistNames": ["Taylor Swift"],
  "albumName": "Lover",
  "durationMs": 221306,
  "releaseDate": "2019-08-23",
  "availableMarkets": ["AR", "AU", "AT"],
  "imageUrl": "https://i.scdn.co/image/...",
  "scrapedAt": "2026-07-15T12:00:00.000Z"
}

Input settings

Setting JSON key Description
Spotify URLs startUrls Public artist, album, track, playlist, show, episode, or audiobook URLs, including regional /intl-xx/ links; no credentials required
Spotify URIs spotifyUris Typed spotify:type:id values; bare IDs are ambiguous and are not accepted
Search queries searchQueries Catalog terms; requires both Spotify credential fields
Search result types searchTypes Tracks, artists, albums, playlists, shows, episodes, or audiobooks
Results per query maxSearchResults Combined cap per query; 1–1,000
Spotify market market Two-letter market code such as US, GB, DE, or PT
Spotify Client ID clientId Spotify app credential used only for catalog search
Spotify Client Secret clientSecret Secret Spotify app credential used only for catalog search
Maximum records maxItems Global unique-row cap across direct targets and searches; 1–10,000
Proxy configuration proxyConfiguration Optional Apify Proxy settings for blocked public-page requests

Reliability and run outcomes

  • An entirely invalid input fails before paid work begins. In a mixed input, malformed entries are recorded while valid URLs and URIs continue.
  • Regional /intl-xx/ Spotify links are normalized to canonical entity URLs.
  • HTTP 429, temporary server errors, timeouts, and detected challenge pages receive bounded retries.
  • Removed or unavailable entities are reported separately from network blocks.
  • Mixed inputs preserve valid rows and record failed targets in RUN_SUMMARY with status PARTIAL.
  • A run where every requested target fails ends as FAILED; it no longer appears successful with an empty dataset.
  • A valid credential-backed search with no matches may finish as EMPTY_SOURCE with zero charged results.
  • Duplicate URLs, URIs, or search results are saved and charged once per run.
  • Larger inputs stop before the platform timeout, preserve completed rows, and record remaining work in RUN_CHECKPOINT.

Tips for better results

  • Use direct URLs for known entities; they need no Spotify developer credentials.
  • Copy the full public Spotify link or typed URI. Regional path prefixes and shared tracking parameters are removed during normalization.
  • Use a realistic two-letter market for search availability.
  • Start with a small maxItems and maxSearchResults, then scale after checking the dataset.
  • Leave proxies disabled unless logs identify a block or challenge response.
  • Schedule repeat runs and compare stable id or uri values when monitoring public metrics.

Limits and practical notes

  • The Actor exports public metadata only. It does not access listening history, private libraries, private playlists, account analytics, or private user data.
  • It does not download songs or full podcast audio. A public preview URL may be returned when Spotify exposes one.
  • Direct public pages and credential-backed search expose different field sets. Search rows often contain fewer public metrics than direct artist or entity pages.
  • A bare 22-character Spotify ID does not identify its entity type. Use a full URL or a typed spotify:type:id URI.
  • Spotify may hide, round, regionalize, remove, or rename fields; unavailable fields remain null rather than being guessed.
  • Spotify reduced the Web API search page maximum to 10 results in 2026, so larger requests are paginated.
  • Follow Spotify's developer terms and content policies, including attribution, media-use, and AI-training restrictions, when using Web API results.

API usage

Node.js

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/spotify-scraper').call({
  spotifyUris: ['spotify:track:1dGr1c8CrMLDpV6mPbImSI'],
  maxItems: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("fetch_cat/spotify-scraper").call(run_input={
    "startUrls": [{"url": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02"}],
    "maxItems": 5,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~spotify-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"startUrls":[{"url":"https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"}],"maxItems":5}'

MCP and AI-agent operation

Use the official Apify MCP server. The focused endpoint exposes only this Actor:

https://mcp.apify.com?tools=fetch_cat/spotify-scraper

Claude CLI setup:

claude mcp add --transport http apify "https://mcp.apify.com?tools=fetch_cat/spotify-scraper"

Claude Desktop configuration:

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/spotify-scraper"
    }
  }
}

Example prompts:

  • “Run fetch_cat/spotify-scraper for these public artist URLs and return the dataset link.”
  • “Check this playlist URL weekly and report whether its public metadata changed.”
  • “Run these podcast show URLs and list any item errors from RUN_SUMMARY."

Do not use Spotify content to train or ingest into machine-learning models where Spotify's policies prohibit it.

Support

If a run fails, returns unexpected zero data, or a field looks wrong, open an issue from the Actor page. Include the Apify run ID or run URL, input JSON with secrets removed, one reproducible public URL, expected output, and actual output.

Privacy and data handling

The Actor processes the inputs you provide and public Spotify records needed for the run. Results and RUN_SUMMARY are stored in your Apify run storage. Spotify credentials are used only to request a short-lived read-only catalog token for search and should never be included in support reports. Use the Actor lawfully and follow Spotify's applicable terms and content policies.

Common questions

Questions and answers reused from the canonical actor README.

Do direct URLs need a Spotify API key?

No. Public entity URLs and Spotify URIs use public page data. Only searchQueries requires your Spotify app Client ID and Client Secret.

Why does search require credentials?

Spotify's public search web page does not reliably contain real server-rendered results. Credential-backed Web API search returns actual entity records and avoids the earlier misleading generic search row.

Can it export podcast shows and episodes?

Yes. Use public /show/ and /episode/ URLs or their Spotify URIs. Removed episodes fail with an explicit unavailable-entity error.

Can it export playlist or album tracks as separate rows?

This release exports the requested playlist or album as one metadata row, including its visible item count. Full child-track expansion is deferred because it changes charging and output volume; it is not advertised as current behavior.

What if one URL fails?

Valid rows are preserved. The run finishes with PARTIAL in RUN_SUMMARY, which includes a safe error code and message for each failed input. If every target fails, the Actor run fails.