Songlink / Odesli API

⭐ Beginner's Pick Music / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Songlink (also known as Odesli) converts a music link from one streaming platform into links for all major platforms, including Spotify, Apple Music, YouTube, and more. You can pass any song URL and receive a unified set of streaming links in a single API call. The API is free to use and an API key is optional but recommended for higher rate limits.

💡

Beginner Tip

You can make requests without an API key during development, but add ?key=YOUR_API_KEY once you go to production to avoid hitting the unauthenticated rate limit.

Available Data

track name and artist
album metadata
audio preview URLs
popularity score
genre classification

Example Response

JSON Response
{
  "name": "Bohemian Rhapsody",
  "artist": "Queen",
  "album": "A Night at the Opera",
  "duration_ms": 354000,
  "popularity": 92,
  "preview_url": "https://p.scdn.co/mp3-preview/..."
}

Field Reference

entityUniqueId Unique identifier for the song entity in the Odesli system.
userCountry The country used to resolve platform links (default: US).
pageUrl The canonical Songlink page URL that aggregates all platform links.
linksByPlatform Map of platform names (e.g., "spotify", "appleMusic") to their respective link objects.
entitiesByUniqueId Detailed metadata for each matched entity including title, artist, and thumbnail URL.

Implementation Example

const url = "https://www.notion.so/API-d0ebe08a5e304a55928405eb682f6741";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Bad Request The music URL is not URL-encoded or is not a recognized streaming platform link.
URL-encode the song link before passing it as the url parameter (e.g., use encodeURIComponent in JavaScript).
429 Too Many Requests Exceeded the unauthenticated rate limit.
Add your API key as the key query parameter to receive a higher rate limit allowance.
Missing platform in response The song is not available on a particular streaming service.
This is expected — not all songs exist on every platform. Check the linksByPlatform object keys before accessing them.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Music
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →