MusicBrainz Enricher
MusicBrainz is a free, open music encyclopedia that provides metadata enrichment without requiring an API key.
Features
- No API key required: Just configure a User-Agent
- Canonical IDs: MusicBrainz IDs (MBIDs) for artists, albums, and tracks
- Comprehensive metadata: Release dates, genres, relationships
- Cover Art Archive: Album artwork integration
Configuration
# User-Agent is required by MusicBrainz API
SPOTTER_METADATA_MUSICBRAINZ_USER_AGENT="Spotter/1.0.0 (https://github.com/joestump/spotter)"
User-Agent Required
MusicBrainz requires a proper User-Agent string that identifies your application. Requests without a valid User-Agent may be blocked.
User-Agent Format
According to MusicBrainz requirements, your User-Agent should include:
- Application name
- Version
- Contact URL or email
ApplicationName/Version (ContactURL)
Enriched Data
Artists
- MusicBrainz ID (MBID)
- Canonical name
- Aliases and alternate names
- Country of origin
- Formation/dissolution dates
- Genre tags
- Related artists
Albums
- MusicBrainz ID (MBID)
- Release date
- Release type (album, single, EP, etc.)
- Label information
- Track listing
- Cover artwork (via Cover Art Archive)
Tracks
- MusicBrainz ID (MBID)
- Track number
- Duration
- ISRC codes
- Recording relationships
Rate Limiting
MusicBrainz enforces strict rate limits:
- 1 request per second maximum
- Requests are automatically throttled
- Bursting will result in temporary blocks
Spotter handles this automatically with built-in request queuing.
Cover Art Archive
Album artwork is retrieved from the Cover Art Archive, which is integrated with MusicBrainz:
- Front cover
- Back cover
- Medium (CD, vinyl) images
- Booklet images
Matching Strategy
Entities are matched using:
- Existing MBID: If already stored, use it directly
- Search API: Query by artist + title
- Confidence scoring: Select best match above threshold
Troubleshooting
"Rate limit exceeded"
If you see 503 errors:
- Spotter will automatically back off
- Wait a few minutes before retrying
- Ensure you're not running multiple instances
"No results found"
If MusicBrainz can't find matches:
- The artist/album may not be in MusicBrainz
- Try different search terms
- Consider contributing the data to MusicBrainz
Wrong matches
If metadata is incorrect:
- The automatic matching may have failed
- Check the MusicBrainz website for the correct entry
- A manual MBID override is planned for a future release.
Contributing to MusicBrainz
MusicBrainz is community-maintained. If your music is missing or incorrect:
- Create a MusicBrainz account
- Add or edit entries
- Your contributions help everyone.
Visit musicbrainz.org to contribute.