Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Twitter Post Detail

API 文件
https://api.sandbase.ai/v1/api/twitter/post-detail

Get the full detail of an X (Twitter) post identified by its tweet ID. Use it to inspect a known post after finding it through search, a user timeline, or an existing post URL.

價格
$0.014286美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 0 個選填

Playground

輸入
The unique identifier of the X (Twitter) post.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Twitter Post Detail API

Returns the full detail of one X (Twitter) post: its text, author, engagement counts, attached media and reply context. It needs the post's tweetId.

Use cases

  • Pull the like, retweet, reply and quote counts of a known post to track how it performed.
  • Download the video or image URLs attached to a post for archiving or review.
  • Check whether a post is still active and read its author details before citing it.
  • Read the exact post text and creation time to verify a quote or screenshot.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/post-detail" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tweetId": "1585341984679469056"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
tweetIdstringYesThe unique identifier of the X (Twitter) post.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "author": {
    "blue_verified": true,
    "image": "https://pbs.twimg.com/profile_images/2103567689515954176/aR-Kjpp4_normal.jpg",
    "name": "Elon Musk",
    "rest_id": "44196397",
    "screen_name": "elonmusk",
    "sub_count": 241472212,
    "verification": null
  },
  "bookmarks": 14034,
  "conversation_control": {
    "policy": null
  },
  "conversation_id": "1585341984679469056",
  "created_at": "Wed Oct 26 18:45:58 +0000 2022",
  "display_text": "Entering Twitter HQ – let that sink in!",
  "entities": {
    "hashtags": [],
    "media": [
      {
        "additional_media_info": {
          "monetizable": false
        },
        "display_url": "pic.x.com/D68z4K2wq7",
        "expanded_url": "https://x.com/elonmusk/status/1585341984679469056/video/1",
        "ext_media_availability": {
          "status": "Available"
        },
        "id_str": "1585341912877146112",
        "indices": [
          40
        ],
        "media_key": "7_1585341912877146112",
        "media_results": {
          "result": {
            "media_key": "7_1585341912877146112"
          }
        },
        "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9ir…",
        "original_info": {
          "focus_rects": [],
          "height": 1080,
          "width": 1920
        },
        "sizes": {
          "large": {
            "h": 1080,
            "resize": "fit",
            "w": 1920
          },
          "medium": {
            "h": 675,
            "resize": "fit",
            "w": 1200
          },
          "small": {
            "h": 383,
            "resize": "fit",
            "w": 680
          },
          "thumb": {
            "h": 150,
            "resize": "crop",
            "w": 150
          }
        },
        "type": "video"
      }
    ],
    "symbols": [],
    "timestamps": [],
    "urls": [],
    "user_mentions": []
  },
  "id": "1585341984679469056",
  "in_reply_to_screen_name": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id_str": null,
  "initial_tweets": null
}

Response fields

FieldMeaning
text / display_textThe post text. text includes the shortened t.co link. display_text shows the text without the trailing media link.
id / conversation_idThe post's own ID and the ID of the conversation it belongs to. They match when the post starts the conversation.
created_atWhen the post was created, in the format Wed Oct 26 18:45:58 +0000 2022.
author.name / author.screen_name / author.rest_idThe author's display name, handle and numeric user ID.
author.blue_verified / author.sub_countWhether the author has the blue verified flag, and the sub_count value for the author's account.
likes / retweets / replies / quotes / bookmarksEngagement counts for the post.
viewsView count of the post. It can be null when no value is returned.
media.video[].variants[]Playable video files for the post. Each entry has a content_type and url. MP4 entries also have a bitrate.
media.video[].durationLength of the video. The value 9301 matches duration_millis in entities.media[].video_info, which suggests milliseconds.
in_reply_to_status_id_str / in_reply_to_screen_name / reply_toSet when the post is a reply. They are null for a standalone post.
status / lang / sensitivePost state (active), language code (en) and a flag for sensitive content.

Notes

  • Get tweetId from the number at the end of a post URL, such as https://x.com/elonmusk/status/1585341984679469056, or from search and timeline results.
  • tweetId is a string. Send it as text, not as a number.
  • To read replies to this post, call Twitter Post Comments. To see quote posts, call X (Twitter) Tweet Quotes.
  • To look up the author, use the author.screen_name value with Twitter User Profile.

Pricing

$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Twitter每次呼叫 $0.014286JSON
X (Twitter)每次呼叫 $0.00054 起JSON
Twitter每次呼叫 $0.0006 起非同步 JSON
X (Twitter)每次呼叫 $0.0001 起JSON
X (Twitter)每次呼叫 $0.0036 起JSON
X (Twitter)每次呼叫 $0.00045 起JSON

指南:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

問題

常見問題

我要如何使用 Twitter Post Detail API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/twitter/post-detail。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Twitter Post Detail API 的費用是多少?

每次 $0.014286,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Twitter Post Detail API 接受哪些參數?

必要:tweetId (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Twitter Post Detail API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Twitter 開發者帳號或 API 金鑰嗎?

不需要。Twitter Post Detail 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Twitter API 存取權。