Musicfetch

Get the YouTube song link from a Spotify link

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

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

How to use Musicfetch API to get a YouTube link from Spotify

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

From a Spotify track URL

curl 'https://api.musicfetch.io/api/url?url=https%3A%2F%2Fopen.spotify.com%2Ftrack%2F0tgVpDi06FyKpA1z0VMD4v&services=youtube' \
-H 'x-musicfetch-token: YOUR_TOKEN'

Example response

The Musicfetch response contains merged links/metadata from Spotifyand YouTube.

{
"result": {
"type": "track",
"name": "Perfect",
"services": {
"youtube": {
"link": "https://www.youtube.com/watch?v=2Vv-BfVoq4g",
},
"spotify": {
"link": "https://open.spotify.com/track/0tgVpDi06FyKpA1z0VMD4v",
}
}
}
}