Using oEmbed for integration

Flourish supports oEmbed, a widely-used open standard for embedding content from third party platforms. oEmbed can be used as an alternative to our embed scripts or iframes, and is particularly useful in the context of content management systems, which often prohibit authors from inputting arbitrary markup like script tags.

In a typical implementation, the author will enter a URL identifying a resource into their CMS, and the CMS will use oEmbed to fetch the correct markup, substituting it for the URL when the page is rendered.

Endpoint and schemes

The Flourish oEmbed endpoint is

Flourish supports two oEmbed schemes:* for visualizations and* for stories.

We only support json format. Specifying format=xml will return an error.

The optional maxheight and maxwidth parameters can be used to specified the preferred size of the embed.


The author enters the URL of a Flourish visualization, e.g

As this URL matches one of our schemes, your application can make an oEmbed query by escaping it and passing at as the url parameter to our oEmbed endpoint:


which will return the following response:

"html":"<iframe src=\"\" frameborder=\"0\" scrolling=\"no\" height=\"575\" width=\"700\" style=\"width:100%;\"></iframe>",

Your application can then insert the provided html markup into its output.

Dynamic resizing

Flourish also supports Embedly’s Provider Height Resizing API.

If you are coding a template that would like to take advantage of this, use the Flourish.setHeight() method to post the desired height to the embedding page. Then the embedding page can listen for these messages as follows:

window.addEventListener("message", function(event) {
var message = JSON.parse(;
if (message.source == "Flourish" && message.context == "iframe.resize") {
// message.height is the requested height