Is the number in a Freegal URL a barcode?

Freegal has release URLs like https://freegalmusic.com/album/199066342442/2 and I just noticed that the first number in the URL looks like a barcode. https://musicbrainz.org/release/c9e6b642-a6d9-4b22-8ec1-16c47b6143fc has a barcode of 199066342442 which matches the Freegal URL. A few others seem to match too. Looking at the developer tools in Firefox, Freegal seems to call that field albumId. (The second number seems to be called provider.)

Do you all think it’s safe to just assume that the first number in the Freegal URL is the barcode, and add it as a barcode to releases? Or are there corner cases I should look out for where it might not be a barcode?

Seems to be pretty safe to assume that’s the barcode. However, easiest way to know is when you are on release editor if the barcode checks as a valid barcode or not.

Not always a barcode:
https://freegalmusic.com/album/9999900361592/1

Ooh good catch. At first I thought that might be something weird about some singles. Like maybe Freegal took a track off an album and called it a single without any artist/label intent, so they used a track ID instead of a UPC/EAN. But I looked at a few other singles and haven’t noticed any more evidence of that. In the API json data for that album[1] it shows albumId: 9999900361592 and songId: 376863743.

I also found https://freegalmusic.com/album/34248956/1[2]. The URL you found with the 9s has 8 digits after the 9s, and this one has 8 total. Maybe a coincidence, maybe they’re 9-padding some other form of ID.

If the number is a valid barcode and does not start with a bunch of 9s (or otherwise look odd, like too many 0s or something), do you all think it’s safe to assume it’s a barcode?


  1. https://api.freegalmusic.com/v1/album/songs?albumId=9999900361592&provider=1&language=en in the dev tools. ↩︎

  2. <https://example.com> renders as https://example.com, if you want to make a URL clickable while also showing the structure of it. ↩︎

Yeah, a lot of websites like this tend to use UPCs intermittently as IDs

If you want a fast way to check barcodes