oEmbed is an API that allows third-party websites and apps to fetch and display basic information about a Spotify URL and Embeds. It commonly powers link previews, or link ‘unfurling’ functionality on websites with messaging and user-created posts.

Discovering oEmbed URIs

Most pages on open.spotify.com support oEmbed. If your application parses a Spotify web page then it can discover the corresponding oEmbed URI by searching the document for a <link> element with the type set to application/json+oembed. For example, the source of the NerdOut@Spotify podcast includes this HTML:

<link rel="alternate" type="application/json+oembed" href="https://open.spotify.com/oembed?url=https%3A%2F%2Fopen.spotify.com%2Fshow%2F5eXZwvvxt3K2dxha3BSaAe" />

Using oEmbed data from Spotify in your app

The oEmbed response is a JSON object that contains the title of the entity, an Embed code snippet, and (if available) a thumbnail image associated with the entity. You can find a sample oEmbed response below, or learn more about the oEmbed response properties through the oEmbed API reference documentation.

  "html": "<iframe width=\"100%\" height=\"152\" title=\"Spotify Embed: My Path to Spotify: Women in Engineering \" style=\"border-radius: 12px\" frameborder=\"0\" allowfullscreen allow=\"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture\" src=\"https://open.spotify.com/embed/episode/7makk4oTQel546B0PZlDM5?utm_source=oembed\"></iframe>\n",
  "width": 456,
  "height": 152,
  "version": "1.0",
  "provider_name": "Spotify",
  "provider_url": "https://spotify.com",
  "type": "rich",
  "title": "My Path to Spotify: Women in Engineering",
  "thumbnail_url": "https://i.scdn.co/image/ab67656300005f1ff8141e891abf749375772343",
  "thumbnail_width": 300,
  "thumbnail_height": 300

Use cases

Common use cases for oEmbed include:

  • Displaying the title of a Spotify link in an app or website
  • Displaying the title and preview image of a Spotify link in an app or website
  • Displaying an Embed in your app or website