Get the Spotify song link from a YouTube link

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

Musicfetch is a song-link matching API. Give Musicfetch a supported YouTube track URL and request Spotify; when a confident match is available, the response includes the matching Spotify song link and normalized track metadata.

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

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

From a YouTube track URL

curl 'https://api.musicfetch.io/api/url?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2Vv-BfVoq4g&services=spotify' \
-H 'x-musicfetch-token: YOUR_TOKEN'

Example response

The Musicfetch response contains merged links/metadata from YouTubeand Spotify.

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

How reliable is the song-link match?

Match quality depends on the metadata available for the source track and whether the same recording exists on Spotify. Check the returned artist and track title before publishing the link, especially when a song has live, remastered, clean, explicit, or alternate versions. If Musicfetch cannot find a suitable Spotify result, the response will not contain a destination-service link.

Song link matching FAQ

Can I convert a YouTube song link to Spotify?

Yes. Musicfetch can use a supported YouTube track URL to find the matching Spotify song link when a confident match is available.

Does Musicfetch convert audio files or playlists?

No. Musicfetch matches music metadata and service links. It does not download audio, convert files, or migrate playlists.

Can I do song-link matching by API?

Yes. Use the Musicfetch URL lookup endpoint with a source track URL and request the destination service in the services parameter.

Build song-link matching into your app

Use Musicfetch to match YouTube links to Spotify and other music services from one API.

Explore link matching