Fetching ISRCs from Spotify

It certainly would but I don’t remember having ever been able to browse a Spotify page. It would always tell me it works with a software, wouldn’t it?
Or do you have an example page?

If interested to learn more about it there’s Spotify Web API documentation at https://developer.spotify.com/web-api/endpoint-reference/. Code shared by @tatsumo already makes good usage of this API and seems to be useful for my needs. Currently I’ve been just copy-pasting id’s from Spotify-software to web browser and have inserted ids on API URL to get my precious ISRCs. To see what kind of data it returns see for example track or album.

1 Like

If you “view source” on the hmvdigital website you can also see ISRCs (on the release page).

5 Likes

This could be an easy and quick user script.
If no one makes it but it is wanted, you can create a ticket at konami command.

5 Likes

Viewing source in that manner isn’t particularly more convenient than directly accessing the Spotify API JSONs, though.

The page as update can now submit directly to the server. After loading an album page from Spotify, you can load a Musicbrainz release by its MBID.
It will then check the track counts match (if they don’t it simply does nothing)*. If they match, it then adds a final column with the retrieved track names (so you can check they are what they should be).

*It currently matches track counts in a very primitive way: it assumes there that the first medium in the release is the entirety of the Spotify release (which works for most releases, as long as additional media are DVDs etc.)

The other caveat is that the requests to the MB server are subject to rate limitting. If a request fails (as it often does), you can just try again in a few seconds/minutes. At the moment the page doesn’t provide information as to why it hasn’t matched a MB release (whether it was a problem with the ID, the server, or the track count didn’t match).

2 posts were split to a new topic: Adding Spotify UIDs to MusicBrainz database

I don’t remember who I send that to (probably you) but, just in case and for the record, here is the User CSS to display ISRC in hmvdigital pages.

1 Like

Thanks, this looks interesting.

@tatsumo - the search doesn’t seem to be working anymore. Any idea why this is?

Hmm, not sure. I’m on holidays with no computer at the moment so I can’t check until I get home. It was working last I tried it though.

I think I read something about how the API now requires a key for everything.

What @reosarevok said. See

1 Like

I’m not sure how to get it working with the raw URL, but there is a page up (linked from the one @Freso gave) where I was able to get a response. It seems like the keys are specific to Spotify accounts, but that there’s no restriction on obtaining them – I just have a free account – and everything goes smoothly once you do.

I didn’t realise anyone actually used this but myself, but since there’s so much interest in it (apparently), I’ll add API key support when I get back.

I’m using it as well, although I modified it a bit to display release date and barcode as well. :slight_smile:

I’m glad the JavaScript was readable enough to do that :joy:

1 Like

Thanks guys! Rotab any chance you could send me your version? :slight_smile:

If you want to show release date and barcode, open script.js and paste

Text += data.release_date + " (Precision = " + data.release_date_precision + ")"; Text += "</td></tr><tr><td>"; //loop over all external ids Object.keys(data.external_ids).forEach(function(key) { Text += key + ": " + data.external_ids[key] + " "; }) Text += "</td></tr><tr><td>";

before (currently line 128)

and change Text += "<table class=\"summary\"><tr><td rowspan=\"5\">" + CreateImage(data.images[0].url, "cover") + "</td><td>" + data.name + "</td></tr>";
to Text += "<table class=\"summary\"><tr><td rowspan=\"7\">" + CreateImage(data.images[0].url, "cover") + "</td><td>" + data.name + "</td></tr>";

1 Like

Thanks @Rotab!

@tatsumo if you could add API key support once you’re back from holiday that’d be amazing. Would be a lifesaver!

2 Likes

Hi @Rotab - do you think it’d be possible for you to try and fix this? Thanks in advance!

1 Like