MusicKit match artist id on my library with artist id on catalog

Hi,


Using MusicKit I'm able to get all artists in my library. But these artists come with an id related to my library, not the id of that artist in the Apple Music catalog.


I need the artist's catalog id because after getting all artists from my library I want to get all albums from that artist in the Apple Music catalog. And the current endpoint for that only accepts the catalog id of an artist:


https://api.music.apple.com/v1/catalog/us/artists/<artistId>


So, is there a way to match my library artists id's with the Apple Music catalog artists id's?


Related question: https://forums.developer.apple.com/thread/101328

Replies

It seems impossible with the current API. Artist Catalog ID (as well as album Catalog ID for albums) should be embedded in the Library Response however it is not. So the only way to get catalog id is to search using terms then select the most likely result to finally get artist info.


Vincent.

If anybody finds a solution to this or if Apple adds an API for this I would be glad to get an update in this thread as well:)

We should submit a radar for this.