Closed jacksongoode closed 5 days ago
How are you getting the musicbrainz ID from a Spotify URL? Is there some API to do that that I've missed?
How are you getting the musicbrainz ID from a Spotify URL? Is there some API to do that that I've missed?
The MusicBrainz ID is retrieved by looking up which artist has the Spotify URL in their metadata on MusicBrainz.
For example: https://beta.musicbrainz.org/ws/2/url/?query=url:https://open.spotify.com/artist/1WZarnZpWEv7dDtjAETt4X
Excellent, thank you!
That sounds great @jacksongoode!
A proof of concept using ureq
can be checked out here. First time working with Rust so it might take me a while to integrate :)
For example: https://beta.musicbrainz.org/ws/2/url/?query=url:https://open.spotify.com/artist/1WZarnZpWEv7dDtjAETt4X
Not sure if important but the URI without the subdomain of beta.
produces the same XML data
https://musicbrainz.org/ws/2/url/?query=url:https://open.spotify.com/artist/1WZarnZpWEv7dDtjAETt4X
non-beta URI I feel is potentially more future stable
Heya, spotify does this and I am probably able to use the same API request format as I did with getting the lyrics for the songs as it's the same background api provider.
Closed with #537
Since seeing this feature on the roadmap, I thought I'd get the initial architecture in place to make sure this might be the best/most effective string of API calls to make.
Right now it takes two calls to reach social links, four to reach a Wiki summary:
MusicBrainz url lookup:
MusicBrainz artist social links:
Wikidata to Wikipedia page:
Fetch summary:
I feel like it should be possible to reach the MusicBrainz social links with one call, but their API docs are a bit of a mess. The total call time with
reqwests
is around 3-4s.