- Embedded timelines
- Embedded Tweets
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/oembedResource Information
| Response formats | JSON |
| Requires authentication? | No |
| Rate limited | No |
Parameters
| Name | Description | Example |
|---|---|---|
| url | The URL of the X timeline to be embedded | * https://x.com/TwitterDev *https://x.com/TwitterDev/lists/national-parks |
| limit | Display up to N items where N is a value between 1 and 20 inclusive | 6 |
| maxwidth | Set the maximum width of the widget. Must be between 180 and 1200 inclusive | 300 |
| maxheight | Set the maximum height of the widget. Must be greater than 200 | 400 |
| omit_script | Do not include a script element in the response | 1 |
| lang | A supported X language code | es |
| theme | When set to dark, the timeline is displayed with light text over a dark background | dark |
| chrome | Remove a timeline display component with space-separated tokens * noheader - hides the header * nofooter - hides the footer, if visible * noborders - removes all borders: around the widget, between Tweets, and inside a Tweet * noscrollbar- crop and hide the timeline scrollbar, if visible * transparent- remove background color | noheader%20nofooter |
| aria_polite | Set an assertive ARIA live region politeness value for Tweets added to a timeline | assertive |
| dnt | When set to true, the timeline and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads | true |