Embedding using oEmbed

//oembed.ex.co/item?id=<your_item_id> or //oembed.ex.co/item?url=<your_item_url>

The endpoint returns an item, specified by an item URL or item ID, in an oEmbed-compatible format.

The API enables customization of the embedded item by setting parameters to the oEmbed endpoint.

Parameters


parameter

description

required

default

id

The id of the item you want to embed

Yes (unless url is set)

-

url

The url of the item you want to embed - could be either of the following formats:
//app.ex.co/stories/item/<item-id>
or
//app.ex.co/stories/<user-name>/<item-title>

Yes (unless id is set)

-

omit-script

do not include script in the html property of the oembed returned

No

false

show-share

show share bar above and below the item

No

true

show-info

show item cover, title and description

No

true

Example

All following three requests return the following response.

Request

  • //oembed.ex.co/item?id=8fb2343f-fa5d-48d4-8723-f8b5d51cc1a9
  • //oembed.ex.co/item?url=app.ex.co/stories/item/8fb2343f-fa5d-48d4-8723-f8b5d51cc1a9
  • //oembed.ex.co/item?url=https://app.ex.co/stories/paolagarcia10/remembering-september-11th-flash-back-to-images-we-will-never-forget

Response

{
    "author_name": "Paola Garcia",
    "html": "<script>(function (d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s);js.id = id;js.src = \"//embed.ex.co/sdk.js\";fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'playbuzz-sdk'));</script><div class=\"playbuzz\" data-id=\"8fb2343f-fa5d-48d4-8723-f8b5d51cc1a9\"></div>",
    "provider_name": "Ex.Co",
    "provider_url": "//ex.co",
    "thumbnail_url": "//cdn.playbuzz.com/cdn/8fb2343f-fa5d-48d4-8723-f8b5d51cc1a9/6868d660-9f42-49c7-bedb-ea6416a56860.jpg",
    "thumbnail_height": 83,
    "thumbnail_width": 126,
    "title": "Remembering September 11th: Flash Back To Images We Will Never Forget",
    "type": "rich",
    "url": "//app.ex.co/stories/item/8fb2343f-fa5d-48d4-8723-f8b5d51cc1a9",
    "version": "1.0"
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us how can we improve this article!

Select atleast one of the reasons

Feedback sent

We apprciate your effort and will try to fix the article