tweetIdstring必填
The unique identifier of the X (Twitter) post.
https://api.sandbase.ai/v1/api/twitter/post-commentsGet the latest comments for an X (Twitter) post identified by tweet ID, with cursor pagination. Use it to review recent discussion on a known post and continue through additional comment pages.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns the latest comments (replies) on an X (Twitter) post. It needs the post's tweetId, and it returns a timeline list of comments plus cursors for paging.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tweetId": "1585341984679469056"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
tweetId | string | Yes | The unique identifier of the X (Twitter) post. |
cursor | string | No | Pagination cursor returned by the previous response. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"next_cursor": "DAADDAABCgABHWLH-s7WQHYKAAIdWkn2RRqgiQAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdYvRGxAAn…",
"prev_cursor": "DAADDAABCgABHWLH-s7WQHYKAAIdWkn2RRqgiQAIAAIAAAABCAADAAAAAAgABAAAAAAKAAUdYvRGxAAn…",
"status": "ok",
"timeline": [
{
"bookmarks": 0,
"conversation_id": "1585341984679469056",
"created_at": "Tue Nov 03 04:31:13 +0000 2026",
"display_text_range": [
10
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "44196397",
"indices": [
0
],
"name": "Elon Musk",
"screen_name": "elonmusk"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "elonmusk",
"in_reply_to_status_id_str": "1585341984679469056",
"in_reply_to_user_id_str": "44196397",
"lang": "en",
"media": [],
"quotes": 0
}
]
}
| Field | Meaning |
|---|---|
timeline[] | List of comments on the post. Each item is one reply. |
timeline[].tweet_id | ID of the comment itself. |
timeline[].text | Full text of the comment, including the leading @mention. |
timeline[].created_at | Time the comment was posted, in a format like Tue Nov 03 04:31:13 +0000 2026. |
timeline[].screen_name | Handle of the user who wrote the comment. |
timeline[].conversation_id | ID of the post the comment belongs to. It matches the tweetId you sent. |
timeline[].in_reply_to_status_id_str / timeline[].in_reply_to_screen_name | The tweet and user this comment replies to. It can be another comment instead of the main post. |
timeline[].favorites / timeline[].retweets / timeline[].replies / timeline[].quotes / timeline[].bookmarks | Engagement counts for the comment. |
timeline[].views | View count for the comment, returned as a string. |
timeline[].user_info.followers_count | Follower count of the commenter. Other fields in user_info include avatar, location and the account created_at. |
next_cursor / prev_cursor | Cursors for the next and previous pages of comments. |
next_cursor from the response as cursor in the next request to get more comments.tweetId is the numeric ID at the end of a post URL.Tue Nov 03 04:31:13 +0000 2026.description, friends_count and source can be null. To fetch the post itself, call Twitter Tweet Detail.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/twitter/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tweetId": "1585341984679469056"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
tweetIdstring必填The unique identifier of the X (Twitter) post.
cursorstringPagination cursor returned by the previous response.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
Twitter | 每次呼叫 $0.014286 | 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/post-comments。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.014286,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:tweetId (string)。 選填:cursor (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Twitter Post Comments 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Twitter API 存取權。