Moment oEmbed API

Returns a simple embed HTML for a single Moment specified by a Moment URL, in an oEmbed-compatible response JSON format.

The Moment markup is meant to be cached on your servers for up to the suggested cache lifetime specified by the cache_age property.

Resource URL

Resource information

Response formats JSON
Requires authentication? No
Rate limited? No

Query parameters

Parameter Description Example value
url The URL of the Moment to be embedded
maxwidth Set the maximum width of the displayed embed in whole pixels Minimum value: 220 450
limit Display up to N items, where N is a value between 1 and 20 inclusive 6
chrome Remove the footer display component nofooter
lang A supported Twitter language code es
dnt When set to true, the Moment and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads true
omit_script Do not include a script element in the response 1

Example requests


twurl -H "/oembed?url="

Example result

  "url": "",
  "title": "The Obamas' wedding anniversary",
  "html": "<a class=\"twitter-moment\" href=\"\">The Obamas&#39; wedding anniversary</a>\n<script async src=\"//\" charset=\"utf-8\"></script>",
  "width": 550,
  "height": null,
  "type": "rich"
  "cache_age": "3153600000",
  "provider_name": "Twitter",
  "provider_url": "",
  "version": "1.0"