Tweets

Get embed HTML for a tweet

Changed on

Returns the HTML that X gives websites to embed one public tweet, with the tweet's link and author.

get/api/v1/x/tweets/{id}/embed

Request

  • Base URL: https://xquik.com
  • URL: https://xquik.com/api/v1/x/tweets/{id}/embed
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • none

Path parameters

idstring required

Tweet ID or URL-encoded tweet URL, such as x.com/nasa/status/20. Takes x.com & twitter.com links with or without https://, www., mobile., a query or a fragment, & /i/status or /i/web/status links. Anything else gets 400 invalid_tweet_id.

Query parameters

theme'light' | 'dark'

Color theme of the embed. X uses light when left out.

hideMediaboolean

Set true to leave photos, videos, and link cards out.

hideThreadboolean

Set true to leave the tweet this one replies to out.

omitScriptboolean

Set true to leave the widget script tag out, for pages that load it once themselves.

Response

Embed HTML

Example response

{
  "embed": {
    "tweetId": "2102882545427714266",
    "url": "https://x.com/NASA/status/2102882545427714266",
    "authorName": "NASA",
    "authorUrl": "https://x.com/NASA",
    "html": "<blockquote class=\"twitter-tweet\">...</blockquote>",
    "width": 550
  }
}

Changes

    • ▲

      the response property ///// became optional for the status

    • ○

      added the optional property //// to the response with the status

Of the 51 revisions, 1 has no diff computed.