Bandcamp Scraper: Albums, Artists & Prices

How to scrape Bandcamp: a live-tested Bandcamp scraper guide covering album JSON-LD, prices, ISRCs, discography crawls, and the challenge wall.

MMotherlode Lab9 min read
Magpie title card: Bandcamp Scraper: Albums, Artists & Prices

Bandcamp is two sites to a scraper. Artist subdomains like tycho.bandcamp.com hand over a complete machine-readable album record: title, artist, label, all 15 tracks, the price in USD. The discovery half on www.bandcamp.com (tag grids, search, charts) sits behind a Fastly bot challenge that returns a 3 KB stub to plain HTTP clients. I ran every command in this guide on 2026-10-17 from a home connection in France, and a bandcamp scraper that knows which half it is hitting finishes in seconds.

Ground rules first. Bandcamp’s robots.txt allows album, track, and artist pages for generic crawlers, disallows /search, /api/, /stream, and /cart, and blocks GPTBot, ClaudeBot, CCBot, Google-Extended, Amazonbot, and Diffbot outright. The Terms of Use (effective May 7, 2026) license site content for personal, non-commercial use, state that artists keep 80-85% of what fans spend, and promise artists their music will not train generative models. Scrape metadata, credit sources, buy the audio. Not legal advice.

What a Bandcamp scraper gets from each page type

Page type Example What a fetch gets Price data?
Album page tycho.bandcamp.com/album/epoch-deluxe-version Server-rendered HTML + full JSON-LD MusicAlbum + liner notes Yes, offers.price + currency
Track page tycho.bandcamp.com/track/glider-2 JSON-LD MusicRecording with ISRC, album back-link No, price lives on the album
Artist home, /music tycho.bandcamp.com/music Renders in a browser, but cleans under 200 words, so quality gates block it No
Tag, search, charts bandcamp.com/tag/ambient, /search Fastly challenge stub (static and rendered); /search also robots-disallowed No

The split matters because the album pages are where all the money data is, and they are the least protected pages on the site.

One command, full album record

Magpie is a local Go CLI (AGPL-3.0-or-later, or a commercial licence), and its default fetch passed Bandcamp’s challenge where curl failed. One album page took 4.0 seconds and returned clean markdown of the liner notes plus a JSON-LD sidecar:

{
  "structured_data": {
    "@type": "MusicAlbum",
    "name": "Epoch (Deluxe Version)",
    "byArtist": { "name": "Tycho", "@id": "https://tycho.bandcamp.com" },
    "publisher": { "name": "Ghostly International" },
    "datePublished": "15 Feb 2019",
    "numTracks": 15,
    "albumRelease": [{
      "offers": {
        "price": 12.0,
        "priceCurrency": "USD",
        "availability": "OnlineOnly",
        "additionalProperty": [
          { "name": "is_set_price", "value": 1 }
        ]
      },
      "identifier": "804297827940",
      "image": ["https://f4.bcbits.com/img/a1048898312_10.jpg"]
    }]
  }
}

(Abridged; magpie scrape https://tycho.bandcamp.com/album/epoch-deluxe-version, 2026-10-17.)

That one record covers most “scrape Bandcamp” asks: album title, artist, label, release date, track count, price, currency, artwork URL, and the catalog identifier. This is the same embedded schema that a dedicated JSON-LD extraction setup reads, except Bandcamp already publishes it in clean form. The is_set_price flag tells you the price is fixed; its absence is how the page marks name-your-price releases.

To flatten it into rows for a spreadsheet, walk the sidecar with Python (the long version of this pattern lives in the Python web scraping guide):

import json, sys

rec = json.load(open(sys.argv[1]))
sd = rec["structured_data"]
rel = sd["albumRelease"][0]
off = rel["offers"]
props = {p["name"]: p["value"] for p in rel.get("additionalProperty", [])}
print(sd["byArtist"]["name"], "|", sd["name"], "|",
      off["price"], off["priceCurrency"], "|",
      sd["publisher"]["name"], "|", props.get("item_id"))

The item_id from additionalProperty is the stable internal ID, useful as a primary key when you re-scrape later.

Tracks, ISRCs, and the payload the HTML hides

The same JSON-LD carries the track list as an ItemList: one MusicRecording per track with its name, an ISO-8601 duration (P00H04M53S for Glider’s 4:53), the canonical track URL, an internal track_id, and the license notice. All 15 tracks came back on this album, zero parsing.

Track pages go further. Scrape tycho.bandcamp.com/track/glider-2 and the JSON-LD is a MusicRecording with isrcCode, inAlbum, and byArtist. Two things to know:

  • No offers block. Price is an album-level property; join tracks to their album via inAlbum.
  • The cleaned markdown is mostly the “If you like Tycho, you may also like” recommendation block (241 words here). The track metadata is in the JSON-LD, not the prose.

For stream-level detail, Bandcamp embeds a data-tralbum JSON blob in the raw HTML: trackinfo with durations in seconds (293.357), title_link slugs, lyrics fields, and mp3-128 preview URLs that are tokenized and expire. It also holds a defaultPrice field. On this album the blob said 9.0 while the JSON-LD offer said 12.0, and the rendered buy box showed $12. Two machine-readable sources can disagree on the same page; spot-check one rendered page and pick the source that matches what a fan sees.

Artists and discographies without the thin-page fight

The discography page fights back. magpie scrape https://tycho.bandcamp.com/music fails with quality blocked (empty) on the static fetch, and again after 9.9 seconds in browser mode. The page renders fine; the text content is just a grid of album titles, which cleans to roughly 70 words, under the 200-word floor that keeps scrapers from saving empty files. Magpie’s artist home page hit the same gate.

Three working routes, in the order I’d use them:

Sitemap first. Every artist subdomain publishes one (tycho.bandcamp.com/sitemap.xml), listing every album and track URL with lastmod dates. Free URL discovery, zero fetches of grid pages.

Corpus crawl second. magpie crawl https://tycho.bandcamp.com/music --corpus --out corpus.jsonl --max-pages 4 --max-depth 1 fetched 4 pages in 8.0 seconds and kept all of them: the album page’s full 749-word liner notes, the 70-word discography list, no gate. One {url, title, depth, markdown} JSON object per page.

Screenshot last. --page-format screenshot --render browser returns before the quality gate and saved a 793 KB full-page PNG of the discography. Use it when you need proof of what a page shows, not rows.

One locale trap: Bandcamp localizes UI strings by IP, and this France-geolocated connection got Musique and par HOME in place of Music and by HOME. The JSON-LD stayed in English. magpie scrape <url> --lang en-US pins the Accept-Language header and flips the strings back.

Prices: where they live and where they don’t

The JSON-LD offer is the only price surface a scraper gets cleanly. offers.price ships with priceCurrency, so read the pair; labels price in their own currency and a US visitor will see converted display prices that don’t match the stored amount. That trap is documented in detail in our Amazon product data walkthrough, where a THB price landed in the record as a bare number.

What you will not find in JSON-LD: individual track prices (tracks inherit the album), and merchandise. The Epoch page’s packages field came back null and a grep of the 438 KB raw HTML found exactly one dollar string, the $12 buy-box price. Vinyl and CD bundles on pages that have them live in the page markup, so budget a raw-HTML parse for those.

To monitor a price instead of snapshotting it, magpie watch <album-url> --every 30m --once records a baseline silently and stays silent while nothing changes. When the offer flips, the JSON-LD changes, watch fires, and the webhook can carry the new price. For building history out of that, see the price scraper guide.

When a Bandcamp library beats a scraper

Dedicated libraries predate the challenge and wrap Bandcamp’s undocumented /api/ endpoints, which robots disallows. If you use them, know what you’re shipping:

  • bandcamp-scraper (npm): 214 stars, MIT, JavaScript. Search plus album/artist info helpers. Last pushed June 2024, so two years stale, and its search hits the robots-disallowed /api/ paths.
  • bandcamp-fetch (npm): 86 stars, TypeScript, actively maintained (June 2026). The deepest option: discover, discography, stream URL resolution. No LICENSE file, which means you can read it but not legally embed it in your own product.
  • bandcamp-api (PyPI): version 0.2.3, thin Python wrapper. Fine for scripts, another /api/ consumer underneath.
  • Apify bandcamp actors: several exist, metered against platform credits. You pay per run forever for what a 4-second local command does.

My rule: if JSON-LD covers your fields, skip the library. The lib earns its keep only for stream resolution or lyrics at scale, and bandcamp-fetch is the only one I’d build on.

What breaks, and the tell for each

The challenge stub. curl https://tycho.bandcamp.com/album/... with a browser UA returns 200 with exactly 3,038 bytes containing fs-ch. That’s Fastly’s bot challenge, not the page. Any tool that “succeeds” with a tiny response body on Bandcamp has been stubbed; check byte size before parsing.

The thin-page gate. Discography, tag, and artist-home pages clean under 200 words and get blocked even in browser mode. It’s not a bug; those pages genuinely have no article text. Use sitemap plus per-album fetches.

The cookie modal. A rendered tag page shows the full album grid with covers and a “We care about your privacy” dialog floating over it (verified by screenshot). Headless runs that click nothing keep the overlay. Since tag pages fail the gate anyway, this mostly matters if you’re screenshotting.

Robots and the AI clause. /search and /api/ are disallowed, and the AI-crawler blocklist is explicit. Bandcamp’s terms refuse model-training use of artists’ music without permission, consistent with the robots file. Treat this as the most AI-hostile robots file I’ve read this year, and act accordingly with anything you feed to a model.

FAQ

Is scraping Bandcamp legal? Reading public album pages is low-risk; Bandcamp’s robots.txt permits them for generic crawlers. The Terms of Use license content for personal, non-commercial use only, so republishing liner notes or artwork is on you. Metadata like prices and track titles is where I’d stay. Not legal advice.

Does Bandcamp have an official API? No public one. The site runs on undocumented /api/ endpoints that robots.txt disallows, and the two discovery endpoints robots explicitly allows are challenge-gated and undocumented. Unofficial libraries wrap the private endpoints; they work until they don’t.

How do I get every album from a label? Labels are artist pages with subdomains. Fetch <label>.bandcamp.com/sitemap.xml for the URL list, then scrape each album page for its JSON-LD, or corpus-crawl the /music page with a page cap. Sleep 1-2 seconds between requests if you script the loop yourself; magpie’s crawl auto-throttles per host.

Why does my requests code get an empty page? You got Fastly’s challenge stub: HTTP 200, about 3 KB, fs-ch in the body. A plain Python requests client fails this check. Use a client with real browser TLS fingerprinting or a rendering browser, and verify the response size before parsing.

Can I download the music? No. The mp3-128 stream URLs in the page payload are tokenized previews that expire, and ripping them takes revenue from artists who keep 80-85% of each sale. Buying an album gets you the actual files. Magpie doesn’t download files, by design.

The recipe, condensed

Album data: one magpie scrape per album URL, read the JSON-LD, flatten with the script above. Discographies: sitemap for URLs, corpus crawl for text, --lang en-US if your IP isn’t American. Prices over time: watch plus webhook. Sleep between hosts, stay off /search and /api/, and if a response measures 3 KB, you’re talking to the challenge, not Bandcamp. The site-scraper hub has the same treatment for other sites.

Stop renting credits.

One flat price, your machine, your keys.

Download free for Windows, macOS and Linux

Windows · macOS · Linux $49/mo flat, cancel anytime