oEmbed

OEmbed is a format for allowing an embedded representation of a URL on third party sites - wikipedia

# API

The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly - oembed.com

Here is a list of oEmbed Providers:

There is an extensive list of existing oEmbed Providers, and embed.ly wraps over 200 sites to provide oEmbeds (first 5,000 API calls are fee) - embed.ly

Quick Example

A consumer (e.g. Pownce) makes the following HTTP request:

http://www.flickr.com/services/oembed/?url=http%3A//www.flickr.com/photos/bees/2341623661/

The provider (e.g. Flickr) then responds with an oEmbed response:

{ "version": "1.0", "type": "photo", "width": 240, "height": 160, "title": "ZB8T0193", "url": "http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg", "author_name": "Bees", "author_url": "http://www.flickr.com/photos/bees/", "provider_name": "Flickr", "provider_url": "http://www.flickr.com/" }

This allows the consumer to turn a URL to a Flickr photo page into structured data to allow embedding of that photo in the consumer's website.

Discovery

oEmbed providers can choose to make their oEmbed support discoverable by adding elements to the head of their existing (X)HTML documents. For example:

<link rel="alternate" type="application/json+oembed" href="http://flickr.com/services/oembed?url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F&format=json" title="Bacon Lollys oEmbed Profile" /> <link rel="alternate" type="text/xml+oembed" href="http://flickr.com/services/oembed?url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F&format=xml" title="Bacon Lollys oEmbed Profile" />

The URLs contained within the href attribute should be the full oEmbed endpoint plus URL and any needed format parameter. No other request parameters should be included in this URL.

The type attribute must contain either application/json+oembed for JSON responses, or text/xml+oembed for XML.