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 Post Commentsこの API Twitter | $0.014286 / 回 | JSON |
X (Twitter) | 1回あたり $0.00054 から | JSON |
Twitter | 1回あたり $0.0006 から | 非同期 JSON |
X (Twitter) | 1回あたり $0.0001 から | JSON |
X (Twitter) | 1回あたり $0.0036 から | JSON |
X (Twitter) | 1回あたり $0.00045 から | JSON |
ガイド:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/twitter/post-comments に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.014286、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: tweetId (string)。 任意: cursor (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Twitter Post Comments は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Twitter の API アクセスを別途申請する必要はありません。