Skip to content

Scrape Spotify Playlists, Tracks and Artists Through One API

Spotify pages mix JavaScript rendering, geo-dependent content and bot defenses.

OUTPUT FORMATSHTMLJSONMarkdown

A managed scraping API lets you send a track, artist or playlist URL and receive rendered HTML, structured JSON or clean Markdown without running your own headless browser fleet or proxy pool. This guide maps the request controls to the outputs they produce, shows how credit costs stack, and gives a short decision checklist for choosing an output format.

What you can collect from public Spotify pages

Public Spotify track, artist and playlist pages expose several categories of data that are useful for music research, A&R, playlist curation and trend mapping. The managed API renders the page and returns the following fields in one call: track metadata, artist info, monthly listener counts, follower counts, top tracks, related artists and playlist contents. Playlist pages additionally expose curator handles, follower counts and track ordering, which feed genre-research and discovery workflows. Artist pages expose top tracks and related artists for trend mapping. Song popularity scores and chart movement are also available for A&R and music-research decisions.

Three common Spotify scraping workflows

Most teams use a Spotify scraper for one of three tasks. The first is playlist analysis: pull a playlist's track list, curator handle, follower count and track ordering to study genre composition or discovery patterns. The second is popularity tracking: record song popularity scores, per-artist monthly listener counts and chart movement over time for A&R and music research. The third is artist insight: collect monthly listeners, top tracks and related artists to map a scene or benchmark an artist against peers. Each workflow uses the same request pattern; only the target URL and the extraction rules differ.

How the request flow works

The flow has four steps. First, create an account to receive an API key and starter credits. Second, install the SDK for your stack (Python, Node, Go, PHP, Ruby or Java) or call the API directly with cURL; each Spotify scrape becomes a single function call, with no proxy rotation or headless Chrome to manage. Third, POST or GET the Spotify URL to the API. The service renders track and artist pages on spotify.com, handles anti-bot measures and returns rendered HTML, or structured JSON when you pass extract_rules or ai_extract_rules. Fourth, add advanced parameters only when the page needs them: render_js for JavaScript, stealth_proxy for CAPTCHAs, country_code for geo-targeting and ai_extract_rules for natural-language extraction.

Request controls and what they change

The table below maps each request control to the output or behavior it affects and the credit cost it adds. Use it to estimate a per-request budget before you scale a job.

Choosing an output format

Rendered HTML is the right choice when you need to inspect the page structure or run your own selectors. Structured JSON via extract_rules is the right choice when you have stable CSS or XPath selectors and want field-named output. ai_extract_rules is the right choice when selectors are unstable or you want to describe the fields in natural language. Clean Markdown is the right choice when the next step is an LLM or a retrieval pipeline. Screenshots are the right choice when you need a visual record of the page state, for example to document a chart position at a point in time.

Worked credit example

Credit cost per request depends on the options you enable. A plain request starts at 1 credit. Enabling JavaScript rendering costs 5 credits per successful request. Premium proxies cost 10 credits without JS rendering or 25 credits with it. Stealth proxy costs 75 credits. As an illustration: if you scrape 1,000 artist pages per month with JavaScript rendering enabled and no premium or stealth proxy, the request cost is 5,000 credits. If you also need premium proxies on those requests, the cost rises to 25,000 credits. Compare that against the plan's monthly credit allowance before choosing a tier. Credits are valid for one month and do not roll over.

Reliability and scale considerations

The service handles proxy rotation to avoid IP-based blocking and uses headless browser rendering to mimic real user browsing behavior. It scales with thousands of headless browsers and rotating proxies to keep performance stable during traffic spikes. Typical response times are reported in the 1-5 second range across most sites, including JavaScript-heavy pages. Concurrency limits are set per plan rather than per target, so if Spotify throttles aggressive request patterns, space out requests or use multiple sessions.

Data handling and compliance

The service states that it does not collect or store personal data from scraped sites unless the user explicitly requests it. Before scraping any Spotify page, confirm that your use case complies with Spotify's terms and with applicable data-protection rules in your jurisdiction.

Spotify request controls, outputs and credit costs
ControlWhat it changesCredit cost
render_js=trueRuns the page in a headless browser and returns post-render HTML5 credits per successful request
country_codeRoutes the request through a residential IP in the chosen countryIncluded with plan
extract_rulesMaps CSS selectors to field names and returns parsed JSONIncluded with plan
ai_extract_rulesNatural-language extraction spec returning structured JSONIncluded with plan
premium_proxy (no JS)Premium proxy pool without JavaScript rendering10 credits per successful request
premium_proxy + render_jsPremium proxy pool with JavaScript rendering25 credits per successful request
stealth_proxyStealth proxy for CAPTCHA-heavy targets75 credits per successful request

Credit costs are the captured rules from the source page and may change; check current pricing before committing to a plan.

Frequently asked questions

How do I handle JavaScript when scraping Spotify?

Pass render_js=true on the request. The service runs the page in a real headless browser, executes the JavaScript server-side and returns the post-render HTML.

Can I scrape Spotify from a specific country?

Yes. Pass country_code on the request to route through a residential IP in that country. This is useful when content varies by geo.

What's the rate limit for scraping Spotify?

The API has concurrency limits per plan, not per-target rate limits. If Spotify throttles aggressive request patterns, space out requests or use multiple sessions.

How do I get structured JSON from Spotify?

Two routes produce parsed JSON. With extract_rules, you supply CSS selectors and map each one to a field name. With ai_extract_rules, you describe the fields you want in natural language instead of writing selectors. Either way, the response body arrives already parsed as JSON.

Which programming languages can I use to scrape Spotify?

Any. SDKs are published for Python, Node.js, Go, PHP, Ruby and Java. Plain cURL works too, so you can use whatever your stack already uses.

How much does it cost to scrape Spotify?

New accounts receive 1,000 free credits on signup with no card required. Paid plans start at $19/month for higher volume and concurrency. Credit cost per request depends on options: 5 credits for JS rendering, 25 for premium_proxy with JS, and 75 for stealth_proxy.