[WS] Apple Music

What happened in the meantime?
I tried the Apple script today again and it micraculously works again.

That is interesting, it means Apple changed its web interface back to the old one. Why is that is a good question, and if they will keep it going forward, or just temporary.

Yes it is by design about the plid, it should pull up the same album by searching on the playlist id.

The movement name and work are just more a hack for my classical albums, it just put the first part before a colon to the work, and the rest to the movement. 95% of classical music on iTunes is formatted like this. It will be a bit funky if there are ":" in normal track names, but not sure of a good solution.

I can post it when I get the time, it varies also a bit depending on type of album and genre. You can also look at the script what I did to get the json properly.

Here is one example

Added new versions of the scripts, only minor changes.

Apple Music for Mp3Tag 1.3.zip (32.8 KB) iTunes API for Mp3Tag 1.6.zip (33.6 KB)


2 posts were split to a new topic: How to use custom tag source

Here's an album that does not give complete results with the Apple Music Script:
Maybe you can find the reason and fix it.

Is is possible to add a total-disks feature,
i.e 1/2, 2/3, 3/3 for the discnumer-field?

Till yesterday the Apple Music Script principally worked, since today it stopped working with all albums I tested.
The search and the display works till the first window (list of albums), the second window (album contents) is empty.

New version out

Apple Music for Mp3Tag 1.4.zip (35.0 KB)


Check if it works for you now. For the other features, the script only takes the information that is available from Apple. But possibly can make another script to recalculate the data.

Thanks AreDigg. The script works again.

There is something that maybe a general dilemma in getting composer and lyricist.
I don't know how the information on the Apple-site is structured, i.e. if they distinguish between both, but I noticed that with your script both seem to be always combined in the field COMPOSER.

@vikaesar has made a Deezer script:
and distinguishes between COMPOSER and LYRICIST. Where the websource is maybe not so clear he seems to use INVOLVEDPEOPLE to combine these.

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"
1 Like

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)