urlstring必填
Canonical x.com or twitter.com status URL with a numeric tweet ID. Any tweet in the self-thread can be supplied; the provider resolves the thread root.
https://api.sandbase.ai/v1/api/twitter/threadResolve the linear self-thread containing an X (Twitter) post, from its root through the author's linked continuations. This excludes replies from other users.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns the self-thread that contains an X (Twitter) post, from the root tweet through the author's own continuations. It needs one input, the url of any tweet in the thread. The response includes the author profile and each tweet with its text, media and engagement counts.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/thread" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://x.com/SpaceX/status/1732824684683784516"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Canonical x.com or twitter.com status URL with a numeric tweet ID. Any tweet in the self-thread can be supplied; the provider resolves the thread root. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"author": {
"avatarUrl": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
"bio": "SpaceX designs, manufactures and launches the world’s most advanced rockets and …",
"blueVerified": true,
"coverUrl": "https://pbs.twimg.com/profile_banners/34743251/1681251194",
"createdUtc": 1240523610,
"followers": 41933559,
"following": 127,
"handle": "SpaceX",
"id": "34743251",
"location": "Earth",
"name": "SpaceX",
"url": "https://x.com/SpaceX"
},
"complete": true,
"conversationId": "1732824684683784516",
"threadLength": 1,
"tweets": [
{
"authorHandle": "SpaceX",
"authorId": "34743251",
"authorName": "SpaceX",
"bookmarkCount": 1877,
"conversationId": "1732824684683784516",
"createdUtc": 1701972573,
"id": "1732824684683784516",
"inReplyToId": null,
"isReply": false,
"lang": "en",
"likeCount": 33783,
"media": [
{
"type": "video",
"url": "https://pbs.twimg.com/ext_tw_video_thumb/1732820284301058052/pu/img/A-6jgWgxmMJ4…",
"videoUrl": "https://video.twimg.com/ext_tw_video/1732820284301058052/pu/vid/avc1/1920x1080/K…"
}
]
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when the thread was resolved. A lookup that finds nothing returns false. |
data.complete | Whether the full thread was returned. |
data.threadLength | Number of tweets in the thread. |
data.author.handle / data.author.name / data.author.id | The thread author's @ handle, display name and numeric user ID. |
data.author.followers / data.author.following | Follower count and following count for the author. |
data.tweets[].id | Numeric ID of the tweet. |
data.tweets[].text | Text of the tweet. Links appear as shortened t.co URLs. |
data.tweets[].createdUtc | Tweet creation time as a Unix timestamp in seconds. |
data.tweets[].likeCount / data.tweets[].repostCount / data.tweets[].replyCount / data.tweets[].quoteCount / data.tweets[].bookmarkCount / data.tweets[].viewCount | Engagement counts for each tweet. |
data.tweets[].media[] | Media attached to the tweet. Each item has a type, a preview image url and, for video, a videoUrl. |
url. The root is resolved for you.url must contain a numeric tweet ID, for example https://x.com/SpaceX/status/1732824684683784516.Billed at the actual cost of each call, about $0.00269 for the request above. Failed calls are not charged.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/twitter/thread" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://x.com/SpaceX/status/1732824684683784516"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
urlstring必填Canonical x.com or twitter.com status URL with a numeric tweet ID. Any tweet in the self-thread can be supplied; the provider resolves the thread root.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
X (Twitter) | 每次呼叫 $0.00269 起 | JSON |
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
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/twitter/thread。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次起 $0.00269,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:url (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。X / Twitter Tweet Thread 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 X (Twitter) API 存取權。