We want to build an API, but it is not our top priority right now. If you're interested in using our data via an API, please reach out to us via the message bubble in the bottom right corner of the page or email us at hello@song.link - we'll be sure to keep you updated with the progress of our API.

In the meantime, we have a few other tools that you might be interested in:

Composable URLs

Songlink URLs are easily composable if you know the URL of the song or album on one of the streaming platforms. Prepend https://song.link/  in front of it, and you've just made a valid Songlink URL. For example, this is a Songlink URL composed from a Spotify track URL:

https://song.link/https://open.spotify.com/track/4sPmO7WMQUAf45kwMOtONw

Redirect URLs

We also have "redirect URLs" which will automatically redirect users to the streaming app you choose. To create a redirect URL, you'll need to provide the URL of a track or album on one of the streaming apps (e.g. Spotify) and the destination app to which you want to redirect the user. For example, if you have an Apple Music track and you want to create a link that will open that song on Spotify, you can use this redirect URL:

https://song.link/redirect?url=https://itun.es/us/5Gb0-?i=1053825088&to=spotify&web=true

The base URL is:

https://song.link/redirect?


The query params are as follows:

url  the URL of the song or album on one of the streaming platforms - e.g. an Apple Music song URL, like in the example above. It's best to encode this URL. If you're in a Node.js or Javascript, you can use encodeURIComponent()

to  the streaming platform to which you'd like to redirect the user. Can be one of: spotify , youtube, itunes, google, soundcloud, amazon, fanburst, napster, tidal, or deezer. Though rare, it's possible that the song or album will not be available on that service in the user's country. In this case, the user will land on the Songlink page instead where they will be presented with all of the available options for the song or album.

web  this param takes a boolean and defaults to false. If set to true then we will redirect to the web version of the music service and will not use app-specific URLs. This applies mostly to Spotify, which has two distinct URLs for app and web. If the user does not have the Spotify app installed on that device, the app-specific link will not work. This also affects Apple Music (when &to=itunes) redirect URLs, which will not attempt to open the app if &web=true. We've learned that, in general, it is safer to use the web link for Spotify unless you know for sure the user has the app installed. Even then, especially on mobile, it's best to use the web link and Spotify will open it in the app, if it is installed.

Songlink Embeds

This isn't really a substitute for API-like behavior, but if you're creating a website, you might want to consider using our flexible embeddable experience. You can find all the information about how to implement Songlink Embeds here:

http://help.song.link/embed/embed-songlinks-into-your-website-or-blog

Future plans

We will be improving the developer and user experience of the redirect URLs soon. We also want to build a public API that you can query and know for sure on which platforms it can be found. There are a few technical and legal challenges, as well other higher priority projects on our plate right now, so we unfortunately do not have a timeline on any of this work.

Did this answer your question?