·4 min read

Convert Spotify URLs to Apple Music Automatically

Sharing music between Spotify and Apple Music users is a constant friction point. You send a Spotify link, they're on Apple Music — they can't open it. This guide shows how to convert Spotify URLs to Apple Music links automatically, including what to do if you were previously using the Odesli API for this.

Paste any Spotify link at ml.jadquir.com. It resolves and gives you links for Spotify, Apple Music, YouTube Music, Deezer, Tidal, and more. No sign-up needed.

The page you get back (like ml.jadquir.com/song/artist/title) works for everyone — Spotify users click Spotify, Apple Music users click Apple Music.

#If You Were Using Odesli

The Odesli API is dead as of July 31, 2026. If your code looked like this:

ts
// Old Odesli code
const res = await fetch(
  `https://api.song.link/v1-alpha.1/links?url=${encodeURIComponent(spotifyUrl)}&key=${KEY}`
);
const data = await res.json();
const appleLink = data.linksByPlatform?.appleMusic?.url;

Replace it with:

ts
// MusicLink replacement
const res = await fetch(
  `https://api.ml.jadquir.com/v1/v1/lookup?q=${encodeURIComponent(spotifyUrl)}`,
  { headers: { Authorization: `Bearer ${KEY}` } }
);
const data = await res.json();
const appleLink = data.data[0].links.apple_music;

Same result, same two lines — different endpoint, flatter response.

#The API Way: Automate It

If you're building an app that needs to convert links programmatically:

bash
curl "https://api.ml.jadquir.com/v1/v1/lookup?q=https%3A%2F%2Fopen.spotify.com%2Ftrack%2F4cOdK2wGLETKBW3PvgPWqT" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

json
{
  "success": true,
  "data": [{
    "public_id": "huUKtw-D",
    "url": "https://ml.jadquir.com/song/rick-astley/never-gonna-give-you-up",
    "title": "Never Gonna Give You Up",
    "artist": "Rick Astley",
    "isrc": "GBARL9300135",
    "image_url": "https://is4-ssl.mzstatic.com/image/thumb/...",
    "links": {
      "spotify":      "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
      "apple_music":  "https://music.apple.com/album/never-gonna-give-you-up/1559885420?i=1559885421",
      "youtube":      "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "youtube_music":"https://music.youtube.com/watch?v=dQw4w9WgXcQ",
      "deezer":       "https://www.deezer.com/track/15646529"
    }
  }]
}

The apple_music field is a direct deep link that opens in the Apple Music app on iOS/macOS, or the web player on other platforms.

#Pass Any Input — URL, ID, or ISRC

The ?q= endpoint auto-detects whatever you give it:

bash
# Full Spotify URL
curl "https://api.ml.jadquir.com/v1/v1/lookup?q=https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Bare Spotify track ID
curl "https://api.ml.jadquir.com/v1/v1/lookup/spotify/4cOdK2wGLETKBW3PvgPWqT" \
  -H "Authorization: Bearer YOUR_API_KEY"

#TypeScript Example

ts
async function spotifyToAppleMusic(spotifyUrl: string): Promise<string | null> {
  const res = await fetch(
    `https://api.ml.jadquir.com/v1/v1/lookup?q=${encodeURIComponent(spotifyUrl)}`,
    { headers: { Authorization: `Bearer ${process.env.MUSICLINK_API_KEY}` } }
  );
  if (!res.ok) return null;
  const { data } = await res.json();
  return data[0]?.links.apple_music ?? null;
}

const appleLink = await spotifyToAppleMusic(
  "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"
);
// → "https://music.apple.com/album/never-gonna-give-you-up/1559885420?i=1559885421"

#Convert in the Other Direction

The same API works in reverse — pass an Apple Music URL, get back a Spotify link:

bash
curl "https://api.ml.jadquir.com/v1/v1/lookup?q=https%3A%2F%2Fmusic.apple.com%2Fus%2Falbum%2Fnever-gonna-give-you-up%2F1559885420%3Fi%3D1559885421" \
  -H "Authorization: Bearer YOUR_API_KEY"
ts
const res = await fetch(
  `https://api.ml.jadquir.com/v1/v1/lookup?q=${encodeURIComponent(appleMusicUrl)}`,
  { headers: { Authorization: `Bearer ${process.env.MUSICLINK_API_KEY}` } }
);
const { data } = await res.json();
console.log(data[0].links.spotify);
// → "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"

#Why ISRC Is the Most Reliable Method

If you have the ISRC (International Standard Recording Code) for a track, use that instead of a platform URL. ISRCs map to exactly one recording — no ambiguity, no wrong versions, and they work regardless of platform:

ts
const res = await fetch(
  `https://api.ml.jadquir.com/v1/v1/lookup?q=GBARL9300135`,
  { headers: { Authorization: `Bearer ${process.env.MUSICLINK_API_KEY}` } }
);
const { data } = await res.json();
console.log(data[0].links.apple_music); // Always the correct recording

Spotify track pages show the ISRC in the share menu. Many music databases (MusicBrainz, Discogs) also list ISRCs publicly.

Instead of converting to a specific platform, you can share a universal link that works for everyone:

ts
const res = await fetch(
  `https://api.ml.jadquir.com/v1/v1/lookup?q=${encodeURIComponent(spotifyUrl)}`,
  { headers: { Authorization: `Bearer ${process.env.MUSICLINK_API_KEY}` } }
);
const { data } = await res.json();
const universalLink = data[0].url;
// → "https://ml.jadquir.com/song/rick-astley/never-gonna-give-you-up"

When someone opens this link, they see all available platforms and tap the one they use. No more "sorry this only works on Spotify."

#Rate Limits

  • Free: 300 requests/month, no credit card
  • Hobby: 5,000 requests/month, $9/month
  • Pro: 50,000 requests/month, $49/month

Get your free API key →