Lioncat6/SAMBL-React
About
Streaming Artist MusicBrainz Lookup - SAMBL is an open-source tool designed to aid in seeding data to the MusicBrainz database from Spotify. Now in Next.js!
Web & AppsWhat you can do
- Musicbrainz - musicbrainz
- Spotify - spotify
- Apple Music - applemusic
- MusixMatch - musixmatch
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalSAMBL
Streaming Artist MusicBrainz Lookup
Looking for contributors!
Provider Status
| Provider | ISRC Lookup | UPC Lookup | Entity Lookup | Artist Search | Album Matching |
|---|---|---|---|---|---|
| MusicBrainz | ✅ | ✅ | ✅ | ⚠️ | N/A |
| Spotify | ✅ | ✅ | ✅ | ✅ | ✅ |
| Apple Music | ✅ | ✅ | ✅ | ✅ | ✅ |
| Deezer | ✅ | ✅ | ✅ | ✅ | ✅ |
| Tidal | ✅ | ✅ | ✅ | ✅ | ✅ |
| Bandcamp | ⚠️ | ⚠️ | ✅ | ✅ | ✅ |
| MusixMatch | ✅ | ❌ | ❌ | ❌ | ❌ |
| SoundCloud | ❌️ | ❌️ | ✅️ | ✅️ | ✅️ |
| Qobuz | ❌️ | ✅ | ✅ | ✅ | ✅ |
| Naver VIBE | ❌️ | ❌️ | ✅ | ✅ | ✅ |
| Discogs | ❌️ | ✅ | ✅ | ✅ | ✅ |
| Volumo | ❌️ | ✅ | ✅ | ✅ | ✅ |
MetaBrainz Thread:
https://community.metabrainz.org/t/sambl-spotify-artist-musicbrainz-lookup/716550
Configuration
.env
REACT_APP_VERSION=$npm_package_version
REACT_APP_NAME=$npm_package_name
NEXT_PUBLIC_VERSION=$npm_package_version
SPOTIFY_CLIENT_ID=<Spotify Client ID>
SPOTIFY_CLIENT_SECRET=<Spotify Client Secret>
SPOTIFY_REDIRECT_URI=<Spotify Redirect URI>
SPOTIFY_ALTERNATE=<This should be unset unless you know what you're doing>
CONTACT_INFO=<Contact email>
MUSIXMATCH_API_KEY=<MusixMatch Api Key or browser cookie [Optional]>
MUSIXMATCH_ALTERNATE=<Bool 1 or 0>
NEXT_PUBLIC_MASTODON_URL=<Mastodon URL [Optional]>
TIDAL_CLIENT_ID=<Tidal Client ID>
TIDAL_CLIENT_SECRET=<Tidal Client Secret>
SOUNDCLOUD_CLIENT_ID=<Soundcloud Client ID>
SOUNDCLOUD_OAUTH_TOKEN=<Soundcloud Oath Token>
NEXT_PUBLIC_DISABLED_PROVIDERS=<Providers to disable>
DISCOGS_CONSUMER_KEY=<Discogs Consumer Key>
DISCOGS_CONSUMER_SECRET=<Discogs Consumer Secret>
APPLEMUSIC_TOKEN=<Token Regex> [optional]
MUSICBRAINZ_DISABLE_RATE_LIMIT=<1 or 0> [optional]
MUSICBRAINZ_BASE_URL=https://musicbrainz.org [optional]
BANDCAMP_COOKIE=<string> [optional]
- The Spotify Redirect URI does not need to be a valid URL, but must match your Spotify developer application
- The contact email is for MusicBrainz's api requirements
- MUSIXMATCH_ALTERNATE allows you to use browser cookies for an alternate authentication method
API Docs (Outdated)
Generation of the API docs should be automated with a swagger UI at some point, but for now you should just read the source for each endpoint /pages/api/
Providers (See supported features above)
| Provider | Namespace |
|---|---|
| Musicbrainz | musicbrainz |
| Spotify | spotify |
| Apple Music | applemusic |
| Deezer | deezer |
| Tidal | tidal |
| MusixMatch | musixmatch |
| Qobuz | qobuz |
| Naver VIBE | naver |
| Discogs | discogs |
| Volumo | volumo |
API endpoints
The API root is /api/ (Ex: https://sambl.lioncat6.com/api/find)
/find
query(string) [Required]type(string) [Required] — value must be eitherUPCorISRC- Looks up tracks or albums by barcode (UPC) or ISRC across Spotify, MusicBrainz, Deezer, Tidal and (ISRC only) MusixMatch.
/compareArtistAlbums (beta)
provider_id(string) [Required] — provider-specific artist id (e.g. Spotify artist id)provider(string) [Required] — provider namespace (e.g.spotify,tidal,deezer)mbid(string) — MusicBrainz artist id (required unless thequickflag is present)quick(flag present if any value supplied) — when present the endpoint runs a faster URL-matching-only workflow and does not requirembidfull(flag) — when present adds additional inc parameters to MusicBrainz queriesraw(flag) — when present returns raw source and MB album arrays instead of processed results- Notes:
mbidis validated; ifmbidis missing andquickis not present the request will be rejected (400).
- Notes:
/compareSingleAlbum
provider_id(string) ORurl(string) [One required]- If you supply
provider_idyou must also supplyprovider(namespace). If you supplyurl, the provider is inferred.
- If you supply
provider(string) — required when usingprovider_idmbid(string) — optional MusicBrainz artist id used to disambiguate when searching MusicBrainz by artist+title/getArtistAlbumsprovider_id(string) [Required]provider(string) [Required]offset(integer|string) — pagination offset (used by some providers like Tidal)limit(integer) — page size (provider-dependent)forceRefresh(flag) — presence of this query param triggers a cache bypass (noCache)
/getArtistInfoprovider_id(string) ORurl(string) [One required]- If
provider_idis given you must also provideprovider.
- If
provider(string) — required when usingprovider_idmbData(flag) — when present the endpoint includes MusicBrainz data alongside the provider dataforceRefresh(flag) — bypass cache when present
/getMusicBrainzAlbumsmbid(string) [Required] — validated MusicBrainz artist idoffset(integer)limit(integer)forceRefresh(flag)
/getMusicBrainzFeaturedAlbumsmbid(string) [Required]offset(integer)limit(integer)forceRefresh(flag)
/lookupArtistprovider_id(string) ORurl(string) [One required]- If
provider_idis supplied,provider(string) is required.
- If
provider(string) — required when usingprovider_idforceRefresh(flag)- Notes: the endpoint expects an artist URL when using
url(type checked). It will return the resolved MusicBrainz id (mbid) when available.
/searchArtistsquery(string) [Required]provider(string) [Required] — provider namespace that supports artist search (e.g.spotify)- Notes: this endpoint expects the provider to implement
searchByArtistName.
/getArtistReleaseCountmbid(string) [Required]featured(flag) — include featured releases in the returned counts
/getAlbumUPCsprovider_id(string) ORurl(string) [One required]provider(string) — required when usingprovider_id- Notes: provider must implement
getAlbumByIdandgetAlbumUPCs.
/getTrackISRCsprovider_id(string) ORurl(string) [One required]provider(string) — required when usingprovider_id- Notes: provider must implement
getTrackByIdandgetTrackISRCs.
/artistDeepSearchprovider_id(string) ORurl(string) [One required]provider(string) — required when usingprovider_id- Notes: runs a multi-step search (gathers albums, UPCs, MusicBrainz lookups etc.) and returns the best-matching MusicBrainz artist id plus metadata about the matching process.
/ping- Health check endpoint; returns
{ message: "Pong" }.
- Health check endpoint; returns
Explore related projects
Loading…