iTunes UPC Database

Ok clear, thank you for the quick answer on it.
Is this access easy to have or do we need to be a professional ?
They said that, we need to send an email to have access to it ? @DanielTB80 do you have personnal or a pro access?

Honestly, I am surprised I have access to the data.
I signed up a couple years ago and stated I wanted to help musicbrainz with content management, purely in a personal role.

There is a link at the top of the page I previously linked to where you can sign up. It looks like the sign-up options have changed since I applied and a quick read through indicates that they possibly have gotten a bit stricter on the approval process based on the requirements I am seeing, but I canā€™t remember with certainty what the approval requirements were before.

Worst case, apply and see what they have to say. Good luck!

5 Likes

A post was split to a new topic: Looking for info about the URights tool

Does the database include releases that were exclusive to countries other than US?

The binary viewer cannot find this release.

Iā€™ve been able to find many that were. However, they had to exist at the date on the file. The earliest database is 1-9-2020, so if that release was no longer available on iTunes at that point (which looks like the case, since you had to go to archives to find it and it was released in 2012) it wouldnā€™t be found in the database. In other words, when removed from Apple Music/iTunes, no longer in database. This is why I download all the database updates and even still youā€™ll find releases that were released and pulled within the 3 months that separate database drops.

2 Likes

Yeah, I did check both the latest and earliest database available and couldnā€™t find it.

1 Like

Hello all, I am working with the EPF dumps and have written scripts to parse them into CSV files; would anyone find these more convenient than binaries? Happy to share.

I am also looking for an older version of the dumps from around 2010, if you happen to have one please let me know.

6 Likes

Ever since the change to the ā€œ.tbzā€ extension, 10-24-2022, none of the files have any useable info. Is there something Iā€™m doing wrong. They have info, just no barcodes or IDs like the previous ones.

The binary files are stored by Apple in a double compressed file format, using a TAR compressed file format and then encasing that file in the TBZ compressed file format.

You have to extract the TBZ and then extract the TAR file that is inside it. Its an additional step, but significantly saves on storage space.

ANNOUNCEMENT FROM APPLE MUSIC:
Please note that Apple Music and iTunes Music data will be migrating away from the Enterprise Partner Feed (EPF).
Starting July 16, 2024, the best source for app developers looking for the most up to date Apple Music data is the Apple Music Feed.
Music data will no longer be included in the EPF as of March 17, 2025.
Additional information and documentation can be found here - Apple Music Feed | Apple Developer Documentation.

Under the current process, I will be able to continue data through March 17, 2025. I will be exploring how to continue pulling the data after that time. I will provide an update once I have an answer.

4 Likes

Thank you! I didnā€™t know what a ā€œ.tbzā€ extension was and didnā€™t realize it was just a different type of compression file. I was able to open with WinRAR.

Hey @DanielTB80 ,
Thank you for your update, appreciate.
Do you know if Apple will make new API with Apple Music Feed as is as Apple EPF? Are we loosing any information ? Where do you have heard about this ?

Thanks !

From Apple Music Feed website
(Apple Music Feed | Apple Developer Documentation)

"Apple Music Feed contains the catalog content of Apple Music products in bulk for consumption as feed exports. These bulk exports are appropriate for offline use cases, complementing Apple Music API, which is best for online use. Apple Music Feed includes content metadata for albums, songs, artists, and popularity charts, and fully refreshes every 24 hours. You access the Apple Music Feed using Apple Media Feed API to request an export of a data set.

With access to the raw data and the information in this documentation, you can use Apple Music Feed in many ways. For example, if you want to build a discovery engine for Apple Music, your team can examine the data and determine endpoint requests to serve such an engine.

Apple Music Feed uses the Parquet format, which is an open-source columnar storage file format that optimizes the storage and processing of large datasets. The Parquet format improves query performance and reduces storage costs in scenarios where you need to read or process data selectively. It achieves this by using columns and storing the values of each column together, which allows efficient compression and encoding techniques that you can apply specifically to each column. Many large-scale data-processing frameworks, like Hadoop and Spark, use this format."

I do not have the requisite skills to script the data dump so that you guys can continue to use it.
If you guys can assist and create a script for me and instructions on how to run it, I will be more than happy to keep providing this data.

1 Like

maybe the itunes UPC should just be in the mb release group info.
that way the file just need to be scraped once too update all the release groups that are in the file.

and then if there is an UPC value, it can be used to search for the album, otherwise it uses the current way of searching for the information.

That would be ideal. Can someone see if they can follow the examples set here to generate what I have been previously provided?

First, I think we need to a developer account membership plan to have Team ID to be able to explore this Apple Music Feed.
ā†’ Has someone has a developer plan to test it (i do not) ?

Secondly, i think we can generate token with Python code below :


"import jwt
import time
from datetime import timedelta

# Replace with your details
TEAM_ID = "YOUR_TEAM_ID"  # Found in Membership details
KEY_ID = "YOUR_KEY_ID"    # Key ID from the private key
PRIVATE_KEY_PATH = "path/to/AuthKey.p8"  # Path to your private key file

def generate_developer_token(team_id, key_id, private_key_path, expiry_seconds=15777000):
    """
    Generate a signed developer token for the Apple Media Feed API.

    Args:
        team_id (str): The 10-character Team ID from your Apple Developer account.
        key_id (str): The 10-character Key ID from the private key.
        private_key_path (str): Path to the .p8 private key file.
        expiry_seconds (int): Token expiration time in seconds (max 15777000).

    Returns:
        str: The generated developer token.
    """
    # Load the private key
    with open(private_key_path, "r") as key_file:
        private_key = key_file.read()

    # Current UNIX time
    issued_at = int(time.time())

    # Claims payload
    payload = {
        "iss": team_id,                  # Issuer (Team ID)
        "iat": issued_at,                # Issued at (current time)
        "exp": issued_at + expiry_seconds,  # Expiry (current time + max duration)
    }

    # JWT headers
    headers = {
        "alg": "ES256",                 # Algorithm
        "kid": key_id                   # Key ID
#Then we need to Generate the JWT token
    token = jwt.encode(payload, private_key, algorithm="ES256", headers=headers)

    return token
# Generate the token
developer_token = generate_developer_token(TEAM_ID, KEY_ID, PRIVATE_KEY_PATH)

print("Your Developer Token:")
print(developer_token)

After this we could test on Postman with headers and the URL : "https://api.media.apple.com/v1/feed/album/latest