Apple has a search API that allows you to query the iTunes Store for music:
https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/
Here is an example search: https://itunes.apple.com/search?term=jack+johnson&entity=song
An ISRC code allows is a standard identifier for song across markets (https://en.wikipedia.org/wiki/International_Standard_Recording_Code). Spotify for example returns the ISRC in their api.
Is there anyway I could get this code for an iTunes track? If Apple does not provide it themselves, is there someway I could find it using the metadata that they do provide?
Thanks so much!
The answer is finally yes. Through their Apple Music API: https://developer.apple.com/documentation/applemusicapi/song/attributes
It's a part of the attributes of every song
isrc string (Required) The International Standard Recording Code (ISRC) for the song.
And here are listed all the ways you can get songs: https://developer.apple.com/documentation/applemusicapi/songs
For example you can use the Get a Catalog Song endpoint by providing an iTunes ID:
// 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"
}
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With