Tony Wang5 min readHow to Scrape Spotify in 2026 (API & Python)
Scrape Spotify in 2026 — DIY with the OAuth Web API (and its 2024 lockdown), no-code, or a structured API for public catalog, search, and playlists.
The fastest way to scrape Spotify in 2026 is to call a structured API that returns normalized JSON — public catalog search, tracks, artists, albums, playlists, and discovery — instead of wrangling OAuth and Spotify's increasingly locked-down Web API. You can DIY with the official API, but it needs OAuth (and a Premium-backed app), and it removed several of the endpoints people most relied on. This guide covers all three approaches, what each returns, where each breaks, and the legal basics.
Why scrape Spotify?
Public Spotify catalog data powers a category of music research:
- Catalog & playlist intelligence — track which playlists feature which tracks, and how playlists change.
- Artist & label monitoring — follow a discography, related artists, and placements over time.
- A&R & trend research — surface rising artists and adjacency via discovery endpoints.
- Recommendation research — study how tracks and albums relate across the catalog.
Is it legal to scrape Spotify?
Option 1: DIY with the official API (and why it's limited)
The official route is the OAuth Web API via spotipy:
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id="...", client_secret="..."))
results = sp.search(q="daft punk", type="artist")
It works for basic lookups and then runs into walls:
- OAuth + Premium gate. Every call needs an OAuth token (Client ID/Secret), and Development Mode apps require the app owner to keep an active Spotify Premium subscription — if it lapses, the app stops working.
- The November 2024 lockdown. On Nov 27, 2024 Spotify deprecated
audio-features,audio-analysis,recommendations,related-artists, andfeatured-playlists; new apps get403and there is still no replacement — so a lot of discovery and analysis tooling simply can't be built on the official API anymore. - Tightening quotas. The February 2026 Web API changes cap Development Mode apps to roughly 25 users without an Extended Quota Mode approval, and rate limits are computed over a rolling 30-second window.
- Scraping the app is harder still. Going around the API means rendering Spotify's React single-page app and reverse-engineering its internal GraphQL — proxies, headless browsers, and breakage whenever the internal API shifts.
Option 2: No-code tools
Visual extractors and marketplace "Spotify scraper" actors export CSV/JSON and suit one-off pulls, but they're awkward in an in-product pipeline and break on the same app churn.
Option 3: A structured Spotify API
For repeatable workflows over public data, a Spotify scraping API returns normalized JSON with no OAuth to manage. Search the catalog:
curl "https://api.crawlora.net/api/v1/spotify/search?q=daft%20punk" \
-H "x-api-key: $CRAWLORA_API_KEY"
Then chain search → detail → discovery in Python:
import requests
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1/spotify"
# search returns Spotify uris (spotify:track:..., spotify:artist:...)
hits = requests.get(f"{base}/search", headers=h, params={"q": "daft punk"}).json()["data"]
# address detail endpoints by uri or id
artist = requests.get(f"{base}/artist", headers=h, params={"id": "0TnOYISbd1XYRBk9myaseg"}).json()["data"]
albums = requests.get(f"{base}/artist/albums", headers=h, params={"id": "0TnOYISbd1XYRBk9myaseg"}).json()["data"]
related = requests.get(f"{base}/artist/related", headers=h, params={"id": "0TnOYISbd1XYRBk9myaseg"}).json()["data"]
A search response is normalized JSON (fields are illustrative — check the docs):
{
"code": 200,
"msg": "OK",
"data": {
"searchTerm": "daft punk",
"offset": 0,
"limit": 10,
"topResults": [
{ "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi", "type": "Artist", "title": "Daft Punk", "externalUrl": "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi" }
],
"artists": [
{ "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi", "type": "Artist", "title": "Daft Punk", "externalUrl": "https://open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi" }
]
}
}
Address tracks, artists, albums, and playlists by their uri (e.g. spotify:artist:…) or id. The discovery endpoints — artist/related, track/recommended, and track/similar-albums — notably cover the relational data the official API removed in 2024. Search and listing endpoints paginate via offset/limit. Store one row per item and re-pull on a schedule.
What you can collect
Public catalog metadata: search across tracks, artists, albums, playlists, shows/episodes, and audiobooks; artist detail and discography; album tracks; playlist contents; and discovery (related artists, recommended tracks, similar albums) — each carrying the Spotify uri and its open.spotify.com URL. Public metadata only.
Limitations and common challenges
- Public metadata, not audio features. This returns public catalog and discovery data, not the BPM/key/danceability audio-features Spotify deprecated in 2024 — for those you'd run an open tool like Essentia on audio you have rights to.
- No private or user data. Listening history, library, and account data sit behind a user login and are off-limits; collect public catalog only.
- uri vs id. Search returns Spotify uris; the detail endpoints take a
uriorid, so keep the id from search to address them. - The catalog shifts. Playlists and discographies change, so re-pull on a schedule rather than trusting a one-time snapshot.
Where this gets used
- Music catalog & playlist intelligence — track placements and catalog changes. See the music catalog & playlist intelligence use case.
- Artist & label monitoring — follow discography, related artists, and placements.
- Trend & A&R research — surface rising artists via discovery endpoints.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
Test the search endpoint in the Playground, check the schema in the API docs, and review pricing. See also how to scrape Apple Podcasts for the rest of the audio stack, and how to scrape YouTube — the other place the same tracks and artists get played, and a useful second read on an artist's reach. For the broader toolkit, how to choose a web scraping API, and is web scraping legal.
Part of our how-to-scrape guide series — every platform we cover, in one index.
Frequently asked questions
Does Spotify have an official API?
Yes, the Web API, but it requires OAuth and has been locking down. On November 27, 2024 Spotify deprecated audio-features, audio-analysis, recommendations, related-artists, and featured-playlists (new apps get 403 with no replacement), and Development Mode apps require the owner's Spotify Premium and, since February 2026, cap to ~25 users without a quota extension.
Can I scrape Spotify without OAuth?
For public catalog data, yes — a structured API returns search, tracks, artists, albums, playlists, and discovery as normalized JSON without OAuth tokens or a Premium-backed app. Private user data (listening history, library) stays off-limits behind a login.
Can I get audio features like BPM and key?
Not from Spotify anymore — it deprecated the audio-features and audio-analysis endpoints in 2024 with no replacement. A catalog scraper returns public metadata and discovery, not those numbers; to derive BPM/key you'd run an open tool like Essentia on audio you have rights to.
How do I address a track, artist, or playlist?
Everything uses a Spotify uri (e.g. spotify:artist:...) or id. Search returns uris in its results; pass the uri or id to /spotify/track, /spotify/artist, /spotify/album, or /spotify/playlist. Listing endpoints paginate via offset and limit.
What Spotify data can I collect?
Public catalog metadata: search across tracks, artists, albums, playlists, shows/episodes, and audiobooks; artist detail and discography; album tracks; playlist contents; and discovery (related artists, recommended tracks, similar albums) — each with its Spotify uri and open.spotify.com URL.
Is scraping Spotify legal?
Collecting public catalog metadata is generally lower-risk public-web scraping, but Spotify's terms restrict automated access, private/user data is off-limits, and you must never circumvent DRM or download audio. Use public metadata only and review the terms. Not legal advice.
How often can I refresh?
Playlists and discographies change, so re-pull on a schedule within your plan and responsible-use limits rather than polling continuously.