Your cart is currently empty!
How to Scrape Bandcamp Artist Pages and Sales Data (2026)
Bandcamp has a surprisingly accessible HTML structure for scrapers — if you know where the look. here’s the article:
—
Bandcamp is one of the few music platforms where artist revenue, fan purchase history, and track pricing are visible in the page source without an API key. if you need to scrape Bandcamp artist pages, album listings, or fan activity data at scale, the setup is straightforward — but there are a handful of edge cases that will break naive scrapers fast.
What Data Bandcamp Exposes (and Where It Lives)
Bandcamp embeds a JSON blob directly in every artist and album page inside a attribute or a TralbumData JavaScript variable. this is the motherlode for album scraping: it contains track titles, pricing, download counts, credits, tags, and -- on paid releases -- the "name your price" floor.
the artist root page (bandname.bandcamp.com) exposes a paginated discography grid with album slugs, artwork URLs, and release dates. fan profiles (bandcamp.com/fan_id) are HTML-only with no embedded JSON, so you are working with DOM parsing there.
key data points available per album page:
- track list with durations and play counts
- "sold" count (visible on merch items, not digital tracks)
- tags and genre labels
- "pay what you want" minimum price
- release date and label credit
- embedded embed code (useful for detecting cross-platform licensing)
for digital track sales counts, Bandcamp does not expose a raw number on the page, but the "purchases" field is sometimes visible in TralbumData.packages for merch SKUs. pure digital track purchases are not surfaced publicly.
Parsing the TralbumData Blob
the fastest approach is to pull the raw JSON without rendering JavaScript. Bandcamp's album pages are server-rendered, so a plain HTTP GET with a browser-like User-Agent header is enough for most pages.
import httpx
import json
import re
def fetch_album_data(url: str) -> dict:
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"}
r = httpx.get(url, headers=headers, follow_redirects=True, timeout=15)
r.raise_for_status()
match = re.search(r'data-tralbum="([^"]+)"', r.text)
if not match:
# fallback: older pages embed as JS variable
match = re.search(r'var TralbumData = ({.+?});', r.text, re.DOTALL)
if match:
return json.loads(match.group(1))
raise ValueError("TralbumData not found")
return json.loads(match.group(1).replace(""", '"'))
the data-tralbum attribute uses HTML entity encoding (" for quotes), so you need to unescape before parsing. the fallback regex handles older Bandcamp artist templates that still use the inline JS variable format -- roughly 15-20% of pages as of early 2026.
Scraping Artist Discographies at Scale
a single artist page gives you a paginated grid. Bandcamp uses a page_url query param (?page=2) for discographies with more than 18 releases. iterate until you get an empty grid or a 404.
numbered steps for a full discography crawl:
- fetch
https://{artist}.bandcamp.com/music-- this is the canonical discography URL - parse all
elements from the grid for album slugs - check for a "next page" link (
) and follow if present - for each slug, fetch the album page and extract
TralbumData - store raw JSON per album, normalize later
rate limits are soft. Bandcamp does not publish a crawl rate, but in testing, 1 request per 2 seconds with rotating residential IPs stays under the radar reliably. going faster than 1 req/sec from a single IP triggers temporary 429s (usually a 10-minute block).
if you are building a broader music data pipeline, the approach is similar to what you would use for How to Scrape SoundCloud Artist + Track Data (2026) -- server-rendered HTML with embedded JSON means you rarely need a headless browser.
Anti-Bot Considerations and Proxy Strategy
Bandcamp uses Cloudflare but with a lighter configuration than most e-commerce sites. standard Cloudflare Bot Management is active, but JavaScript challenge pages are rare on public artist pages. the main triggers are:
- high request frequency from a single IP
- datacenter IP ranges (AWS, GCP, DigitalOcean all get challenged regularly)
- missing or inconsistent
RefererandAccept-Languageheaders
residential proxies clear the IP-type check cleanly. mobile proxies are overkill for Bandcamp specifically -- save those for platforms with heavier fingerprinting. for a comparison of proxy types and when each is worth the cost:
| proxy type | Bandcamp success rate | cost/GB | best for |
|---|---|---|---|
| datacenter | ~60% (Cloudflare blocks) | $0.50-1 | low-volume, fast |
| residential | ~95% | $3-8 | standard scraping |
| mobile | ~99% | $15-25 | heavy JS challenges |
| ISP (static res.) | ~92% | $2-5 | consistent sessions |
for reference, this same proxy tier logic applies when you want to scrape Apple Music Charts and Playlists (2026) -- Apple's CDN is more aggressive than Bandcamp's, so mobile proxies pay off there.
Fan Activity and "Sales" Data: What's Actually Gettable
this is where expectations need calibrating. Bandcamp's public "sales" data is limited to:
- merch sold counts -- visible on physical product pages in the
packagesarray - "recent purchases" feed -- the social feed at
bandcamp.com(logged-in only, not scrapeable without a session) - fan collections -- public fan profiles show owned albums if the fan hasn't hidden their collection
the purchases feed requires an authenticated session cookie (client_id + identity cookie pair). you can maintain a session by logging in via Playwright and exporting cookies, then injecting them into httpx for subsequent requests. session duration is typically 30 days before Bandcamp prompts for re-auth.
for cross-platform artist tracking, pairing Bandcamp data with Last.fm listening data and artist metadata gives a more complete picture of organic reach vs. direct sales. last.fm's scrobble counts are public and proxy-free; Bandcamp's data requires slightly more setup.
if your goal is a music market intelligence product or label analytics tool, Spotify public data scraping is worth combining as a popularity signal layer -- Spotify's follower and stream counts index well against Bandcamp's direct-sales numbers for indie artists.
Storage and Normalization
raw TralbumData blobs vary across Bandcamp's page templates. normalize to a flat schema before analysis:
- deduplicate by
album_id(present in the blob asid) - store
tagsas an array -- Bandcamp allows up to 10 tags per release - handle
nullonminimum_pricefor free releases release_dateis a Unix timestamp, not ISO 8601
a PostgreSQL JSONB column works well for the raw blob alongside a normalized albums table. if you are building similar pipelines for local business data, the same ETL pattern applies to structured-but-inconsistent sources like Yellow Pages business data where field presence varies by listing type.
Bottom line
for most use cases -- label research, genre trend tracking, or artist benchmarking -- plain httpx with residential proxies and the TralbumData regex gets you 90% of what you need without a headless browser. authenticated session scraping is the only path to purchase activity, and it adds operational overhead that only makes sense at scale. DRT covers this class of media data pipelines regularly -- if you are building something more complex, the proxy and infrastructure patterns here generalize across the music platform stack.
Leave a Reply