oEmbed discovery in a nutshell
/oembed API endpoint enables programmatically fetching a NEXT story that can then be embedded into an external document or tool.
NEXT stories support the recommended oEmbed discovery mechanism. Consumers need to comply with the oEmbed standard to retrieve the content, and parse it accordingly:
Parse the HTML, and detect the
<link>elements that identify the board as oEmbed-compliant content.
Send a request to the oEmbed API endpoint: this is the value of the
hrefattribute in the
Extract and embed the iframe that the API returns: this is the value of the
htmlfield in the JSON or XML response.
oEmbed discovery on NEXT pages
Consumers that send a request to the URL of a story that supports the oEmbed standard can expect to find a
<link> element in the
<head> section of the HTML document.
This is the recommended way to enable consumers to discover oEmbed support for a resource.