The endpoints documented on this page were deprecated on October 24, 2020 and now return an error code 400. Please use the new Facebook oEmbed endpoints instead.

oEmbed Endpoints for Embeddable Facebook Content (Legacy)

oEmbed is an open format designed to allow embedding content from a website into another page. You can use the oEmbed standard for embedding Facebook posts and videos into your website.

Endpoint URLs

You can use our API endpoint to request the embed code for public Posts and Videos, all responses are in json format. Replace {content-url} by your post or video url:

Type Endpoint URL



Content URLs

Public Facebook posts and videos can use one of these URL schemes:

  • Posts:
  • Videos:

Note: As our platform is constantly evolving this list may not be complete.


Let's say you want to get the oEmbed data for embedding the Facebook Developers video How to Share With Just Friends call the endpoint URL:

The json response should like this:

  "author_name": "Facebook",
  "author_url": "",
  "provider_url": "",
  "provider_name": "Facebook",
  "success": true,
  "height": null,
  "html": "<div id=\"fb-root\"></div>\n<script>(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); = id;\n  js.src = \";version=v2.9\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));</script><div class=\"fb-video\" data-href=\"\"><div class=\"fb-xfbml-parse-ignore\"><blockquote cite=\"\"><a href=\"\">How to Share With Just Friends</a><p>How to share with just friends.</p>Posted by <a href=\"\">Facebook</a> on Friday, December 5, 2014</blockquote></div></div>",
  "type": "video",
  "version": "1.0",
  "url": "",
  "width": "100%"


All parameters need to be sent URL-encoded.

Parameter Description


The URL of the post or video (required)


The maximum width of the embedded resource (optional). Note that the maxheight parameter is not supported. This is because the embed code is responsive and its height varies depending on its width.


A JSON callback to be invoked (optional)


If set to true, the embed does not include the script tag (optional)


Set to oembed to have the endpoint respond with an error code 400 and the message: This endpoint is deprecated, please go to to learn how to migrate your endpoint.