This is a minimal HTML parser used by Antsy Records to extract and publish its full Bandcamp catalog as a static catalog.json
.
Although built specifically for Antsy Records, the approach can be reused by any Bandcamp label that needs to extract and serve its catalog independently — without APIs or headless browsers.
- Parses a manually saved HTML file (
rendered_bandcamp.html
) of your Bandcamp label's/music
page. - Extracts:
- Album title
- Artist name
- Album URL
- Thumbnail URL
- Generates
catalog.json
— a machine-readable list of all public releases. - Requires no Bandcamp login, no API token, and no automation.
bandcamp_fetch_catalog.php ← Parser script
bandcamp.php ← (Optional) Static JSON proxy for CORS/frontend use
README.md ← You're reading it
LICENSE ← MIT License
Note:
catalog.json
,rendered_bandcamp.html
, andrendered_bandcamp_files/
are not stored in the repo but are generated/uploaded manually during use.
{
"catalog": [
{
"title": "Quantum Fluctuation",
"artist": "Sergi Saldaña-Massó",
"url": "https://yourlabel.bandcamp.com/album/quantum-fluctuation",
"thumbnail": "https://yourlabel.bandcamp.com/rendered_bandcamp_files/a1986858268_2.jpg"
}
]
}
While logged into your Bandcamp label account:
- Open:
https://yourlabel.bandcamp.com/music
- Right click → Save Page As... → select Webpage, Complete
This will create:
rendered_bandcamp.html
rendered_bandcamp_files/
(folder with cover images)
Upload those two items to the same directory as this script (bandcamp_fetch_catalog.php
) on your server.
SSH into your server and run:
php bandcamp_fetch_catalog.php
This will create or update catalog.json
in the same folder.
You may serve catalog.json
directly or use bandcamp.php
as a wrapper:
<?php
header("Content-Type: application/json");
header("Access-Control-Allow-Origin: *");
readfile(__DIR__ . '/catalog.json');
?>
Frontend apps can then fetch your catalog from a CORS-safe endpoint like:
https://yourdomain.com/bandcamp.php
This tool was built by and for Antsy Records to support its own self-hosted frontend at antsy.seigr.net.
However, the architecture is general enough that:
- Any Bandcamp label can adapt this workflow
- No credentials, APIs, or third-party services are required
- ❌ Not a headless browser or scraper
- ❌ Not connected to Bandcamp APIs
- ❌ Not a generic plugin or package
- ❌ Not dynamic or database-backed
This is a static content preprocessor designed for full control and future-proof access to your own label catalog.
MIT — free for anyone to reuse and adapt.
No support is offered. Use at your own risk.
Built for internal use by Antsy Records
Part of the modular tooling within the Seigr Ecosystem