【问题标题】:Get ISRC code from iTunes Search API (Apple music)从 iTunes 搜索 API(Apple 音乐)获取 ISRC 代码
【发布时间】:2016-08-23 21:09:34
【问题描述】:

Apple 有一个搜索 API,可让您在 iTunes Store 中查询音乐:

https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/

这是一个搜索示例:https://itunes.apple.com/search?term=jack+johnson&entity=song

ISRC 代码允许是跨市场歌曲的标准标识符 (https://en.wikipedia.org/wiki/International_Standard_Recording_Code)。例如,Spotify 在其 api 中返回 ISRC。

无论如何我可以得到这个 iTunes 曲目的代码吗?如果 Apple 自己不提供,我是否可以使用他们提供的元数据找到它?

非常感谢!

【问题讨论】:

  • 嗨,你找到解决办法了吗?

标签: ios api itunes spotify itunes-search-api


【解决方案1】:

答案最终是肯定的。通过他们的 Apple Music API:https://developer.apple.com/documentation/applemusicapi/song/attributes

这是每首歌的属性的一部分

isrc 字符串(必需)歌曲的国际标准录音代码 (ISRC)。

这里列出了所有获取歌曲的方式:https://developer.apple.com/documentation/applemusicapi/songs

例如,您可以通过提供 iTunes ID 来使用 Get a Catalog Song 端点:

// https://api.music.apple.com/v1/catalog/us/songs/900032829
{
    "data": [
        {
            "attributes": {
                // ...
                "isrc": "NLH851300057",
                "name": "Something For the Pain"
                // ...
            },
            "href": "/v1/catalog/us/songs/900032829",
            "id": "900032829",
            "relationships": {
                "albums": { /* ... */ },
                "artists": { /* ... */ }
            },
            "type": "songs"
        }
    ]
}

【讨论】:

猜你喜欢
  • 2012-02-17
  • 2020-01-20
  • 1970-01-01
  • 2016-05-13
  • 2018-11-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-06
相关资源
最近更新 更多