oEmbed

The Rdio Developer site has moved, please find this page at its new home.

oEmbed is a standard protocol for retrieving an embed code that represents a given URL. Rdio supports oEmbed for album, track and playlist pages for both full and shortened URLs.

To get started you should read the documentation at oembed.com.

Rdio supports both the JSON and XML response formats. For JSON responses if a callback argument is supplied too then it will be used as a JSONP callback. This is a relatively common extension to the oEmbed protocol.

The Rdio oEmbed endpoint is: http://www.rdio.com/api/oembed/

Examples

Here are some examples of calling the Rdio oEmbed API from the command-line using the standard curl utility.

XML

curl 'http://www.rdio.com/api/oembed/?format=xml&url=http://rd.io/x/Q1IjXC8s'
<?xml version='1.0' encoding='utf-8'?>
<oembed><provider_url>http://www.rdio.com</provider_url><version>1.0</version><thumbnail_width>200</thumbnail_width><height>250</height><thumbnail_height>200</thumbnail_height><title>Superunknown</title><html>&lt;iframe width="500" height="250" src="http://rd.io/i/Q1IjXC8s" frameborder="0"&gt;&lt;/iframe&gt;</html><width>500</width><thumbnail_url>http://www.rdio.com/_is/?m=album/3/7/c/0000000000036c73/square-200.jpg&amp;w=200&amp;h=200</thumbnail_url><provider_name>Rdio</provider_name><type>rich</type></oembed>

JSON

curl 'http://www.rdio.com/api/oembed/?format=json&url=http://rd.io/x/Q1IjXC8s'
{"provider_url": "http://www.rdio.com", "version": "1.0", "thumbnail_width": 200, "height": 250, "thumbnail_height": 200, "title": "Superunknown", "html": "<iframe width=\"500\" height=\"250\" src=\"http://rd.io/i/Q1IjXC8s\" frameborder=\"0\"></iframe>", "width": 500, "thumbnail_url": "http://www.rdio.com/_is/?m=album/3/7/c/0000000000036c73/square-200.jpg&w=200&h=200", "provider_name": "Rdio", "type": "rich"}

JSONP

curl 'http://www.rdio.com/api/oembed/?format=json&url=http://rd.io/x/Q1IjXC8s&callback=loadResult'
loadResult({"provider_url": "http://www.rdio.com", "version": "1.0", "thumbnail_width": 200, "height": 250, "thumbnail_height": 200, "title": "Superunknown", "html": "<iframe width=\"500\" height=\"250\" src=\"http://rd.io/i/Q1IjXC8s\" frameborder=\"0\"></iframe>", "width": 500, "thumbnail_url": "http://www.rdio.com/_is/?m=album/3/7/c/0000000000036c73/square-200.jpg&w=200&h=200", "provider_name": "Rdio", "type": "rich"})

Album page

curl 'http://www.rdio.com/api/oembed/?format=json&url=http://www.rdio.com/%23/artist/The_Black_Keys/album/Brothers/'
{"provider_url": "http://www.rdio.com", "version": "1.0", "thumbnail_width": 200, "height": 250, "thumbnail_height": 200, "title": "Brothers", "html": "<iframe width=\"500\" height=\"250\" src=\"http://rd.io/i/Qj5BEq8\" frameborder=\"0\"></iframe>", "width": 500, "thumbnail_url": "http://www.rdio.com/_is/?m=album/c/e/d/0000000000034dec/square-200.jpg&w=200&h=200", "provider_name": "Rdio", "type": "rich"}

Track page

curl 'http://www.rdio.com/api/oembed/?format=json&url=http://www.rdio.com/%23/artist/Nine_Inch_Nails/album/The_Downward_Spiral_1/track/Hurt/'
{"provider_url": "http://www.rdio.com", "version": "1.0", "thumbnail_width": 200, "height": 80, "thumbnail_height": 200, "title": "Hurt", "html": "<iframe width=\"390\" height=\"80\" src=\"http://rd.io/i/Qitp30w\" frameborder=\"0\"></iframe>", "width": 390, "thumbnail_url": "http://www.rdio.com/_is/?m=album/f/c/5/00000000000395cf/square-200.jpg&w=200&h=200", "provider_name": "Rdio", "type": "rich"}

Playlist page

 curl 'http://www.rdio.com/api/oembed/?format=json&url=http://www.rdio.com/%23/people/Pitchfork/playlists/13082/Top_Singles_of_2000-2004/'
{"provider_url": "http://www.rdio.com", "version": "1.0", "thumbnail_width": 200, "height": 250, "thumbnail_height": 200, "title": "Top Singles of 2000-2004", "html": "<iframe width=\"500\" height=\"250\" src=\"http://rd.io/i/Qi9xRQ\" frameborder=\"0\"></iframe>", "width": 500, "thumbnail_url": "http://www.rdio.com/_is/?m=album/0/4/2/0000000000030240/square-200.jpg&w=200&h=200", "provider_name": "Rdio", "type": "rich"}