Bandcamp Music Scraper avatar
Bandcamp Music Scraper
Under maintenance

Pricing

$29.00/month + usage

Go to Apify Store
Bandcamp Music Scraper

Bandcamp Music Scraper

Under maintenance

The Bandcamp scraper that doesn't make you choose. Albums, tracks, previews, videos, artist data. All in one actor. Built by developers, for developers.

Pricing

$29.00/month + usage

Rating

0.0

(0)

Developer

Marielise

Marielise

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

15 days ago

Last modified

Share

Bandcamp Music Scraper - Apify Actor

An enhanced Apify actor wrapper for the Bandcamp music scraper module. This actor scrapes comprehensive album, track, artist, and video information from Bandcamp artist/label pages.

Features

  • Scrapes album metadata (title, artist, URL, artwork, release date, price, download availability, tags)
  • Fetches track listings with durations and track numbers
  • Extracts MP3 128kbps audio preview URLs
  • Collects artist/label information (bio, location, tags, social links)
  • Discovers embedded videos (YouTube, Vimeo, Bandcamp)
  • Handles cookie consent and modals automatically
  • Extracts data from embedded JSON (TralbumData, EmbedData)
  • Smart discovery of album URLs from artist/label music pages

Input

The actor supports two input formats. You can use either nested options or flat format:

Nested format:

{
"url": "https://saor.bandcamp.com/",
"options": {
"fetchAlbums": true,
"fetchTracks": true,
"fetchAudioPreviews": true,
"fetchArtistInfo": true,
"fetchVideos": true
}
}

Flat format:

{
"url": "https://saor.bandcamp.com/",
"fetchAlbums": true,
"fetchTracks": true,
"fetchAudioPreviews": true,
"fetchArtistInfo": true,
"fetchVideos": true
}

Input Fields

  • url (required): Base URL of the Bandcamp artist or label page (e.g., https://saor.bandcamp.com/)
  • fetchAlbums (default: false): Navigate to /music and fetch album metadata
  • fetchTracks (default: false): Fetch track listings from each album (requires fetchAlbums)
  • fetchAudioPreviews (default: false): Extract MP3 128kbps preview URLs for tracks (requires fetchTracks)
  • fetchArtistInfo (default: false): Extract artist/label information (bio, location, tags, social links)
  • fetchVideos (default: false): Extract embedded video URLs from album pages (YouTube, Vimeo, Bandcamp)

Output

The actor outputs structured data with the following format:

{
"artist": {
"name": "Saor",
"bio": "Atmospheric Celtic metal from the Highlands of Scotland...",
"location": "Scotland",
"imageUrl": "https://f4.bcbits.com/img/...",
"tags": ["atmospheric black metal", "folk metal", "scotland"],
"socialLinks": {
"website": "https://saor-music.com",
"facebook": "https://facebook.com/saormusic",
"instagram": "https://instagram.com/saor_official",
"twitter": null,
"youtube": null
}
},
"albums": [
{
"title": "Forgotten Paths",
"artist": "Saor",
"url": "https://saor.bandcamp.com/album/forgotten-paths",
"imageUrl": "https://f4.bcbits.com/img/a1234567_10.jpg",
"releaseDate": "2019-02-15",
"price": {
"amount": 7.00,
"currency": "USD"
},
"downloadAvailable": false,
"tags": ["metal", "folk", "atmospheric"],
"videos": [
{
"url": "https://www.youtube.com/embed/abc123",
"title": "Forgotten Paths - Official Video"
}
],
"tracks": [
{
"title": "Forgotten Paths",
"duration": 678,
"trackNumber": 1,
"url": "https://saor.bandcamp.com/track/forgotten-paths",
"previewUrl": "https://t4.bcbits.com/stream/.../mp3-128/..."
}
]
}
]
}

Output Fields

Artist object (if fetchArtistInfo is enabled):

  • name: Artist/label name
  • bio: Biography text
  • location: Geographic location
  • imageUrl: Profile image URL
  • tags: Array of genre/style tags
  • socialLinks: Object with website and social media URLs

Album objects:

  • title: Album title
  • artist: Artist name
  • url: Album page URL
  • imageUrl: Album artwork URL
  • releaseDate: Release date (ISO format)
  • price: Object with amount and currency
  • downloadAvailable: Whether the album is available for free/NYOP download
  • tags: Array of genre/style tags (if fetchAlbums is enabled)
  • videos: Array of embedded video objects (if fetchVideos is enabled)
  • tracks: Array of track objects (if fetchTracks is enabled)

Track objects (if fetchTracks is enabled):

  • title: Track title
  • duration: Duration in seconds
  • trackNumber: Track position number
  • url: Track page URL
  • previewUrl: MP3 128kbps preview URL (if fetchAudioPreviews is enabled)

How It Works

  1. Navigate to artist/label page: The actor starts with the base URL (e.g., https://saor.bandcamp.com/)
  2. Extract artist info: If fetchArtistInfo is enabled, extracts artist/label details from the sidebar
  3. Discover albums: If fetchAlbums is enabled, navigates to /music and extracts album links from the grid
  4. Process each album: For each album discovered:
    • Extracts album metadata from embedded TralbumData JSON
    • Collects tags from the page
    • Fetches embedded videos if fetchVideos is enabled
    • Extracts track listings if fetchTracks is enabled
    • Includes audio preview URLs if fetchAudioPreviews is enabled
  5. Output structured data: Returns complete artist and album data with all requested fields

Development

Setup

$npm install

Build

$npm run build

Run Locally

$npm run dev

Testing with Apify CLI

  1. Install Apify CLI:

    $npm install -g apify-cli
  2. Run locally:

    $apify run -p
  3. Deploy to Apify:

    $apify push

Technical Details

This actor uses Playwright browser automation to extract data from Bandcamp pages. The workflow:

  1. Validates the input URL (must be an artist/label subdomain)
  2. Extracts artist/label info from sidebar if fetchArtistInfo is enabled
  3. Navigates to /music page if fetchAlbums is enabled
  4. Discovers album URLs from the music grid
  5. For each album:
    • Extracts metadata from embedded TralbumData JavaScript object
    • Collects genre/style tags from page elements
    • Finds embedded video iframes (YouTube, Vimeo, Bandcamp)
    • Parses track information including preview URLs
  6. Returns structured data through Apify's dataset

Data Extraction Method

The scraper uses multiple extraction strategies:

Embedded JSON Data (most reliable):

  • TralbumData - Album and track information with audio preview URLs
  • EmbedData - Additional album metadata

DOM Scraping (for supplementary data):

  • Artist sidebar (#band-name-location, #bio-text)
  • Social links (#band-links)
  • Genre/style tags (a.tag)
  • Embedded video iframes
  • Album grid (#music-grid)

This hybrid approach ensures comprehensive data extraction while maintaining reliability.

Dependencies

  • apify (^3.2.4): Apify SDK for actor development
  • playwright (^1.56.1): Browser automation library
  • TypeScript (^5.9.2): Type-safe development

Notes

  • The actor uses Chromium browser via Playwright in headless mode
  • Cookie consent and modals are dismissed automatically
  • Album URLs are discovered dynamically from the music page grid
  • The actor supports both nested (options: {...}) and flat input formats
  • Option dependencies:
    • fetchTracks requires fetchAlbums to be enabled
    • fetchAudioPreviews requires fetchTracks to be enabled
  • Invalid option combinations will throw an error at startup
  • Audio preview URLs are MP3 128kbps format from Bandcamp's CDN
  • Social links are auto-detected (website, Facebook, Instagram, Twitter/X, YouTube)