Musicfetch

Get the Spotify song link from a Apple Music link

How to use Musicfetch to find the Spotify link for any song using a Apple Music track URL

Want to quickly get the Spotify link for a song you found on Apple Music? Musicfetch makes it easy to convert any supported Apple Music track link to its Spotify equivalent.

How to use Musicfetch API to get a Spotify link from Apple Music

Use the /url endpoint with a Apple Music track URL and set services=spotify in the query. You can use any supported Apple Music track link. See the track lookup API docs for more details.

From a Apple Music track URL

curl 'https://api.musicfetch.io/api/url?url=https%3A%2F%2Fmusic.apple.com%2Fus%2Falbum%2Fperfect%2F1766261100%3Fi%3D1766261290%26app%3Dmusic&services=spotify' \
-H 'x-musicfetch-token: YOUR_TOKEN'

Example response

The Musicfetch response contains merged links/metadata from Apple Musicand Spotify.

{
"result": {
"type": "track",
"name": "Perfect",
"services": {
"spotify": {
"link": "https://open.spotify.com/track/0tgVpDi06FyKpA1z0VMD4v",
},
"appleMusic": {
"link": "https://music.apple.com/us/album/perfect/1766261100?i=1766261290&app=music",
}
}
}
}