Skip to main content
You can use the oEmbed API to programmatically return embedded content, such as Tweets and timelines The response from the oEmbed API will return an HTML snippet that will be automatically recognized when X’s widget JavaScript is included on the page. Please note that the API is recommended for performing tasks in bulk, and we advise using our robust publish.x.com tool for embedding content.
The returned HTML snippet will be automatically recognized as an embedded timeline when X’s widget JavaScript is included on the page.The oEmbed endpoint allows customization of the final appearance of an embedded timeline by setting the corresponding properties in HTML markup to be interpreted by X’s JavaScript bundled with the HTML response by default. The format of the returned markup may change over time as X adds new features or adjusts its timeline representation.For a X timeline specified by the timeline URL, in an oEmbed-compatible JSON format. User and list timelines are supported. The timeline markup is meant to be cached on your servers for up to the suggested cache lifetime specified by the cache_age property.

Resource URL

https://publish.x.com/oembed

Resource Information

Parameters

Example Requests

Example Response