Is the MusicItemID different per locale?

Hi There,

I've created a little tool for myself to quickly find the MusicItemID of a song which I then use in one of my own APIs to match the content.

In this tool, I'm using the MusicCatalogSearchRequest but I was just wondering if anyone knows if those IDs I get back from this request are unique to the locale? and if so, is there a way to get all the IDs of a song to write down?

I don't want to match on a name as that's more error prone.

e.g. my API would look something like this:

{
    "id": ["1259176472","510004981","1302212469"],
    "text": "Cool content.",  
}
Answered by Engineer in 708993022

Hello @hiddevdploeg, Thank you for your question!

Yes, the identifier of an item is dependent on the storefront of the request. This is because different storefronts may result in different versions of the requested item.

In order to find the equivalent content across storefronts, please refer to Fetch Equivalent Content for a Storefront.

Thanks,

Accepted Answer

Hello @hiddevdploeg, Thank you for your question!

Yes, the identifier of an item is dependent on the storefront of the request. This is because different storefronts may result in different versions of the requested item.

In order to find the equivalent content across storefronts, please refer to Fetch Equivalent Content for a Storefront.

Thanks,

It turns out that ids are different across different catalog locales, but there is an easy way in the API to find equivalent items. That's actually the first topic covered in this WWDC session from last year: https://developer.apple.com/wwdc21/10293.

If I were you, I'd be cautious about caching that id information, or at least making sure you gracefully handle the case where an item is no longer accessible at the id you have saved for it. I've seen a handful of cases in my own app where an album's id changes for whatever reason.

Is the MusicItemID different per locale?
 
 
Q