[WS] Apple Music

Apple do not distinguish composers and lyricists. And as long as the Apple Music or iTunes app have support for that field, I don't expect them to, unless that changes.

If you have a release where knowing the lyricist (or another field) is important, I could check if there is more metadata available and add it to the script.

I've been trying to extract the country code from the Apple Music script without luck. It looks like the only place it is available is in the storefronts data, which I am having issues accessing. Would you be able to suggest where in the script and how I might be able to pull and write the two letter country code?


I did not test this, but if you put this before "json_select "mp3tagalbum"" it should work

json_select_object ".storefronts"
  json_select_array "d" 1
    json_select "id"
    OutputTo "COUNTRYCODE"

Worked like a charm. Much appreciated!

Updated scripts again, should be better at getting more releases.

Apple Music for Mp3Tag 1.5.zip (35.2 KB)
iTunes API for Mp3Tag 1.7.zip (33.6 KB)


As I understand Apple puts all under "composer". Here are some examples for albums:
Laurent Voulzy ist the composer in most cases, Alain Souchon the lyricist.

One of the best known writer-duos: Elton John as the composer and Bernie Taupin as the lyricist.

Kurt Weill as composer and Bertolt Brecht, the famous author as lyricist.

Apple is not alone with throwing things together. Often sources use "Written by" for both. It would be not such a problem if there was an official tagfield named "Author" or Writer", where you could name both but naming both of them "composer" is irritating.

I am not so familiar with the apple-world. Is there a website where you see all those informations you get in your apple-script?

Another thing:
You script lists a tagfiled AMLYRICS and gets informations of 0 or 1. As I understand that could stand for "Apple Music Lyrics", right?
Are you able to get these lyrics in cases the field shows 1?

Apple Music has its history from MP3 world and the SoundJam app, as well as requiring the AMG database, which all only uses "composer" only. This was all in iTunes days, but they don't seem to have expanded it further. I guess it is because there is little value for them in return, and having one field only makes the apps more coherent. Now it seem like the record labels update the data themselves, directly in Apple Music. While Apple have relatively strict guidelines for metadata, many labels do not (especially minor ones) follow them.

The Apple documentation for iTunes Api, and Apple Music is here:



AMLYRICS is just if Apple have lyrics or not, I was looking for a way to get it, but I don't know of any way. I should probably remove the tag from future scripts, as I don't think it is necessary for anyone.

Mp3Tag has just been updated to support a bunch of m4a fields such as the Album ID via ITUNESALBUMID. Can you please update your source to support it? Ik it’s probably so easy and I could just tweak it myself but I have no knowledge about that :confused:

I will check out the new ones and make an update.

Here are new versions to support the new tags. Check if it works. It seem like the country storefront id is not being saved as sfID.

Apple Music for Mp3Tag 1.6.zip (33.3 KB)
iTunes API for Mp3Tag 1.8.zip (34.2 KB)


just checked with AtomicParsley. Everything is saved properly except for the country id. not a big deal tho. thanks for the good job

The ITUNESCOUNTRYID is supposed to be the storefront ID, not the two-digit country code. Also, there is a funny x at line 249 of Apple Music Web.inc.

Please also remove the debug output from the official scripts — it has performance implications and also might Mp3tag seem suspicious, trying to create random files in the root folder of the system drive.

you can find storefront IDs listed here

1 Like

Yes I already figured out that it should be the storefront id, I think I will drop saving that field altogether as it is not really that useful. You already choose which storefront by which country store to collect the information from anyway. Another option will be to convert the country code to the respective storefront id.

The "x" is deliberate, although I should have removed it (actually the entire surrounding code) as well as the debug output, which I always keep forgetting to remove, before publishing. Sorry about that. I store the debug on the root because I run MP3tag on my M1 Mac via crossover and it is too tedious to keep it buried deeply.

I was originally hesitant to update the script until the 3.06b version of MP3Tag was not a beta version, but because it was requested I rushed out a new version yesterday. If the script is run on a pre beta version they will not be stored as expected. Which brings me another curious question to what happens if you open those tags again after saved in 3.06a and earlier and save again in v 3.06b?

Anyway here are new version, not much changes except some removals.
Apple Music for Mp3Tag 1.6.zip (33.0 KB)
iTunes API for Mp3Tag 1.8.zip (34.3 KB)


No problem with the small issues, just wanted to mention.

Then they're converted from custom fields to the new iTunes-specific fields.

Hello everyone,

I was recommended about this iTunes API script in order to use the iTunes related fields that were added in a recent Mp3tag version.
Can someone please help me understand what is the added functionality of the following new fields-
I'm only aware that in "ITUNESCATALOGID" for example, with the correct data, when pressing in iTunes application to "Show song in iTunes Store" button, the song will be marked with "Play" button instead of an amount to purchase.

Also how can I use this script to retrieve the data for those fields? I don't have knowledge in code, so this is all overwhelming for me.. if anyone can please explain I'd appreciate it! :pray:

Hey, can you add XID and ITUNESCOMPOSERID on your script please

Composer ID is already in the script, but it does not always exist. XID is not available from the source.

The script populates some of the fields if they exist from the source. You need the newest 3.06 (beta) of MP3tag and the latest version of the script.

Thanks, I'm able to use the script but I'm struggling to understand what is the functionality of the new added iTunes related fields (such as the ones I mentioned above..). Do you perhaps know the impact of the data on iTunes with PC/mobile?

basically it associates them with their respective page on itunes.
The ITUNESALBUMID for example

1 Like