Fetching ISRCs from Spotify

As a general rule, they are unique to the digital release. I vaguely recall possibly once having seen a UPC returned by Spotify that matched the CD, but I believe major labels do not generally reuse the same UPC for digital and physical releases: otherwise digital-only releases would never have UPCs (which they usually do).

It’s not very common but on some releases cd/digital releases have the same upc.

on the cd release back art you can see the upc.
the digital release has the same upc.
confirmed by itunes lookup.

https://itunes.apple.com/lookup?upc=5060006348129

3 Likes

Is there anyway to add release date? It would be helpful as that is the only reason I still have to go to the Spotify API if it’s a different barcode, etc. than other sites.

I’ve only been able to pull the year from @tatsumo’s tool. I don’t know that the Spotify API always has the full date available. See the release_date property of the album object:

release_date string The date the album was first released, for example 1981 . Depending on the precision, it might be shown as 1981-12 or 1981-12-15 .

On the other hand, if you have the UPC already, (which I’ve been pulling from Spotify), you might have luck pulling the release date from the iTunes API, as mentioned by @a23bed above. Using bash:

curl -s https://itunes.apple.com/lookup?upc=${UPC} | jq

Which gives a nicely formatted JSON object that (in my experience) has the full release date. Or try:

curl -s https://itunes.apple.com/lookup?upc=${UPC} |
        jq -c '.results[0].releaseDate'

If you want just the date to be returned. ${UPC} would be the UPC of course.

I know how to use the Spotify API to find the dates, I was just making a suggestion for this awesome utility.

Please don’t add release dates based on Spotify’s data alone. See my comment elsewhere:

6 Likes

Oh, yeah, totally agree with that.

Hi @tatsumo.
Could you add some nice column headers to your table because we were wondering what some columns they mean, lately in this edit:thinking:

Spotify track title Spotify ISRC MusicBrainz recording Whatnot
Bla bla FRSD112345 Bli Blu 2.099

Isn’t that the amount of seconds it conflicted with the length of the track in the release on MB?

1 Like

Yeah that’s coming very soon. Just been on holidays for a while.

2 Likes

Trying to input the ISRC from this album https://tatsumo.pythonanywhere.com/album/5Eh4g0AuSoFT5xc0vOG324 will display the following error message.

ISRCs must be in valid ISRC format
For usage, please see: MusicBrainz API - MusicBrainz

I’m guessing because the ISRC format used for the tracks have hyphens, e.g. GB-SMU-23-99532

1 Like

When entering enter them without the hyphens. Those were just added for readability.

1 Like

I mean I can’t push the ISRCs to MB directly from the album view as it will display the error message. I know that the hyphens aren’t necessary when putting it in the recordings.

1 Like

Yeah this isn’t going to get fixed. I’ve never seen this happen on any other release, so as simple as it would be, it’s still not worth the effort.

Additionally, I would say that having given Spotify ISRCs formatted like this, should raise question marks about the data quality, and think it’s a better idea to add another manual step to their submission.

I’ll look into adding something to prevent it trying to submit ISRCs that look invalid though.

1 Like

Just to say this format is completely valid per ISRC specs and MB could accept them.
I think it does accept them in the web form.

How do you batch submit btw, I think my bookmarklet recognises this format and strips the hyphens down, but not sure.

Is it? I’ve never seen this in any other context, except ones that are constructed precisely to explain the structure of an ISRC.

In that case, I won’t make any change. I’ll allow the hyphenated ones to try to generate an edit. Because if the format is valid, the issue is that MB server rejects them, not that the tool doesn’t reformat them to what wants — if indeed this is a fully valid presentation of ISRCs.

I thought so but apparently « The hyphens are not part of the ISRC code itself, but codes are often presented that way in print to make them easier to read. » according to MB wiki and WP and their references.
But I confirm that if you paste a bunch of ISRC with or without hyphens in MASS ISRC and bookmarklet, it will detect them (and submit without hyphens, I think).

A few smaller under the hood updates were made yesterday. One somewhat bigger one, is you can now paste (almost) any Spotify link into https://tatsumo.pythonanywhere.com/auto and it should take you to the page – to save you (mostly to save me) manually rewriting the URL. This also supports track links, which it will resolve to its parent album, and redirect there.

It should be able to handle ignoring query strings as well, most often the ?si=[blahblahblah], that Spotify appends to shared URLs a lot.

6 Likes

Submission to MusicBrainz (pasting an MB URL) stopped working recently and we get a message (https://blog.metabrainz.org/2018/02/01/web-service-ver-1-0-ws-1-will-be-removed-in-6-months/)

1 Like