Apple MusicKit JS で簡単な音楽プレーヤーを作ってみる

Apple の MusicKit JS を使って、とりあえず簡単な音楽プレーヤーを作ってみます。

その前段階として Developer Token を作成してください。下記が参考になれば幸いです。

というわけで作ったのが下記の html ファイル。「Your Developer Token」となっている部分を自身で作成したものに置換すれば動くと思います。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

<title>MusicKit JS</title>
</head>
<body>
<center>
    <p><img id="artwork"/></p>
    <p id="media-item-title">Display Media Item Title here</p>
    <p id="album-title">Display Album Title here</p>
    <p id="artist-name">Display Artist Name here</p>
    <p id="playback-time">Display Playback Time here</p>
    <p><button id="play">Play</button><button id="pause">Pause</button></p>
    <p><button id="previous-item">Previous</button><button id="next-item">Next</button></p>
</center>

<script src="https://js-cdn.music.apple.com/musickit/v1/musickit.js"></script>
<script type="text/javascript">
    // MusicKit JS の Promise を作成
    const setupMusicKit = new Promise((resolve) => {
        document.addEventListener('musickitloaded', function () {
            // MusicKit を定義
            MusicKit.configure({
                developerToken: 'Your Developer Token',
                app: {
                    name: 'My MusicKit JS App',
                    build: '2022.11.14'
                }
            })
            // MusicKit のインスタンスで Promise を resolve
            resolve(MusicKit.getInstance())
        })
    });

    // MusicKit.configure() が完了するのを待って残りを実行
    setupMusicKit.then(async (music) => {

        // 再生中の曲の情報を表示する HTML 要素を取得
        let currentSongName = document.getElementById('media-item-title');
        let currentAlbumName = document.getElementById('album-title');
        let currentArtistName = document.getElementById('artist-name');
        let playbackTime = document.getElementById('playback-time');

        // playbackTimeDidChange をトリガーにして再生時間の表示を更新
        music.addEventListener('playbackTimeDidChange', () => {
            playbackTime.textContent = music.player.currentPlaybackTime
        });

        // mediaItemDidChange をトリガーにして再生中の曲名の表示を更新
        music.addEventListener('mediaItemDidChange', () => {
            currentSongName.textContent = music.player.nowPlayingItem.title
        });

        // Play ボタンと player.play() の紐付け
        let playButton = document.getElementById('play');
        playButton.addEventListener('click', async () => {
            await music.player.play();
            // 曲を再生しつつ、紐づく情報の表示を更新
            currentAlbumName.textContent = music.player.nowPlayingItem.albumName
            currentArtistName.textContent = music.player.nowPlayingItem.artistName
        });

        // Pause ボタンと player.pause() の紐付け
        let pauseButton = document.getElementById('pause');
        pauseButton.addEventListener('click', () => {
            music.player.pause();
        });

        // Previous ボタンと player.skipToPreviousItem() の紐付け
        let previousButton = document.getElementById('previous-item');
        previousButton.addEventListener('click', () => {
            music.player.skipToPreviousItem();
        });

        // Next ボタンと player.skipToNextItem() の紐付け
        let nextButton = document.getElementById('next-item');
        nextButton.addEventListener('click', () => {
            music.player.skipToNextItem();
        });

        // アルバムを再生 Queue に登録
        await music.setQueue({
            album: '1542182291' // アルバム ID を渡す
        })

        // アルバム情報取得のプロミス
        let albumInfoPromise = music.api.album(1542182291)
        albumInfoPromise.then((albumData) => {
            let artworkImg = document.getElementById('artwork')
            // アルバムアートの URL を取得
            let artworkURL = MusicKit.formatArtworkURL(albumData.attributes.artwork, 100, 100)
            // アルバムアートを表示
            artworkImg.setAttribute('src', artworkURL)
        })
    })
</script>
</body>
</html>

大事なのは下記の記述で MusicKit JS を読み込んでいるところと。。。

<script src="https://js-cdn.music.apple.com/musickit/v1/musickit.js"></script>

下記の様な感じで MusicKit インスタンスの Promise を作っているところ。

    // MusicKit JS の Promise を作成
    const setupMusicKit = new Promise((resolve) => {
        document.addEventListener('musickitloaded', function () {
            // MusicKit を定義
            MusicKit.configure({
                developerToken: 'Your Developer Token',
                app: {
                    name: 'My MusicKit JS App',
                    build: '2022.11.14'
                }
            })
            // MusicKit のインスタンスで Promise を resolve
            resolve(MusicKit.getInstance())
        })
    });

この辺りは色々やり方があるんだと思いますが、とりあえず「musickitloaded」のイベントを待って MusicKit.configure() を実行する必要があります。

あとは公式ドキュメントを見ながら色々遊べればと。。。

ちなみに Apple Music API という、アルバムや楽曲などの情報の取得を主とした API もありますが、MusicKit API の MusicKit.API クラスがその役割を担っています。

curl で Apple Music API に検索をかける

取り急ぎ curl でアーティストや楽曲の検索を試してみたいと思います。

前提として Apple Music API の Developer Token を持っている必要があります。

よければ下記も参考にしてください。

では順にいきます。

  1. アーティスト名で検索
  2. アルバム ID で検索
  3. 楽曲 ID で検索
  4. 曲名で検索
  5. おまけ - シングル版「今夜月の見える丘に」

1. アーティスト名で検索

まずは Apple 公式ドキュメントを参考にしつつアーティスト名「B'z」を検索します。URL は下記とします。

「https://api.music.apple.com/v1/catalog/jp/search?term=B'z&types=artists」

その上でリクエストヘッダーにデベロッパートークンを追加して、curl を実行します。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/search?term=B'z&types=artists"

で、返ってきたのがこちら。

{
    "results": {
        "artists": {
            "href": "/v1/catalog/jp/search?limit=5&term=B%27z&types=artists",
            "next": "/v1/catalog/jp/search?offset=5&term=B%27z&types=artists",
            "data": [
                {
                    "id": "74931253",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/74931253",
                    "attributes": {
                        "name": "B'z",
                        "genreNames": [
                            "ロック"
                        ],
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/0c/88/58/0c885888-c769-81f8-8485-069cd9a362f1/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "dcdfe6",
                            "textColor1": "000001",
                            "textColor2": "1b191e",
                            "textColor3": "2c2c2f",
                            "textColor4": "424046"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/74931253"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/74931253/albums",
                            "next": "/v1/catalog/jp/artists/74931253/albums?offset=25",
                            "data": [
                                {
                                    "id": "283000073",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/283000073"
                                },
                                {
                                    "id": "292067907",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/292067907"
                                },
                                {
                                    "id": "666625900",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666625900"
                                },
                                {
                                    "id": "75682683",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682683"
                                },
                                {
                                    "id": "1561574089",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561574089"
                                },
                                {
                                    "id": "74937562",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74937562"
                                },
                                {
                                    "id": "666634430",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666634430"
                                },
                                {
                                    "id": "75681798",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75681798"
                                },
                                {
                                    "id": "1605118558",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1605118558"
                                },
                                {
                                    "id": "75356318",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75356318"
                                },
                                {
                                    "id": "1466937136",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1466937136"
                                },
                                {
                                    "id": "74933581",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74933581"
                                },
                                {
                                    "id": "75682153",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682153"
                                },
                                {
                                    "id": "347013256",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/347013256"
                                },
                                {
                                    "id": "74935606",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74935606"
                                },
                                {
                                    "id": "75354662",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75354662"
                                },
                                {
                                    "id": "1325460835",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1325460835"
                                },
                                {
                                    "id": "454667912",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/454667912"
                                },
                                {
                                    "id": "297710855",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/297710855"
                                },
                                {
                                    "id": "1561701429",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561701429"
                                },
                                {
                                    "id": "74944705",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74944705"
                                },
                                {
                                    "id": "1567851939",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567851939"
                                },
                                {
                                    "id": "75361124",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75361124"
                                },
                                {
                                    "id": "1567852104",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567852104"
                                },
                                {
                                    "id": "75357159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75357159"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1236215587",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1236215587",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "ヒップホップ/ラップ"
                        ],
                        "artwork": {
                            "width": 3000,
                            "height": 3000,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/ae/b6/fb/aeb6fb97-56ba-e8fd-083f-f8c21970a74f/artwork.jpg/{w}x{h}ac.jpg",
                            "bgColor": "0f1050",
                            "textColor1": "d6bcf7",
                            "textColor2": "9dafdf",
                            "textColor3": "ae99d5",
                            "textColor4": "818fc2"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1236215587"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1236215587/albums",
                            "data": [
                                {
                                    "id": "1612269170",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1612269170"
                                },
                                {
                                    "id": "1552528987",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1552528987"
                                },
                                {
                                    "id": "1170604377",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1170604377"
                                },
                                {
                                    "id": "1344358078",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1344358078"
                                },
                                {
                                    "id": "1501353949",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1501353949"
                                },
                                {
                                    "id": "1551034513",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1551034513"
                                },
                                {
                                    "id": "1502686217",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1502686217"
                                },
                                {
                                    "id": "1502573665",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1502573665"
                                },
                                {
                                    "id": "1544732805",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1544732805"
                                },
                                {
                                    "id": "1536654657",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1536654657"
                                },
                                {
                                    "id": "1549103433",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1549103433"
                                },
                                {
                                    "id": "1375096721",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1375096721"
                                },
                                {
                                    "id": "1561406752",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561406752"
                                },
                                {
                                    "id": "1597875079",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1597875079"
                                },
                                {
                                    "id": "1566648690",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1566648690"
                                },
                                {
                                    "id": "1503527043",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1503527043"
                                },
                                {
                                    "id": "1448546746",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1448546746"
                                },
                                {
                                    "id": "1644747159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1644747159"
                                },
                                {
                                    "id": "1629986398",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1629986398"
                                },
                                {
                                    "id": "1619147046",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1619147046"
                                },
                                {
                                    "id": "1606159561",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1606159561"
                                },
                                {
                                    "id": "1582431314",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1582431314"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1465740891",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1465740891",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "エレクトロニック"
                        ],
                        "artwork": {
                            "width": 500,
                            "height": 500,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Features125/v4/9e/da/50/9eda50fb-495d-62dd-473e-7e5ad83209f7/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "1a1615",
                            "textColor1": "f6c069",
                            "textColor2": "d8a971",
                            "textColor3": "ca9e58",
                            "textColor4": "b28c5e"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1465740891"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1465740891/albums",
                            "data": [
                                {
                                    "id": "838262440",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/838262440"
                                },
                                {
                                    "id": "997882538",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/997882538"
                                },
                                {
                                    "id": "964660751",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/964660751"
                                },
                                {
                                    "id": "1212786159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1212786159"
                                },
                                {
                                    "id": "1579770371",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1579770371"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1585689464",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1585689464",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "エレクトロニック"
                        ],
                        "artwork": {
                            "width": 4000,
                            "height": 4000,
                            "url": "https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/ac/09/ab/ac09ab8c-1707-c6aa-a45e-9074649456f0/5059722847474_cover.jpg/{w}x{h}ac.jpg",
                            "bgColor": "03242f",
                            "textColor1": "d0cecc",
                            "textColor2": "21b9d9",
                            "textColor3": "a7acac",
                            "textColor4": "1b9bb7"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1585689464"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1585689464/albums",
                            "data": [
                                {
                                    "id": "776208953",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/776208953"
                                },
                                {
                                    "id": "1612158034",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1612158034"
                                },
                                {
                                    "id": "1571657950",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1571657950"
                                },
                                {
                                    "id": "1581841967",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1581841967"
                                },
                                {
                                    "id": "1577141561",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1577141561"
                                },
                                {
                                    "id": "1577141651",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1577141651"
                                },
                                {
                                    "id": "1583900522",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1583900522"
                                },
                                {
                                    "id": "1620727001",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1620727001"
                                },
                                {
                                    "id": "1584610904",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1584610904"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "303385174",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/303385174",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "ヒップホップ/ラップ"
                        ],
                        "artwork": {
                            "width": 996,
                            "height": 996,
                            "url": "https://is1-ssl.mzstatic.com/image/thumb/Music112/v4/81/ef/b0/81efb079-e993-f42a-cfe1-6ece22673a2f/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "1f1c2d",
                            "textColor1": "c7cea4",
                            "textColor2": "d0ba8c",
                            "textColor3": "a6ab8c",
                            "textColor4": "ad9a79"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/303385174"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/303385174/albums",
                            "data": [
                                {
                                    "id": "1447921556",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1447921556"
                                },
                                {
                                    "id": "1637062769",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1637062769"
                                },
                                {
                                    "id": "1517197555",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1517197555"
                                },
                                {
                                    "id": "1614079632",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1614079632"
                                },
                                {
                                    "id": "1558826365",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1558826365"
                                },
                                {
                                    "id": "1609298956",
                                    "type": "albums* Connection #0 to host api.music.apple.com left intact",
                                    "href": "/v1/catalog/jp/albums/1609298956"
                                },
                                {
                                    "id": "1584989196",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1584989196"
                                },
                                {
                                    "id": "1522129749",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1522129749"
                                },
                                {
                                    "id": "1648328595",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1648328595"
                                },
                                {
                                    "id": "1635988163",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1635988163"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    },
    "meta": {
        "results": {
            "order": [
                "artists"
            ],
            "rawOrder": [
                "artists"
            ]
        }
    }

2. アルバム ID で検索

次に、上記で取得した情報の中からアルバム ID 「283000073」をキーにしてアルバムの情報を取得します。

また Apple 公式ドキュメントを参考に、URL を「https://api.music.apple.com/v1/catalog/jp/albums/283000073」としました。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/albums/283000073"

で、返ってきた内容が下記の通りです。

アルバムのジャンルや、楽曲の順番、複数ディスクの場合のディスク番号、個別の楽曲のリリース日なども含まれています。

{
    "data": [
        {
            "id": "283000073",
            "type": "albums",
            "href": "/v1/catalog/jp/albums/283000073",
            "attributes": {
                "copyright": "℗ VERMILLION RECORDS",
                "genreNames": [
                    "ロック",
                    "ミュージック",
                    "J-Pop",
                    "ワールド ",
                    "J ポップ",
                    "アフリカ",
                    "アフロビート",
                    "サウンドトラック",
                    "サウンドトラック",
                    "ポップ",
                    "ポップ / ロック"
                ],
                "releaseDate": "2008-06-18",
                "upc": "4582283790893",
                "isMasteredForItunes": false,
                "artwork": {
                    "width": 2400,
                    "height": 2400,
                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                    "bgColor": "b31319",
                    "textColor1": "fff9f9",
                    "textColor2": "e3cccd",
                    "textColor3": "efcbcc",
                    "textColor4": "daa7a9"
                },
                "playParams": {
                    "id": "283000073",
                    "kind": "album"
                },
                "url": "https://music.apple.com/jp/album/bz-the-best-ultra-pleasure/283000073",
                "recordLabel": "VERMILLION RECORDS",
                "trackCount": 30,
                "isCompilation": false,
                "isSingle": false,
                "name": "B'z The Best “ULTRA Pleasure”",
                "artistName": "B'z",
                "isComplete": true
            },
            "relationships": {
                "tracks": {
                    "href": "/v1/catalog/jp/albums/283000073/tracks",
                    "data": [
                        {
                            "id": "283000107",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000107",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 1,
                                "releaseDate": "2008-06-18",
                                "durationInMillis": 379215,
                                "isrc": "JPBM00805001",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/bad-communication-ultra-pleasure-style/283000073?i=283000107",
                                "playParams": {
                                    "id": "283000107",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "BAD COMMUNICATION -ULTRA Pleasure Style-",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/a1/c3/1e/a1c31e2e-4bc3-7d0d-24d0-6dfc5a032798/mzaf_7411853953750226698.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000112",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000112",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 2,
                                "releaseDate": "1990-01-01",
                                "durationInMillis": 251681,
                                "isrc": "JPBM00805002",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/be-there/283000073?i=283000112",
                                "playParams": {
                                    "id": "283000112",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "BE THERE",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/27/b8/a3/27b8a37f-a947-b98d-e922-9452fcdbe50b/mzaf_892619016481388971.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000116",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000116",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 3,
                                "releaseDate": "1990-10-03",
                                "durationInMillis": 278554,
                                "isrc": "JPBM00805003",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/easy-come-easy-go/283000073?i=283000116",
                                "playParams": {
                                    "id": "283000116",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "Easy Come, Easy Go!",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/4b/a5/b9/4ba5b9d0-63b2-5f4e-d263-533f54e707bc/mzaf_4267871420543208362.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000121",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000121",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 4,
                                "releaseDate": "1991-03-27",
                                "durationInMillis": 259141,
                                "isrc": "JPBM00805004",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/lady-navigation/283000073?i=283000121",
                                "playParams": {
                                    "id": "283000121",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "LADY NAVIGATION",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/9b/27/c6/9b27c621-e033-0b5e-91d8-4c9340339b1e/mzaf_4051041125887373432.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000128",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000128",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 5,
                                "releaseDate": "2008-06-18",
                                "durationInMillis": 358351,
                                "isrc": "JPBM00805005",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/alone/283000073?i=283000128",
                                "playParams": {
                                    "id": "283000128",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ALONE",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/aa/88/df/aa88dfa7-1845-a79f-65c3-9ef1fb894def/mzaf_6171150850819265853.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000134",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000134",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 6,
                                "releaseDate": "1992-10-07",
                                "durationInMillis": 288302,
                                "isrc": "JPBM00805006",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/zero/283000073?i=283000134",
                                "playParams": {
                                    "id": "283000134",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ZERO",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/55/e4/40/55e4405c-fe9a-a1b2-ef8d-d0d91a42682a/mzaf_3557724539005683879.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000140",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000140",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 7,
                                "releaseDate": "1992-12-09",
                                "durationInMillis": 334144,
                                "isrc": "JPBM00805007",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%81%84%E3%81%A4%E3%81%8B%E3%81%AE%E3%83%A1%E3%83%AA%E3%83%BC%E3%82%AF%E3%83%AA%E3%82%B9%E3%83%9E%E3%82%B9/283000073?i=283000140",
                                "playParams": {
                                    "id": "283000140",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "いつかのメリークリスマス",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/4d/0a/39/4d0a39c5-09f1-6cd0-00ec-eec7baccf6f9/mzaf_2328992746598592071.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000145",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000145",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 8,
                                "releaseDate": "1993-03-17",
                                "durationInMillis": 235232,
                                "isrc": "JPBM00805008",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E6%84%9B%E3%81%AE%E3%81%BE%E3%81%BE%E3%81%AB%E3%82%8F%E3%81%8C%E3%81%BE%E3%81%BE%E3%81%AB-%E5%83%95%E3%81%AF%E5%90%9B%E3%81%A0%E3%81%91%E3%82%92%E5%82%B7%E3%81%A4%E3%81%91%E3%81%AA%E3%81%84/283000073?i=283000145",
                                "playParams": {
                                    "id": "283000145",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "愛のままにわがままに 僕は君だけを傷つけない",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/b8/56/f0/b856f08b-b402-93f9-c7ee-75297a9634de/mzaf_5822043827315744146.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000149",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000149",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 9,
                                "releaseDate": "1993-06-02",
                                "durationInMillis": 264719,
                                "isrc": "JPBM00805009",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E8%A3%B8%E8%B6%B3%E3%81%AE%E5%A5%B3%E7%A5%9E/283000073?i=283000149",
                                "playParams": {
                                    "id": "283000149",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "裸足の女神",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/4c/a8/2c/4ca82cee-afed-c448-d182-37bb28605760/mzaf_11873762874783215889.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000151",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000151",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 10,
                                "releaseDate": "1995-05-31",
                                "durationInMillis": 207398,
                                "isrc": "JPBM00805010",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%81%AD%E3%81%8C%E3%81%84/283000073?i=283000151",
                                "playParams": {
                                    "id": "283000151",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ねがい",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/ca/ce/d2/caced2db-dac8-8eaf-ab87-e763436d41bb/mzaf_10394475427852778389.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000154",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000154",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 11,
                                "releaseDate": "1995-07-07",
                                "durationInMillis": 197197,
                                "isrc": "JPBM00805011",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/love-me-i-love-you/283000073?i=283000154",
                                "playParams": {
                                    "id": "283000154",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "love me, I love you",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/89/7d/0d/897d0dab-921d-c64c-9c7f-30c940176b3b/mzaf_11880311714578689083.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000158",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000158",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 12,
                                "releaseDate": "1995-10-11",
                                "durationInMillis": 277847,
                                "isrc": "JPBM00805012",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/love-phantom/283000073?i=283000158",
                                "playParams": {
                                    "id": "283000158",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "LOVE PHANTOM",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/48/7d/19/487d192f-ae8f-18af-4126-80671fa0cd8a/mzaf_5936532717698931733.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000163",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000163",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 13,
                                "releaseDate": "1996-03-09",
                                "durationInMillis": 278164,
                                "isrc": "JPBM00805013",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%83%9F%E3%82%A8%E3%83%8A%E3%82%A4%E3%83%81%E3%82%AB%E3%83%A9-invisible-one/283000073?i=283000163",
                                "playParams": {
                                    "id": "283000163",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ミエナイチカラ 〜INVISIBLE ONE〜",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/81/ff/c8/81ffc839-bdb3-3e13-9b85-b0cfa30748de/mzaf_15974577907308628444.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000167",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000167",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 14,
                                "releaseDate": "1997-11-19",
                                "durationInMillis": 353170,
                                "isrc": "JPBM00805014",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/calling/283000073?i=283000167",
                                "playParams": {
                                    "id": "283000167",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "Calling",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/5b/e0/8a/5be08a92-29cf-f1a9-62b1-e20b9050275a/mzaf_2059155166800627492.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000172",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000172",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 15,
                                "releaseDate": "1998-04-08",
                                "durationInMillis": 244384,
                                "isrc": "JPBM00805015",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%81%95%E3%81%BE%E3%82%88%E3%81%88%E3%82%8B%E8%92%BC%E3%81%84%E5%BC%BE%E4%B8%B8/283000073?i=283000172",
                                "playParams": {
                                    "id": "283000172",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "さまよえる蒼い弾丸",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/3e/ee/ed/3eeeedd1-eb3b-22aa-4303-397656c1c5f2/mzaf_15894679202637424560.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000176",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000176",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 1,
                                "releaseDate": "1998-07-08",
                                "durationInMillis": 259144,
                                "isrc": "JPBM00805016",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/home/283000073?i=283000176",
                                "playParams": {
                                    "id": "283000176",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "HOME",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/2f/b6/41/2fb64116-313f-e663-4781-9028df029b1b/mzaf_12931330346110155513.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000180",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000180",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 2,
                                "releaseDate": "1999-06-09",
                                "durationInMillis": 237157,
                                "isrc": "JPBM00805017",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%82%AE%E3%83%AA%E3%82%AE%E3%83%AAchop/283000073?i=283000180",
                                "playParams": {
                                    "id": "283000180",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ギリギリchop",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/92/40/2e/92402e93-00c6-9f9f-3922-2c432198d447/mzaf_16215780478281309936.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000183",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000183",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 3,
                                "releaseDate": "2000-02-09",
                                "durationInMillis": 248823,
                                "isrc": "JPBM00805018",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/283000073?i=283000183",
                                "playParams": {
                                    "id": "283000183",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "今夜月の見える丘に",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/b9/be/53/b9be5367-8571-7b15-0e2a-b58e660c0bd5/mzaf_10765349844474317131.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000187",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000187",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 4,
                                "releaseDate": "2000-07-12",
                                "durationInMillis": 238002,
                                "isrc": "JPBM00805019",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/juice/283000073?i=283000187",
                                "playParams": {
                                    "id": "283000187",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "juice",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/aa/91/0b/aa910b35-a28f-c605-28b5-4ffffa4c6229/mzaf_17384298869559685117.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000191",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000191",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 5,
                                "releaseDate": "2001-03-14",
                                "durationInMillis": 221335,
                                "isrc": "JPBM00805020",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/ultra-soul/283000073?i=283000191",
                                "playParams": {
                                    "id": "283000191",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "ultra soul",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/8b/21/dc/8b21dcb3-f557-9832-2a34-3cc8e1db8868/mzaf_14521386775521914886.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000194",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000194",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 6,
                                "releaseDate": "2002-06-05",
                                "durationInMillis": 245533,
                                "isrc": "JPBM00805021",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E7%86%B1%E3%81%8D%E9%BC%93%E5%8B%95%E3%81%AE%E6%9E%9C%E3%81%A6/283000073?i=283000194",
                                "playParams": {
                                    "id": "283000194",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "熱き鼓動の果て",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/11/43/d0/1143d0fe-1e8e-5fc6-d93f-6f7133850b95/mzaf_16723506345757005642.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000197",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000197",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 7,
                                "releaseDate": "2003-03-26",
                                "durationInMillis": 237883,
                                "isrc": "JPBM00805022",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/its-showtime/283000073?i=283000197",
                                "playParams": {
                                    "id": "283000197",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "IT'S SHOWTIME!!",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/48/9d/10/489d1068-0539-32b0-3a58-84feb1c6c966/mzaf_2514394422699192888.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000199",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000199",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 8,
                                "releaseDate": "2004-05-05",
                                "durationInMillis": 227215,
                                "isrc": "JPBM00805023",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/banzai/283000073?i=283000199",
                                "playParams": {
                                    "id": "283000199",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "BANZAI",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/5b/f0/5a/5bf05af4-5795-908a-9327-a84b9bf0344d/mzaf_4118405068698009331.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000203",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000203",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "アフリカ",
                                    "アフロビート",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 9,
                                "releaseDate": "2005-03-09",
                                "durationInMillis": 261980,
                                "isrc": "JPBM00805024",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E6%84%9B%E3%81%AE%E3%83%90%E3%82%AF%E3%83%80%E3%83%B3/283000073?i=283000203",
                                "playParams": {
                                    "id": "283000203",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "愛のバクダン",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/38/56/42/38564277-e3c7-8892-4a38-363e02982c1c/mzaf_7931602334840061919.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000206",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000206",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 10,
                                "releaseDate": "2005-08-10",
                                "durationInMillis": 325198,
                                "isrc": "JPBM00805025",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/ocean/283000073?i=283000206",
                                "playParams": {
                                    "id": "283000206",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "OCEAN",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/13/79/e4/1379e4b2-135a-82d9-89d4-62c76ba9d7a5/mzaf_4622046857049795843.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000209",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000209",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 11,
                                "releaseDate": "2006-01-25",
                                "durationInMillis": 193303,
                                "isrc": "JPBM00805026",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E8%A1%9D%E5%8B%95/283000073?i=283000209",
                                "playParams": {
                                    "id": "283000209",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "衝動",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/f1/eb/19/f1eb1939-26de-6146-c12d-57e6ae0b96f2/mzaf_6872363229656617418.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000211",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000211",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 12,
                                "releaseDate": "2006-06-07",
                                "durationInMillis": 211403,
                                "isrc": "JPBM00805027",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/splash/283000073?i=283000211",
                                "playParams": {
                                    "id": "283000211",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "SPLASH!",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/dd/8a/f9/dd8af95a-d7f8-9267-42f0-5a4ec7035be0/mzaf_1072998915713595128.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000215",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000215",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート"
                                ],
                                "trackNumber": 13,
                                "releaseDate": "2007-05-09",
                                "durationInMillis": 306787,
                                "isrc": "JPBM00805028",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E6%B0%B8%E9%81%A0%E3%81%AE%E7%BF%BC/283000073?i=283000215",
                                "playParams": {
                                    "id": "283000215",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "永遠の翼",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/fa/de/4c/fade4cd6-4a5c-7b28-257a-d8da822461ed/mzaf_559845820496670159.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000218",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000218",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック",
                                    "ポップ",
                                    "ポップ / ロック"
                                ],
                                "trackNumber": 14,
                                "releaseDate": "2007-10-03",
                                "durationInMillis": 238469,
                                "isrc": "JPBM00805029",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/super-love-song/283000073?i=283000218",
                                "playParams": {
                                    "id": "283000218",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "SUPER LOVE SONG",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/bc/f1/bc/bcf1bc26-1be6-c7bc-e0a3-2a7f971bb02c/mzaf_8776164769843508828.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "283000222",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/283000222",
                            "attributes": {
                                "albumName": "B'z The Best “ULTRA Pleasure”",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop",
                                    "ワールド ",
                                    "J ポップ",
                                    "ポップ",
                                    "ポップ / ロック",
                                    "アフリカ",
                                    "アフロビート",
                                    "サウンドトラック",
                                    "サウンドトラック"
                                ],
                                "trackNumber": 15,
                                "releaseDate": "1991-03-27",
                                "durationInMillis": 285756,
                                "isrc": "JPBM00805030",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "b31319",
                                    "textColor1": "fff9f9",
                                    "textColor2": "e3cccd",
                                    "textColor3": "efcbcc",
                                    "textColor4": "daa7a9"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/pleasure-2008-%E4%BA%BA%E7%94%9F%E3%81%AE%E5%BF%AB%E6%A5%BD/283000073?i=283000222",
                                "playParams": {
                                    "id": "283000222",
                                    "kind": "song"
                                },
                                "discNumber": 2,
                                "hasLyrics": true,
                                "isAppleDigitalMaster": false,
                                "name": "Pleasure 2008 ~人生の快楽~",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/75/7e/8e/757e8ea7-2cd2-9230-6216-f05a4b646721/mzaf_3980145666140894443.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        }
                    ]
                },
                "artists": {
                    "href": "/v1/catalog/jp/albums/283000073/artists",
                    "data": [
                        {
                            "id": "74931253",
                            "type": "artists",
                            "href": "/v1/catalog/jp/artists/74931253"
                        }
                    ]
                }
            }
        }
    ]
}

3. 楽曲 ID で検索する

アルバム内に含まれていた楽曲 ID「283000183」を使って楽曲の情報を取得します。

今度はこちらを参考にして URL を「https://api.music.apple.com/v1/catalog/jp/songs/283000183」としました。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/songs/283000183"

で、返ってきたのがこちら。

あくまで先ほど取得したアルバム「B'z The Best “ULTRA Pleasure」の中の一曲として返ってきている様です。

{
    "data": [
        {
            "id": "283000183",
            "type": "songs",
            "href": "/v1/catalog/jp/songs/283000183",
            "attributes": {
                "albumName": "B'z The Best “ULTRA Pleasure”",
                "genreNames": [
                    "ロック",
                    "ミュージック",
                    "J-Pop",
                    "ワールド ",
                    "J ポップ",
                    "サウンドトラック",
                    "サウンドトラック",
                    "ポップ",
                    "ポップ / ロック",
                    "アフリカ",
                    "アフロビート"
                ],
                "trackNumber": 3,
                "durationInMillis": 248823,
                "releaseDate": "2000-02-09",
                "isrc": "JPBM00805018",
                "artwork": {
                    "width": 2400,
                    "height": 2400,
                    "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                    "bgColor": "b31319",
                    "textColor1": "fff9f9",
                    "textColor2": "e3cccd",
                    "textColor3": "efcbcc",
                    "textColor4": "daa7a9"
                },
                "composerName": "松本孝弘",
                "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/283000073?i=283000183",
                "playParams": {
                    "id": "283000183",
                    "kind": "song"
                },
                "discNumber": 2,
                "hasLyrics": true,
                "isAppleDigitalMaster": false,
                "name": "今夜月の見える丘に",
                "previews": [
                    {
                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/b9/be/53/b9be5367-8571-7b15-0e2a-b58e660c0bd5/mzaf_10765349844474317131.plus.aac.p.m4a"
                    }
                ],
                "artistName": "B'z"
            },
            "relationships": {
                "albums": {
                    "href": "/v1/catalog/jp/songs/283000183/albums",
                    "data": [
                        {
                            "id": "283000073",
                            "type": "albums",
                            "href": "/v1/catalog/jp/albums/283000073"
                        }
                    ]
                },
                "artists": {
                    "href": "/v1/catalog/jp/songs/283000183/artists",
                    "data": [
                        {
                            "id": "74931253",
                            "type": "artists",
                            "href": "/v1/catalog/jp/artists/74931253"
                        }
                    ]
                }
            }
        }
    ]
}

4. 曲名で検索

シングル版の「今夜月の見える丘に」もあるはずなので、とりあえず曲名で検索してみます。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/search?term=今夜月の見える丘に"

たくさん返ってきました。ピアノインスト版も含まれています。

下記データをよくみると、results の下の階層で songs、albums、artists と分かれています。

{
    "results": {
        "songs": {
            "href": "/v1/catalog/jp/search?limit=5&term=%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB&types=songs",
            "next": "/v1/catalog/jp/search?offset=5&term=%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB&types=songs",
            "data": [
                {
                    "id": "283000183",
                    "type": "songs",
                    "href": "/v1/catalog/jp/songs/283000183",
                    "attributes": {
                        "albumName": "B'z The Best “ULTRA Pleasure”",
                        "genreNames": [
                            "ロック",
                            "ミュージック",
                            "J-Pop",
                            "ワールド ",
                            "J ポップ",
                            "サウンドトラック",
                            "サウンドトラック",
                            "ポップ",
                            "ポップ / ロック",
                            "アフリカ",
                            "アフロビート"
                        ],
                        "trackNumber": 3,
                        "releaseDate": "2000-02-09",
                        "durationInMillis": 248823,
                        "isrc": "JPBM00805018",
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c8/33/0f/c8330fd7-b55f-adf3-5eac-70785a8eee75/BMCV_8022.jpg/{w}x{h}bb.jpg",
                            "bgColor": "b31319",
                            "textColor1": "fff9f9",
                            "textColor2": "e3cccd",
                            "textColor3": "efcbcc",
                            "textColor4": "daa7a9"
                        },
                        "composerName": "松本孝弘",
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/283000073?i=283000183",
                        "playParams": {
                            "id": "283000183",
                            "kind": "song"
                        },
                        "discNumber": 2,
                        "isAppleDigitalMaster": false,
                        "hasLyrics": true,
                        "name": "今夜月の見える丘に",
                        "previews": [
                            {
                                "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/b9/be/53/b9be5367-8571-7b15-0e2a-b58e660c0bd5/mzaf_10765349844474317131.plus.aac.p.m4a"
                            }
                        ],
                        "artistName": "B'z"
                    }
                },
                {
                    "id": "1560094045",
                    "type": "songs",
                    "href": "/v1/catalog/jp/songs/1560094045",
                    "attributes": {
                        "albumName": "今夜月の見える丘に - Single",
                        "genreNames": [
                            "ロック",
                            "ミュージック",
                            "J-Pop"
                        ],
                        "trackNumber": 1,
                        "releaseDate": "2000-02-09",
                        "durationInMillis": 248667,
                        "isrc": "JPBM09901114",
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                            "bgColor": "000000",
                            "textColor1": "fffffd",
                            "textColor2": "e5e5e5",
                            "textColor3": "cbcbca",
                            "textColor4": "b7b7b7"
                        },
                        "composerName": "松本孝弘",
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/1560094041?i=1560094045",
                        "playParams": {
                            "id": "1560094045",
                            "kind": "song"
                        },
                        "discNumber": 1,
                        "isAppleDigitalMaster": false,
                        "hasLyrics": true,
                        "name": "今夜月の見える丘に",
                        "previews": [
                            {
                                "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/68/f5/16/68f516f1-01dd-6bfc-6e8e-c6e3cc746294/mzaf_737226102774676319.plus.aac.p.m4a"
                            }
                        ],
                        "artistName": "B'z"
                    }
                },
                {
                    "id": "666634433",
                    "type": "songs",
                    "href": "/v1/catalog/jp/songs/666634433",
                    "attributes": {
                        "albumName": "B'z The Best XXV 1999-2012",
                        "genreNames": [
                            "ロック",
                            "ミュージック"
                        ],
                        "trackNumber": 2,
                        "durationInMillis": 248600,
                        "releaseDate": "2000-02-09",
                        "isrc": "JPBM09901114",
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is1-ssl.mzstatic.com/image/thumb/Music114/v4/7f/40/d5/7f40d515-4618-1d1c-877e-a3089981b327/BMCV_8042.jpg/{w}x{h}bb.jpg",
                            "bgColor": "000000",
                            "textColor1": "fffffd",
                            "textColor2": "d4fb01",
                            "textColor3": "cbcbca",
                            "textColor4": "a9c900"
                        },
                        "composerName": "松本孝弘",
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/666634430?i=666634433",
                        "playParams": {
                            "id": "666634433",
                            "kind": "song"
                        },
                        "discNumber": 1,
                        "isAppleDigitalMaster": false,
                        "hasLyrics": true,
                        "name": "今夜月の見える丘に",
                        "previews": [
                            {
                                "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/ab/55/35/ab5535ca-e21a-c757-9620-be3cbaa0a0fa/mzaf_3411343503929317375.plus.aac.p.m4a"
                            }
                        ],
                        "artistName": "B'z"
                    }
                },
                {
                    "id": "75363013",
                    "type": "songs",
                    "href": "/v1/catalog/jp/songs/75363013",
                    "attributes": {
                        "albumName": "ELEVEN",
                        "genreNames": [
                            "ロック",
                            "ミュージック",
                            "J-Pop"
                        ],
                        "trackNumber": 14,
                        "releaseDate": "2000-02-09",
                        "durationInMillis": 249629,
                        "isrc": "JPBM00001120",
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is2-ssl.mzstatic.com/image/thumb/Music124/v4/26/37/88/263788a4-fae1-dbfd-fcf8-8d58eba2e6a9/BMCR-7046.jpg/{w}x{h}bb.jpg",
                            "bgColor": "000000",
                            "textColor1": "fdfeff",
                            "textColor2": "fafdea",
                            "textColor3": "cacbcb",
                            "textColor4": "c8cabb"
                        },
                        "composerName": "松本孝弘",
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB-alternative-guitar-solo-ver/75363205?i=75363013",
                        "playParams": {
                            "id": "75363013",
                            "kind": "song"
                        },
                        "discNumber": 1,
                        "isAppleDigitalMaster": false,
                        "hasLyrics": true,
                        "name": "今夜月の見える丘に (Alternative Guitar Solo ver.)",
                        "previews": [
                            {
                                "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/97/b4/9f/97b49f3e-a6ba-2dff-078a-349e84a85163/mzaf_10665736781832925052.plus.aac.p.m4a"
                            }
                        ],
                        "artistName": "B'z"
                    }
                },
                {
                    "id": "393492969",
                    "type": "songs",
                    "href": "/v1/catalog/jp/songs/393492969",
                    "attributes": {
                        "albumName": "12のラブ・ストーリー ピアノ・インテリア",
                        "genreNames": [
                            "インストゥルメンタル",
                            "ミュージック",
                            "J-Pop"
                        ],
                        "trackNumber": 9,
                        "durationInMillis": 290333,
                        "releaseDate": "2001-01-24",
                        "isrc": "JPKI00046130",
                        "artwork": {
                            "width": 941,
                            "height": 941,
                            "url": "https://is1-ssl.mzstatic.com/image/thumb/Music/c8/f2/d0/mzi.ldzduogi.jpg/{w}x{h}bb.jpg",
                            "bgColor": "ffffff",
                            "textColor1": "090909",
                            "textColor2": "212121",
                            "textColor3": "3a3a3a",
                            "textColor4": "4d4d4d"
                        },
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/393492914?i=393492969",
                        "playParams": {
                            "id": "393492969",
                            "kind": "song"
                        },
                        "discNumber": 1,
                        "hasLyrics": false,
                        "isAppleDigitalMaster": false,
                        "name": "今夜月の見える丘に",
                        "previews": [
                            {
                                "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview125/v4/2c/1d/04/2c1d0460-7f64-46bf-c501-416266565965/mzaf_14225783347699209617.plus.aac.p.m4a"
                            }
                        ],
                        "artistName": "平野孝幸"
                    }
                }
            ]
        },
        "albums": {
            "href": "/v1/catalog/jp/search?limit=5&term=%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB&types=albums",
            "data": [
                {
                    "id": "1560094041",
                    "type": "albums",
                    "href": "/v1/catalog/jp/albums/1560094041",
                    "attributes": {
                        "copyright": "℗ VERMILLION RECORDS",
                        "genreNames": [
                            "ロック",
                            "ミュージック",
                            "J-Pop"
                        ],
                        "releaseDate": "2000-02-09",
                        "isMasteredForItunes": false,
                        "upc": "4938068101185",
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                            "bgColor": "000000",
                            "textColor1": "fffffd",
                            "textColor2": "e5e5e5",
                            "textColor3": "cbcbca",
                            "textColor4": "b7b7b7"
                        },
                        "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB-single/1560094041",
                        "playParams": {
                            "id": "1560094041",
                            "kind": "album"
                        },
                        "recordLabel": "VERMILLION RECORDS",
                        "trackCount": 2,
                        "isCompilation": false,
                        "isSingle": false,
                        "name": "今夜月の見える丘に - Single",
                        "artistName": "B'z",
                        "isComplete": true
                    }
                }
            ]
        },
        "artists": {
            "href": "/v1/catalog/jp/search?limit=5&term=%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB&types=artists",
            "data": [
                {
                    "id": "74931253",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/74931253",
                    "attributes": {
                        "name": "B'z",
                        "genreNames": [
                            "ロック"
                        ],
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/0c/88/58/0c885888-c769-81f8-8485-069cd9a362f1/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "dcdfe6",
                            "textColor1": "000001",
                            "textColor2": "1b191e",
                            "textColor3": "2c2c2f",
                            "textColor4": "424046"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/74931253"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/74931253/albums",
                            "next": "/v1/catalog/jp/artists/74931253/albums?offset=25",
                            "data": [
                                {
                                    "id": "283000073",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/283000073"
                                },
                                {
                                    "id": "292067907",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/292067907"
                                },
                                {
                                    "id": "666625900",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666625900"
                                },
                                {
                                    "id": "75682683",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682683"
                                },
                                {
                                    "id": "1561574089",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561574089"
                                },
                                {
                                    "id": "74937562",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74937562"
                                },
                                {
                                    "id": "666634430",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666634430"
                                },
                                {
                                    "id": "75681798",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75681798"
                                },
                                {
                                    "id": "1605118558",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1605118558"
                                },
                                {
                                    "id": "75356318",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75356318"
                                },
                                {
                                    "id": "1466937136",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1466937136"
                                },
                                {
                                    "id": "74933581",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74933581"
                                },
                                {
                                    "id": "75682153",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682153"
                                },
                                {
                                    "id": "347013256",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/347013256"
                                },
                                {
                                    "id": "74935606",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74935606"
                                },
                                {
                                    "id": "75354662",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75354662"
                                },
                                {
                                    "id": "1325460835",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1325460835"
                                },
                                {
                                    "id": "454667912",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/454667912"
                                },
                                {
                                    "id": "297710855",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/297710855"
                                },
                                {
                                    "id": "1561701429",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561701429"
                                },
                                {
                                    "id": "74944705",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74944705"
                                },
                                {
                                    "id": "1567851939",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567851939"
                                },
                                {
                                    "id": "75361124",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75361124"
                                },
                                {
                                    "id": "1567852104",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567852104"
                                },
                                {
                                    "id": "75357159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75357159"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    },
    "meta": {
        "results": {
            "order": [
                "songs",
                "albums",
                "artists"
            ],
            "rawOrder": [
                "songs",
                "albums",
                "artists"
            ]
        }
    }
}

曲名が「今夜月の見える丘に - Single」となっているものがあるのでとりあえずこれがシングル版ですね。

おまけ - シングル版「今夜月の見える丘に」

検索の方法はわかったんですがシングル版の方が気になったので検索をかけてみます。

上の JSON データで、songs データにはアルバム「今夜月の見える丘に - Single」に入っている楽曲「今夜月の見える丘に」の情報と、albums データにはアルバム「今夜月の見える丘に - Single」の情報が入っていました。

まずは「今夜月の見える丘に - Single」のアルバム ID「1560094041」で検索します。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/albums/1560094041"

カップリング楽曲も含めて返ってきます。

{
    "data": [
        {
            "id": "1560094041",
            "type": "albums",
            "href": "/v1/catalog/jp/albums/1560094041",
            "attributes": {
                "copyright": "℗ VERMILLION RECORDS",
                "genreNames": [
                    "ロック",
                    "ミュージック",
                    "J-Pop"
                ],
                "releaseDate": "2000-02-09",
                "isMasteredForItunes": false,
                "upc": "4938068101185",
                "artwork": {
                    "width": 2400,
                    "height": 2400,
                    "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                    "bgColor": "000000",
                    "textColor1": "fffffd",
                    "textColor2": "e5e5e5",
                    "textColor3": "cbcbca",
                    "textColor4": "b7b7b7"
                },
                "playParams": {
                    "id": "1560094041",
                    "kind": "album"
                },
                "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB-single/1560094041",
                "recordLabel": "VERMILLION RECORDS",
                "isCompilation": false,
                "trackCount": 2,
                "isSingle": false,
                "name": "今夜月の見える丘に - Single",
                "artistName": "B'z",
                "isComplete": true
            },
            "relationships": {
                "artists": {
                    "href": "/v1/catalog/jp/albums/1560094041/artists",
                    "data": [
                        {
                            "id": "74931253",
                            "type": "artists",
                            "href": "/v1/catalog/jp/artists/74931253"
                        }
                    ]
                },
                "tracks": {
                    "href": "/v1/catalog/jp/albums/1560094041/tracks",
                    "data": [
                        {
                            "id": "1560094045",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/1560094045",
                            "attributes": {
                                "albumName": "今夜月の見える丘に - Single",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop"
                                ],
                                "trackNumber": 1,
                                "releaseDate": "2000-02-09",
                                "durationInMillis": 248667,
                                "isrc": "JPBM09901114",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "000000",
                                    "textColor1": "fffffd",
                                    "textColor2": "e5e5e5",
                                    "textColor3": "cbcbca",
                                    "textColor4": "b7b7b7"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/1560094041?i=1560094045",
                                "playParams": {
                                    "id": "1560094045",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "isAppleDigitalMaster": false,
                                "hasLyrics": true,
                                "name": "今夜月の見える丘に",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/68/f5/16/68f516f1-01dd-6bfc-6e8e-c6e3cc746294/mzaf_737226102774676319.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        },
                        {
                            "id": "1560094048",
                            "type": "songs",
                            "href": "/v1/catalog/jp/songs/1560094048",
                            "attributes": {
                                "albumName": "今夜月の見える丘に - Single",
                                "genreNames": [
                                    "ロック",
                                    "ミュージック",
                                    "J-Pop"
                                ],
                                "trackNumber": 2,
                                "releaseDate": "2000-02-09",
                                "durationInMillis": 247767,
                                "isrc": "JPBM09901117",
                                "artwork": {
                                    "width": 2400,
                                    "height": 2400,
                                    "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                                    "bgColor": "000000",
                                    "textColor1": "fffffd",
                                    "textColor2": "e5e5e5",
                                    "textColor3": "cbcbca",
                                    "textColor4": "b7b7b7"
                                },
                                "composerName": "松本孝弘",
                                "url": "https://music.apple.com/jp/album/%E3%81%A0%E3%81%8B%E3%82%89%E3%81%9D%E3%81%AE%E6%89%8B%E3%82%92%E9%9B%A2%E3%81%97%E3%81%A6-mixture-style/1560094041?i=1560094048",
                                "playParams": {
                                    "id": "1560094048",
                                    "kind": "song"
                                },
                                "discNumber": 1,
                                "isAppleDigitalMaster": false,
                                "hasLyrics": true,
                                "name": "だからその手を離して -Mixture style-",
                                "previews": [
                                    {
                                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview114/v4/f9/4d/b5/f94db5dd-2b53-49c0-4f1b-296d37a0ead9/mzaf_1661300318659944684.plus.aac.p.m4a"
                                    }
                                ],
                                "artistName": "B'z"
                            }
                        }
                    ]
                }
            }
        }
    ]
}

で、今度は楽曲としての「1560094045」で検索をかけます。URL でも ID の手前部分が「albums/」から「songs/」に変わります。

% curl -s -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/songs/1560094045"
{
    "data": [
        {
            "id": "1560094045",
            "type": "songs",
            "href": "/v1/catalog/jp/songs/1560094045",
            "attributes": {
                "albumName": "今夜月の見える丘に - Single",
                "genreNames": [
                    "ロック",
                    "ミュージック",
                    "J-Pop"
                ],
                "trackNumber": 1,
                "durationInMillis": 248667,
                "releaseDate": "2000-02-09",
                "isrc": "JPBM09901114",
                "artwork": {
                    "width": 2400,
                    "height": 2400,
                    "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/1a/9f/ab/1a9fab6f-0db2-315c-4bfe-75a40e716e25/dj.zbywctsr.jpg/{w}x{h}bb.jpg",
                    "bgColor": "000000",
                    "textColor1": "fffffd",
                    "textColor2": "e5e5e5",
                    "textColor3": "cbcbca",
                    "textColor4": "b7b7b7"
                },
                "composerName": "松本孝弘",
                "url": "https://music.apple.com/jp/album/%E4%BB%8A%E5%A4%9C%E6%9C%88%E3%81%AE%E8%A6%8B%E3%81%88%E3%82%8B%E4%B8%98%E3%81%AB/1560094041?i=1560094045",
                "playParams": {
                    "id": "1560094045",
                    "kind": "song"
                },
                "discNumber": 1,
                "hasLyrics": true,
                "isAppleDigitalMaster": false,
                "name": "今夜月の見える丘に",
                "previews": [
                    {
                        "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview124/v4/68/f5/16/68f516f1-01dd-6bfc-6e8e-c6e3cc746294/mzaf_737226102774676319.plus.aac.p.m4a"
                    }
                ],
                "artistName": "B'z"
            },
            "relationships": {
                "artists": {
                    "href": "/v1/catalog/jp/songs/1560094045/artists",
                    "data": [
                        {
                            "id": "74931253",
                            "type": "artists",
                            "href": "/v1/catalog/jp/artists/74931253"
                        }
                    ]
                },
                "albums": {
                    "href": "/v1/catalog/jp/songs/1560094045/albums",
                    "data": [
                        {
                            "id": "1560094041",
                            "type": "albums",
                            "href": "/v1/catalog/jp/albums/1560094041"
                        }
                    ]
                }
            }
        }
    ]
}

とりあえずこんな感じです。

PyJWT で Apple Music API の Developer Token を作成する

下記を参考にしつつ、Developer Token の作成と Apple 公式のテスト URL での確認を行いました。

手順をメモしておきますが、前提として Apple Developer で Media ID と秘密鍵の作成が終わっている必要があります。

  1. PyJWT と cryptography のインストール
  2. 秘密鍵ファイルの確認
  3. Developer Token の作成
  4. curl コマンドでアクセス確認
  5. B'z を検索してみる

PyJWT と cryptography のインストール

まず pip で PyJWT をインストールします。

% pip install pyjwt
Collecting pyjwt
  Downloading https://files.pythonhosted.org/packages/40/46/505f0dd53c14096f01922bf93a7abb4e40e29a06f858abbaa791e6954324/PyJWT-2.6.0-py3-none-any.whl
Installing collected packages: pyjwt
Successfully installed pyjwt-2.6.0

そして cryptography もインストールします。Apple 指定の ES256 での処理には必要だそうです。

% pip install cryptography
Collecting cryptography
  Downloading cryptography-38.0.3-cp36-abi3-macosx_10_10_x86_64.whl (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 12.3 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.9/178.9 kB 817.2 kB/s eta 0:00:00
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.15.1 cryptography-38.0.3 pycparser-2.21

秘密鍵ファイルの確認

今回は秘密鍵作成時にダウンロードした .p8 ファイルから直接秘密鍵を読み込んで使います。

一旦ファイルが読み込めるか確認します。不慣れなので。。。

>>> f = open('AuthKey_A1BC2DE34F.p8','r')
>>> f.read()
'-----BEGIN PRIVATE KEY-----\nMIGTBgEBMCMGCyqGSM49BgEGBBqGSM49BwEHCHkwdwICBQQg1nVJd1PhibK9odZT\n3yzf1MzRHmtSx2qXmqU5458MW/BgBgYIKoZIzj1DBQehRBNBBBSIDgBHsm//5jXy\nDTqW3JQmqbwwDhMEOb1fk+Cd6Gc681B3CtSubCz5bm9zcO/kMpasgLhM4CTmYoJE\nmMhVfb7q\n-----END PRIVATE KEY-----'
>>> 

無事、ファイルが読み込まれていますね。秘密鍵はダミーのものに書き換えてあります。

Developer Token の作成

では仕切り直してもう一度。

jwt の encode メソッドを実行して、ヘッダ、ペイロード、サインの 3 つがエンコード & 「.」で連結された文字列を吐き出します。これが Developer Token になります。

ヘッダーとペイロードに渡す内容はこちらを、コードの書き方についてはこちらを参考にしています。

>>> import jwt
>>> f = open('AuthKey_A1BC2DE34F.p8','r')
>>> key = f.read()
>>> jwt.encode(
...     {"iss": "Z98Y76543X","iat": 1667892347,"exp": 1667978747},
...     key,
...     algorithm = "ES256",
...     headers = {"kid": "A1BC2DE34F"}
... )
'eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB'
>>> 

Apple の公式ドキュメントに記載のサンプルコードに当てはめて curl コマンドを実行します。

curl コマンドでアクセステスト

% curl -v -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/test"

重要なのは後半、HTTP のレスポンスが「200」で返ってきている部分です。

*   Trying 23.56.16.9:443...
* Connected to api.music.apple.com (23.56.16.9) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: businessCategory=Private Organization; jurisdictionCountryName=US; jurisdictionStateOrProvinceName=California; serialNumber=C0806592; C=US; ST=California; L=Cupertino; O=Apple Inc.; OU=management:idms.group.1208920; CN=itunes.apple.com
*  start date: Apr 25 16:27:49 2022 GMT
*  expire date: May 25 16:27:48 2023 GMT
*  subjectAltName: host "api.music.apple.com" matched cert's "api.music.apple.com"
*  issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 2 - G1
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fb56e811c00)
> GET /v1/test HTTP/2
> Host: api.music.apple.com
> user-agent: curl/7.79.1
> accept: */*
> authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB
> 
< HTTP/2 200 
< server: 4.0.0
< content-type: application/json
< content-length: 0
< x-apple-jingle-correlation-key: Y4JI7FBYVWF6I6MSJMT6OBPQMQ
< x-apple-request-uuid: c7128f94-38ad-8be4-7992-4b27e705f064
< b3: c7128f9438ad8be479924b27e705f064-382f7c8a2052e4cc
< x-b3-traceid: c7128f9438ad8be479924b27e705f064
< x-b3-spanid: 382f7c8a2052e4cc
< apple-seq: 0.0
< apple-tk: false
< apple-originating-system: MZStorePlatform
< x-apple-application-site: ST11
< x-apple-application-instance: 2534168
< x-responding-instance: MZStorePlatform:2534168:::
< apple-timing-app: 7 ms
< access-control-allow-origin: *
< strict-transport-security: max-age=31536000; includeSubDomains
< is-jetty: true
< x-apple-lokamai-no-cache: true
< x-daiquiri-instance: daiquiri:41896001:st53p00it-qujn12040301:7987:22RELEASE167:daiquiri-amp-store-l7shared-int-001-st
< x-daiquiri-instance: daiquiri:42282006:st53p00it-qujn15040502:7987:22RELEASE167:daiquiri-amp-store-l7shared-ext-001-st
< expires: Tue, 08 Nov 2022 11:30:33 GMT
< cache-control: max-age=0, no-cache, private
< pragma: no-cache
< date: Tue, 08 Nov 2022 11:30:33 GMT
< x-cache: TCP_MISS from a23-55-45-84.deploy.akamaitechnologies.com (AkamaiGHost/10.10.1-44825277) (-)
< vary: Accept-Encoding
< vary: Accept-Encoding
< 
* Connection #0 to host api.music.apple.com left intact
% 

ついでに URL の部分を検索用のものに変えてみます。

「"https://api.music.apple.com/v1/catalog/jp/search?term=B'z&types=artists"」

で、実行。

% curl -v -H 'Authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB' "https://api.music.apple.com/v1/catalog/jp/search?term=B'z&types=artists"

するとレスポンスの最後、B'z にまつわる情報が返ってきているのが分かるかと思います。

*   Trying 23.56.16.9:443...
* Connected to api.music.apple.com (23.56.16.9) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: businessCategory=Private Organization; jurisdictionCountryName=US; jurisdictionStateOrProvinceName=California; serialNumber=C0806592; C=US; ST=California; L=Cupertino; O=Apple Inc.; OU=management:idms.group.1208920; CN=itunes.apple.com
*  start date: Apr 25 16:27:49 2022 GMT
*  expire date: May 25 16:27:48 2023 GMT
*  subjectAltName: host "api.music.apple.com" matched cert's "api.music.apple.com"
*  issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 2 - G1
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fedf900b600)
> GET /v1/catalog/jp/search?term=B'z&types=artists HTTP/2
> Host: api.music.apple.com
> user-agent: curl/7.79.1
> accept: */*
> authorization: Bearer eyJhbGc_o_JFUzIoN_IsImtpZBI6Iks3XEs1XUI1oFE_LBJoeXB_o_JKVoQ_fQ.eyJpc3M_o_JaoXlENXc3MjZUI_w_aWFoIjoxNDM3MXc5MDM1LBJleHB_ojEooXMyoXgxMDA9.QgQS5gv75mSJMw5Hw5rIoUFUx1-IYyXIsau_Lkv6oMS-GKeLk_XuIWW6aRZ-Ex3-7KUAzMJIR5yHznvw5XIkkB
> 
< HTTP/2 200 
< server: 4.0.0
< content-type: application/json;charset=utf-8
< x-apple-jingle-correlation-key: JOSXR57OF2OG2ZRUJKOEOZVJRA
< x-apple-request-uuid: 4ba578f7-ee2e-9c6d-6634-4a9c4766a988
< b3: 4ba578f7ee2e9c6d66344a9c4766a988-0b03f71f5b294b1c
< x-b3-traceid: 4ba578f7ee2e9c6d66344a9c4766a988
< x-b3-spanid: 0b03f71f5b294b1c
< apple-seq: 0.0
< apple-tk: false
< apple-originating-system: MZStorePlatform
< x-apple-application-site: ST11
< x-apple-application-instance: 2534673
< x-responding-instance: MZStorePlatform:2534673:::
< apple-timing-app: 88 ms
< access-control-allow-origin: *
< strict-transport-security: max-age=31536000; includeSubDomains
< is-jetty: true
< x-daiquiri-instance: daiquiri:41896004:st53p00it-qujn15040101:7987:22RELEASE167:daiquiri-amp-store-l7shared-int-001-st
< x-daiquiri-instance: daiquiri:42282002:st53p00it-qujn13050102:7987:22RELEASE167:daiquiri-amp-store-l7shared-ext-001-st
< cache-control: public, no-transform, max-age=29
< date: Wed, 09 Nov 2022 00:22:40 GMT
< content-length: 8620
< x-cache: TCP_HIT from a23-55-45-84.deploy.akamaitechnologies.com (AkamaiGHost/10.10.1-44825277) (-)
< vary: Accept-Encoding
< vary: Accept-Encoding
< 
{"results":{"artists":{"href":"/v1/catalog/jp/search?limit=5&term=B%27z&types=artists","next":"/v1/catalog/jp/search?offset=5&term=B%27z&types=artists","data":[{"id":"74931253","type":"artists","href":"/v1/catalog/jp/artists/74931253","attributes":{"name":"B'z","genreNames":["ロック"],"artwork":{"width":2400,"height":2400,"url":"https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/0c/88/58/0c885888-c769-81f8-8485-069cd9a362f1/pr_source.png/{w}x{h}bb.jpg","bgColor":"dcdfe6","textColor1":"000001","textColor2":"1b191e","textColor3":"2c2c2f","textColor4":"424046"},"url":"https://music.apple.com/jp/artist/bz/74931253"},"relationships":{"albums":{"href":"/v1/catalog/jp/artists/74931253/albums","next":"/v1/catalog/jp/artists/74931253/albums?offset=25","data":[{"id":"283000073","type":"albums","href":"/v1/catalog/jp/albums/283000073"},{"id":"292067907","type":"albums","href":"/v1/catalog/jp/albums/292067907"},{"id":"666625900","type":"albums","href":"/v1/catalog/jp/albums/666625900"},{"id":"75682683","type":"albums","href":"/v1/catalog/jp/albums/75682683"},{"id":"1561574089","type":"albums","href":"/v1/catalog/jp/albums/1561574089"},{"id":"74937562","type":"albums","href":"/v1/catalog/jp/albums/74937562"},{"id":"666634430","type":"albums","href":"/v1/catalog/jp/albums/666634430"},{"id":"75681798","type":"albums","href":"/v1/catalog/jp/albums/75681798"},{"id":"1605118558","type":"albums","href":"/v1/catalog/jp/albums/1605118558"},{"id":"75356318","type":"albums","href":"/v1/catalog/jp/albums/75356318"},{"id":"1466937136","type":"albums","href":"/v1/catalog/jp/albums/1466937136"},{"id":"74933581","type":"albums","href":"/v1/catalog/jp/albums/74933581"},{"id":"75682153","type":"albums","href":"/v1/catalog/jp/albums/75682153"},{"id":"347013256","type":"albums","href":"/v1/catalog/jp/albums/347013256"},{"id":"74935606","type":"albums","href":"/v1/catalog/jp/albums/74935606"},{"id":"75354662","type":"albums","href":"/v1/catalog/jp/albums/75354662"},{"id":"1325460835","type":"albums","href":"/v1/catalog/jp/albums/1325460835"},{"id":"454667912","type":"albums","href":"/v1/catalog/jp/albums/454667912"},{"id":"297710855","type":"albums","href":"/v1/catalog/jp/albums/297710855"},{"id":"1561701429","type":"albums","href":"/v1/catalog/jp/albums/1561701429"},{"id":"74944705","type":"albums","href":"/v1/catalog/jp/albums/74944705"},{"id":"1567851939","type":"albums","href":"/v1/catalog/jp/albums/1567851939"},{"id":"75361124","type":"albums","href":"/v1/catalog/jp/albums/75361124"},{"id":"1567852104","type":"albums","href":"/v1/catalog/jp/albums/1567852104"},{"id":"75357159","type":"albums","href":"/v1/catalog/jp/albums/75357159"}]}}},{"id":"1236215587","type":"artists","href":"/v1/catalog/jp/artists/1236215587","attributes":{"name":"BZ","genreNames":["ヒップホップ/ラップ"],"artwork":{"width":3000,"height":3000,"url":"https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/ae/b6/fb/aeb6fb97-56ba-e8fd-083f-f8c21970a74f/artwork.jpg/{w}x{h}ac.jpg","bgColor":"0f1050","textColor1":"d6bcf7","textColor2":"9dafdf","textColor3":"ae99d5","textColor4":"818fc2"},"url":"https://music.apple.com/jp/artist/bz/1236215587"},"relationships":{"albums":{"href":"/v1/catalog/jp/artists/1236215587/albums","data":[{"id":"1612269170","type":"albums","href":"/v1/catalog/jp/albums/1612269170"},{"id":"1552528987","type":"albums","href":"/v1/catalog/jp/albums/1552528987"},{"id":"1170604377","type":"albums","href":"/v1/catalog/jp/albums/1170604377"},{"id":"1344358078","type":"albums","href":"/v1/catalog/jp/albums/1344358078"},{"id":"1501353949","type":"albums","href":"/v1/catalog/jp/albums/1501353949"},{"id":"1551034513","type":"albums","href":"/v1/catalog/jp/albums/1551034513"},{"id":"1502686217","type":"albums","href":"/v1/catalog/jp/albums/1502686217"},{"id":"1502573665","type":"albums","href":"/v1/catalog/jp/albums/1502573665"},{"id":"1544732805","type":"albums","href":"/v1/catalog/jp/albums/1544732805"},{"id":"1536654657","type":"albums","href":"/v1/catalog/jp/albums/1536654657"},{"id":"1549103433","type":"albums","href":"/v1/catalog/jp/albums/1549103433"},{"id":"1375096721","type":"albums","href":"/v1/catalog/jp/albums/1375096721"},{"id":"1561406752","type":"albums","href":"/v1/catalog/jp/albums/1561406752"},{"id":"1597875079","type":"albums","href":"/v1/catalog/jp/albums/1597875079"},{"id":"1566648690","type":"albums","href":"/v1/catalog/jp/albums/1566648690"},{"id":"1503527043","type":"albums","href":"/v1/catalog/jp/albums/1503527043"},{"id":"1448546746","type":"albums","href":"/v1/catalog/jp/albums/1448546746"},{"id":"1644747159","type":"albums","href":"/v1/catalog/jp/albums/1644747159"},{"id":"1629986398","type":"albums","href":"/v1/catalog/jp/albums/1629986398"},{"id":"1619147046","type":"albums","href":"/v1/catalog/jp/albums/1619147046"},{"id":"1606159561","type":"albums","href":"/v1/catalog/jp/albums/1606159561"},{"id":"1582431314","type":"albums","href":"/v1/catalog/jp/albums/1582431314"}]}}},{"id":"1465740891","type":"artists","href":"/v1/catalog/jp/artists/1465740891","attributes":{"name":"BZ","genreNames":["エレクトロニック"],"artwork":{"width":500,"height":500,"url":"https://is3-ssl.mzstatic.com/image/thumb/Features125/v4/9e/da/50/9eda50fb-495d-62dd-473e-7e5ad83209f7/pr_source.png/{w}x{h}bb.jpg","bgColor":"1a1615","textColor1":"f6c069","textColor2":"d8a971","textColor3":"ca9e58","textColor4":"b28c5e"},"url":"https://music.apple.com/jp/artist/bz/1465740891"},"relationships":{"albums":{"href":"/v1/catalog/jp/artists/1465740891/albums","data":[{"id":"838262440","type":"albums","href":"/v1/catalog/jp/albums/838262440"},{"id":"997882538","type":"albums","href":"/v1/catalog/jp/albums/997882538"},{"id":"964660751","type":"albums","href":"/v1/catalog/jp/albums/964660751"},{"id":"1212786159","type":"albums","href":"/v1/catalog/jp/albums/1212786159"},{"id":"1579770371","type":"albums","href":"/v1/catalog/jp/albums/1579770371"}]}}},{"id":"1585689464","type":"artists","href":"/v1/catalog/jp/artists/1585689464","attributes":{"name":"BZ","genreNames":["エレクトロニック"],"artwork":{"width":4000,"height":4000,"url":"https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/ac/09/ab/ac09ab8c-1707-c6aa-a45e-9074649456f0/5059722847474_cover.jpg/{w}x{h}ac.jpg","bgColor":"03242f","textColor1":"d0cecc","textColor2":"21b9d9","textColor3":"a7acac","textColor4":"1b9bb7"},"url":"https://music.apple.com/jp/artist/bz/1585689464"},"relationships":{"albums":{"href":"/v1/catalog/jp/artists/1585689464/albums","data":[{"id":"776208953","type":"albums","href":"/v1/catalog/jp/albums/776208953"},{"id":"1612158034","type":"albums","href":"/v1/catalog/jp/albums/1612158034"},{"id":"1571657950","type":"albums","href":"/v1/catalog/jp/albums/1571657950"},{"id":"1581841967","type":"albums","href":"/v1/catalog/jp/albums/1581841967"},{"id":"1577141561","type":"albums","href":"/v1/catalog/jp/albums/1577141561"},{"id":"1577141651","type":"albums","href":"/v1/catalog/jp/albums/1577141651"},{"id":"1583900522","type":"albums","href":"/v1/catalog/jp/albums/1583900522"},{"id":"1620727001","type":"albums","href":"/v1/catalog/jp/albums/1620727001"},{"id":"1584610904","type":"albums","href":"/v1/catalog/jp/albums/1584610904"}]}}},{"id":"303385174","type":"artists","href":"/v1/catalog/jp/artists/303385174","attributes":{"name":"BZ","genreNames":["ヒップホップ/ラップ"],"artwork":{"width":996,"height":996,"url":"https://is1-ssl.mzstatic.com/image/thumb/Music112/v4/81/ef/b0/81efb079-e993-f42a-cfe1-6ece22673a2f/pr_source.png/{w}x{h}bb.jpg","bgColor":"1f1c2d","textColor1":"c7cea4","textColor2":"d0ba8c","textColor3":"a6ab8c","textColor4":"ad9a79"},"url":"https://music.apple.com/jp/artist/bz/303385174"},"relationships":{"albums":{"href":"/v1/catalog/jp/artists/303385174/albums","data":[{"id":"1447921556","type":"albums","href":"/v1/catalog/jp/albums/1447921556"},{"id":"1637062769","type":"albums","href":"/v1/catalog/jp/albums/1637062769"},{"id":"1517197555","type":"albums","href":"/v1/catalog/jp/albums/1517197555"},{"id":"1614079632","type":"albums","href":"/v1/catalog/jp/albums/1614079632"},{"id":"1558826365","type":"albums","href":"/v1/catalog/jp/albums/1558826365"},{"id":"1609298956","type":"albums* Connection #0 to host api.music.apple.com left intact
","href":"/v1/catalog/jp/albums/1609298956"},{"id":"1584989196","type":"albums","href":"/v1/catalog/jp/albums/1584989196"},{"id":"1522129749","type":"albums","href":"/v1/catalog/jp/albums/1522129749"},{"id":"1648328595","type":"albums","href":"/v1/catalog/jp/albums/1648328595"},{"id":"1635988163","type":"albums","href":"/v1/catalog/jp/albums/1635988163"}]}}}]}},"meta":{"results":{"order":["artists"],"rawOrder":["artists"]}}}%                                                                                                                      % 

見づらいので形を整えたものが下記です。

{
    "results": {
        "artists": {
            "href": "/v1/catalog/jp/search?limit=5&term=B%27z&types=artists",
            "next": "/v1/catalog/jp/search?offset=5&term=B%27z&types=artists",
            "data": [
                {
                    "id": "74931253",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/74931253",
                    "attributes": {
                        "name": "B'z",
                        "genreNames": [
                            "ロック"
                        ],
                        "artwork": {
                            "width": 2400,
                            "height": 2400,
                            "url": "https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/0c/88/58/0c885888-c769-81f8-8485-069cd9a362f1/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "dcdfe6",
                            "textColor1": "000001",
                            "textColor2": "1b191e",
                            "textColor3": "2c2c2f",
                            "textColor4": "424046"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/74931253"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/74931253/albums",
                            "next": "/v1/catalog/jp/artists/74931253/albums?offset=25",
                            "data": [
                                {
                                    "id": "283000073",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/283000073"
                                },
                                {
                                    "id": "292067907",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/292067907"
                                },
                                {
                                    "id": "666625900",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666625900"
                                },
                                {
                                    "id": "75682683",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682683"
                                },
                                {
                                    "id": "1561574089",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561574089"
                                },
                                {
                                    "id": "74937562",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74937562"
                                },
                                {
                                    "id": "666634430",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/666634430"
                                },
                                {
                                    "id": "75681798",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75681798"
                                },
                                {
                                    "id": "1605118558",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1605118558"
                                },
                                {
                                    "id": "75356318",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75356318"
                                },
                                {
                                    "id": "1466937136",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1466937136"
                                },
                                {
                                    "id": "74933581",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74933581"
                                },
                                {
                                    "id": "75682153",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75682153"
                                },
                                {
                                    "id": "347013256",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/347013256"
                                },
                                {
                                    "id": "74935606",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74935606"
                                },
                                {
                                    "id": "75354662",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75354662"
                                },
                                {
                                    "id": "1325460835",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1325460835"
                                },
                                {
                                    "id": "454667912",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/454667912"
                                },
                                {
                                    "id": "297710855",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/297710855"
                                },
                                {
                                    "id": "1561701429",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561701429"
                                },
                                {
                                    "id": "74944705",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/74944705"
                                },
                                {
                                    "id": "1567851939",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567851939"
                                },
                                {
                                    "id": "75361124",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75361124"
                                },
                                {
                                    "id": "1567852104",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1567852104"
                                },
                                {
                                    "id": "75357159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/75357159"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1236215587",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1236215587",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "ヒップホップ/ラップ"
                        ],
                        "artwork": {
                            "width": 3000,
                            "height": 3000,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Music124/v4/ae/b6/fb/aeb6fb97-56ba-e8fd-083f-f8c21970a74f/artwork.jpg/{w}x{h}ac.jpg",
                            "bgColor": "0f1050",
                            "textColor1": "d6bcf7",
                            "textColor2": "9dafdf",
                            "textColor3": "ae99d5",
                            "textColor4": "818fc2"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1236215587"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1236215587/albums",
                            "data": [
                                {
                                    "id": "1612269170",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1612269170"
                                },
                                {
                                    "id": "1552528987",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1552528987"
                                },
                                {
                                    "id": "1170604377",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1170604377"
                                },
                                {
                                    "id": "1344358078",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1344358078"
                                },
                                {
                                    "id": "1501353949",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1501353949"
                                },
                                {
                                    "id": "1551034513",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1551034513"
                                },
                                {
                                    "id": "1502686217",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1502686217"
                                },
                                {
                                    "id": "1502573665",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1502573665"
                                },
                                {
                                    "id": "1544732805",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1544732805"
                                },
                                {
                                    "id": "1536654657",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1536654657"
                                },
                                {
                                    "id": "1549103433",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1549103433"
                                },
                                {
                                    "id": "1375096721",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1375096721"
                                },
                                {
                                    "id": "1561406752",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1561406752"
                                },
                                {
                                    "id": "1597875079",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1597875079"
                                },
                                {
                                    "id": "1566648690",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1566648690"
                                },
                                {
                                    "id": "1503527043",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1503527043"
                                },
                                {
                                    "id": "1448546746",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1448546746"
                                },
                                {
                                    "id": "1644747159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1644747159"
                                },
                                {
                                    "id": "1629986398",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1629986398"
                                },
                                {
                                    "id": "1619147046",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1619147046"
                                },
                                {
                                    "id": "1606159561",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1606159561"
                                },
                                {
                                    "id": "1582431314",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1582431314"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1465740891",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1465740891",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "エレクトロニック"
                        ],
                        "artwork": {
                            "width": 500,
                            "height": 500,
                            "url": "https://is3-ssl.mzstatic.com/image/thumb/Features125/v4/9e/da/50/9eda50fb-495d-62dd-473e-7e5ad83209f7/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "1a1615",
                            "textColor1": "f6c069",
                            "textColor2": "d8a971",
                            "textColor3": "ca9e58",
                            "textColor4": "b28c5e"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1465740891"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1465740891/albums",
                            "data": [
                                {
                                    "id": "838262440",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/838262440"
                                },
                                {
                                    "id": "997882538",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/997882538"
                                },
                                {
                                    "id": "964660751",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/964660751"
                                },
                                {
                                    "id": "1212786159",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1212786159"
                                },
                                {
                                    "id": "1579770371",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1579770371"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "1585689464",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/1585689464",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "エレクトロニック"
                        ],
                        "artwork": {
                            "width": 4000,
                            "height": 4000,
                            "url": "https://is5-ssl.mzstatic.com/image/thumb/Music122/v4/ac/09/ab/ac09ab8c-1707-c6aa-a45e-9074649456f0/5059722847474_cover.jpg/{w}x{h}ac.jpg",
                            "bgColor": "03242f",
                            "textColor1": "d0cecc",
                            "textColor2": "21b9d9",
                            "textColor3": "a7acac",
                            "textColor4": "1b9bb7"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/1585689464"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/1585689464/albums",
                            "data": [
                                {
                                    "id": "776208953",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/776208953"
                                },
                                {
                                    "id": "1612158034",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1612158034"
                                },
                                {
                                    "id": "1571657950",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1571657950"
                                },
                                {
                                    "id": "1581841967",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1581841967"
                                },
                                {
                                    "id": "1577141561",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1577141561"
                                },
                                {
                                    "id": "1577141651",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1577141651"
                                },
                                {
                                    "id": "1583900522",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1583900522"
                                },
                                {
                                    "id": "1620727001",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1620727001"
                                },
                                {
                                    "id": "1584610904",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1584610904"
                                }
                            ]
                        }
                    }
                },
                {
                    "id": "303385174",
                    "type": "artists",
                    "href": "/v1/catalog/jp/artists/303385174",
                    "attributes": {
                        "name": "BZ",
                        "genreNames": [
                            "ヒップホップ/ラップ"
                        ],
                        "artwork": {
                            "width": 996,
                            "height": 996,
                            "url": "https://is1-ssl.mzstatic.com/image/thumb/Music112/v4/81/ef/b0/81efb079-e993-f42a-cfe1-6ece22673a2f/pr_source.png/{w}x{h}bb.jpg",
                            "bgColor": "1f1c2d",
                            "textColor1": "c7cea4",
                            "textColor2": "d0ba8c",
                            "textColor3": "a6ab8c",
                            "textColor4": "ad9a79"
                        },
                        "url": "https://music.apple.com/jp/artist/bz/303385174"
                    },
                    "relationships": {
                        "albums": {
                            "href": "/v1/catalog/jp/artists/303385174/albums",
                            "data": [
                                {
                                    "id": "1447921556",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1447921556"
                                },
                                {
                                    "id": "1637062769",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1637062769"
                                },
                                {
                                    "id": "1517197555",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1517197555"
                                },
                                {
                                    "id": "1614079632",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1614079632"
                                },
                                {
                                    "id": "1558826365",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1558826365"
                                },
                                {
                                    "id": "1609298956",
                                    "type": "albums* Connection #0 to host api.music.apple.com left intact",
                                    "href": "/v1/catalog/jp/albums/1609298956"
                                },
                                {
                                    "id": "1584989196",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1584989196"
                                },
                                {
                                    "id": "1522129749",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1522129749"
                                },
                                {
                                    "id": "1648328595",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1648328595"
                                },
                                {
                                    "id": "1635988163",
                                    "type": "albums",
                                    "href": "/v1/catalog/jp/albums/1635988163"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    },
    "meta": {
        "results": {
            "order": [
                "artists"
            ],
            "rawOrder": [
                "artists"
            ]
        }
    }
}

とりあえず無事認証済みの開発者としてアクセスできました。

Apple Developer の Media ID と秘密鍵を作成する方法

Apple の MusicKit を使いたいんですが、そのためには Media ID と秘密鍵を作る必要があったため手順を記録しておきます。

手順は ↓ にも Apple 公式の記載があります。

▶︎ サービスにアクセスするための秘密鍵を作成する - Apple デベロッパアカウントヘルプ

  1. Media ID の作成
  2. 秘密鍵の作成

1. Media ID の作成

まず Developer アカウントにサインインした上で下記にアクセスします。

▶︎ Certificates, Identifiers & Profiles - Apple Developer

Identifiers タブで「+」アイコンをクリックします。

すると ID の種類を選択する画面が表示されるので「Media IDs」をチェックし「Continue」をクリックします。

Description(ID の名前)を入力し、MusicKit にチェックを入れ「Continue」をクリックします。

入力した内容に間違いがないか確認し、「Register」をクリックします。

作成した ID と ID 名が表示されます。これで MusicKit の Media ID が作成されました。

2. 秘密鍵の作成

次に秘密鍵を作成します。「Keys」タブをクリックし、「Create a key」をクリックします。

秘密鍵の種類を選択する画面で「Media Services」にチェックを入れ「Continue」をクリックします。

ちなみに、先ほどの紹介した ID の作成が完了していないと下記の様にグレーアウトされた表示となります。

先ほど作成した ID を選択し「Save」をクリックします。

画面が戻るので「Continue」をクリックします。

作成する秘密鍵の内容が表示されます。問題なければ「Register」をクリックします。

「Download」ボタンをクリックすると .p8 形式のファイルがダウンロードされます。

一度「Download」ボタンをクリックするとファイルの再ダウンロードはできないので安全な場所に保存しましょう。

下記の様な形式になっています。

無事ダウンロードが完了したら「Done」をクリックします。

Key ID と表示されている部分に 10 桁の Key ID が表示されます。これは後々「kid」として使用するものになります。

これで MusicKit ID と秘密鍵の作成は完了です。

手順は ↓ にも記載があります。

▶︎ サービスにアクセスするための秘密鍵を作成する - Apple デベロッパアカウントヘルプ

実際に MusicKit を使うにはこれらを使用して Developer Token を作成する必要があります。