tweet_idstring必填
Tweet ID
https://api.sandbase.ai/v1/api/twitter/web/latest-post-commentsReturns recent replies and comment timelines for a specific post using its tweet ID, with cursor support for multi-page results.
[
{
"data": {
"next_cursor": "DAADDAABCgABHT8q824a0AIKAAIdPuDmWVeAgAAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdPyuoyAAnEAoABh0_K6jH_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWRQeVh2UUJvUS94MC9KWFUrbGxGRkhUOEpuTlFid1BrZFB3NTZ5eG9BdEIwL0ZGeWhWb0dkSFQ3aHZGYmJvWjBkUHZHaWY5dUFNQjAvSGRvZWxuR25IVDhtZThoYXNUZ2RQdllKOGh0UUNoMC9JazFhR25GakhUN2c3eGJXOEFJZFB4aXZZaHBoZkIwL0htc3AybEdaSFQ4cTgyNGEwQUlkUHdLeEI5dWdmaDArNE9aWlY0Q0FIVDhpbjRUYWNYSWRQeDg3YmRld29oMC9HdFIrV3JFWgAA",
"prev_cursor": "DAADDAABCgABHT8q824a0AIKAAIdPuDmWVeAgAAIAAIAAAABCAADAAAAAAgABAAAAAAKAAUdPyuoyAAnEAoABh0_K6jH_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWRQeVh2UUJvUS94MC9KWFUrbGxGRkhUOEpuTlFid1BrZFB3NTZ5eG9BdEIwL0ZGeWhWb0dkSFQ3aHZGYmJvWjBkUHZHaWY5dUFNQjAvSGRvZWxuR25IVDhtZThoYXNUZ2RQdllKOGh0UUNoMC9JazFhR25GakhUN2c3eGJXOEFJZFB4aXZZaHBoZkIwL0htc3AybEdaSFQ4cTgyNGEwQUlkUHdLeEI5dWdmaDArNE9aWlY0Q0FIVDhpbjRUYWNYSWRQeDg3YmRld29oMC9HdFIrV3JFWgAA",
"status": "ok",
"timeline": [
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:38:18 +0000 2026",
"display_text_range": [
29,
144
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "anup_x_dev",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Nearly eight months in space and they're finally coming home. I leave for one week and I'm scared to open my inbox.",
"tweet_id": "2107450375645351938",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2104692919802486784/a2fZuM_H_normal.jpg",
"cover_image": null,
"created_at": "Sat Aug 24 06:45:33 +0000 2013",
"description": null,
"favorites_count": 1948,
"followers_count": 157,
"friends_count": null,
"location": "Dubai, United Arab Emirates",
"name": "Anup",
"rest_id": "1695754196",
"screen_name": "anup_x_dev",
"url": null,
"verified": true,
"verified_type": null
},
"views": "6"
},
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:18:47 +0000 2026",
"display_text_range": [
29,
112
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "JustaJarhead71",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Proud of the American teams helping make this possible. Bring all four home safely.",
"tweet_id": "2107445463716901176",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2105766619934760961/J98zD-96_normal.jpg",
"cover_image": null,
"created_at": "Wed Jun 25 21:35:34 +0000 2008",
"description": null,
"favorites_count": 96762,
"followers_count": 4133,
"friends_count": null,
"location": "United States",
"name": "Just a Jarhead",
"rest_id": "15236949",
"screen_name": "JustaJarhead71",
"url": null,
"verified": true,
"verified_type": null
},
"views": "26"
},
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:16:23 +0000 2026",
"display_text_range": [
29,
66
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "marixhottie",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Eight months in space? I need coffee.",
"tweet_id": "2107444860135543039",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2031824996591337472/wdJF2bgE_normal.jpg",
"cover_image": null,
"created_at": "Sat Mar 08 16:34:05 +0000 2025",
"description": null,
"favorites_count": 6005,
"followers_count": 164,
"friends_count": null,
"location": "New York, NY",
"name": "Mari Hottie",
"rest_id": "1898411877006225408",
"screen_name": "marixhottie",
"url": null,
"verified": false,
"verified_type": null
},
"views": "8"
},
"… 17 more items in the full response"
]
}
}
]选择一个示例,将其输入和结果加载到 playground 中。
Returns the most recent replies to a single tweet as a timeline list. Each reply includes its text, author handle, engagement counts and basic author profile data. The only required input is tweet_id.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/latest-post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tweet_id": "2107237881668313108"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
tweet_id | string | Yes | Tweet ID |
cursor | string | No | Cursor, default is None, used for paging, obtained from the last request |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"next_cursor": "DAADDAABCgABHVrBFWqWkH8KAAIdPoa-fFeQ_AAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdYvRU5YAn…",
"prev_cursor": "DAADDAABCgABHVrBFWqWkH8KAAIdPoa-fFeQ_AAIAAIAAAABCAADAAAAAAgABAAAAAAKAAUdYvRU5YAn…",
"status": "ok",
"timeline": [
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 27 22:53:14 +0000 2026",
"display_text_range": [
29
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0
],
"name": "NASA",
"screen_name": "NASA"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "ja",
"media": [],
"quotes": 0
}
]
}
| Field | Meaning |
|---|---|
timeline[].tweet_id | ID of the reply tweet. |
timeline[].text | Full text of the reply, including the leading @mentions. |
timeline[].screen_name | Handle of the account that wrote the reply. |
timeline[].created_at | Time the reply was posted, in a format like Tue Oct 27 22:53:14 +0000 2026. |
timeline[].conversation_id / timeline[].in_reply_to_status_id_str | ID of the tweet being replied to. Here both match the tweet_id you sent. |
timeline[].favorites / timeline[].replies / timeline[].retweets / timeline[].quotes / timeline[].bookmarks | Engagement counts for the reply itself. |
timeline[].views | View count of the reply, returned as a string. |
timeline[].lang | Language code of the reply text. |
timeline[].user_info.followers_count / timeline[].user_info.favorites_count | Follower count and favorites count of the reply author. |
next_cursor / prev_cursor | Cursor strings for the next and previous page of replies. |
next_cursor from the response as cursor in the next request to get more replies.tweet_id is the numeric ID at the end of a tweet URL. Use the tweet_id from a Twitter (X) User Posts or Twitter (X) Search result.null or empty, such as source, sensitive, user_info.description and user_info.friends_count.$0.001 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/web/latest-post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tweet_id": "2107237881668313108"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
tweet_idstring必填Tweet ID
cursorstringCursor, default is None, used for paging, obtained from the last request
这是该 API 保存的示例响应;查看时不会发起实时请求。
[
{
"data": {
"next_cursor": "DAADDAABCgABHT8q824a0AIKAAIdPuDmWVeAgAAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUdPyuoyAAnEAoABh0_K6jH_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWRQeVh2UUJvUS94MC9KWFUrbGxGRkhUOEpuTlFid1BrZFB3NTZ5eG9BdEIwL0ZGeWhWb0dkSFQ3aHZGYmJvWjBkUHZHaWY5dUFNQjAvSGRvZWxuR25IVDhtZThoYXNUZ2RQdllKOGh0UUNoMC9JazFhR25GakhUN2c3eGJXOEFJZFB4aXZZaHBoZkIwL0htc3AybEdaSFQ4cTgyNGEwQUlkUHdLeEI5dWdmaDArNE9aWlY0Q0FIVDhpbjRUYWNYSWRQeDg3YmRld29oMC9HdFIrV3JFWgAA",
"prev_cursor": "DAADDAABCgABHT8q824a0AIKAAIdPuDmWVeAgAAIAAIAAAABCAADAAAAAAgABAAAAAAKAAUdPyuoyAAnEAoABh0_K6jH_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWRQeVh2UUJvUS94MC9KWFUrbGxGRkhUOEpuTlFid1BrZFB3NTZ5eG9BdEIwL0ZGeWhWb0dkSFQ3aHZGYmJvWjBkUHZHaWY5dUFNQjAvSGRvZWxuR25IVDhtZThoYXNUZ2RQdllKOGh0UUNoMC9JazFhR25GakhUN2c3eGJXOEFJZFB4aXZZaHBoZkIwL0htc3AybEdaSFQ4cTgyNGEwQUlkUHdLeEI5dWdmaDArNE9aWlY0Q0FIVDhpbjRUYWNYSWRQeDg3YmRld29oMC9HdFIrV3JFWgAA",
"status": "ok",
"timeline": [
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:38:18 +0000 2026",
"display_text_range": [
29,
144
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "anup_x_dev",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Nearly eight months in space and they're finally coming home. I leave for one week and I'm scared to open my inbox.",
"tweet_id": "2107450375645351938",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2104692919802486784/a2fZuM_H_normal.jpg",
"cover_image": null,
"created_at": "Sat Aug 24 06:45:33 +0000 2013",
"description": null,
"favorites_count": 1948,
"followers_count": 157,
"friends_count": null,
"location": "Dubai, United Arab Emirates",
"name": "Anup",
"rest_id": "1695754196",
"screen_name": "anup_x_dev",
"url": null,
"verified": true,
"verified_type": null
},
"views": "6"
},
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:18:47 +0000 2026",
"display_text_range": [
29,
112
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "JustaJarhead71",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Proud of the American teams helping make this possible. Bring all four home safely.",
"tweet_id": "2107445463716901176",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2105766619934760961/J98zD-96_normal.jpg",
"cover_image": null,
"created_at": "Wed Jun 25 21:35:34 +0000 2008",
"description": null,
"favorites_count": 96762,
"followers_count": 4133,
"friends_count": null,
"location": "United States",
"name": "Just a Jarhead",
"rest_id": "15236949",
"screen_name": "JustaJarhead71",
"url": null,
"verified": true,
"verified_type": null
},
"views": "26"
},
{
"bookmarks": 0,
"conversation_id": "2107237881668313108",
"created_at": "Tue Oct 06 12:16:23 +0000 2026",
"display_text_range": [
29,
66
],
"entities": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [],
"user_mentions": [
{
"id_str": "11348282",
"indices": [
0,
5
],
"name": "NASA",
"screen_name": "NASA"
},
{
"id_str": "1451773004",
"indices": [
6,
20
],
"name": "International Space Station",
"screen_name": "Space_Station"
},
{
"id_str": "34743251",
"indices": [
21,
28
],
"name": "SpaceX",
"screen_name": "SpaceX"
}
]
},
"favorites": 0,
"in_reply_to_screen_name": "NASA",
"in_reply_to_status_id_str": "2107237881668313108",
"in_reply_to_user_id_str": "11348282",
"lang": "en",
"media": [],
"quotes": 0,
"replies": 0,
"retweets": 0,
"screen_name": "marixhottie",
"sensitive": null,
"source": null,
"text": "@NASA @Space_Station @SpaceX Eight months in space? I need coffee.",
"tweet_id": "2107444860135543039",
"type": "tweet",
"user_info": {
"avatar": "https://pbs.twimg.com/profile_images/2031824996591337472/wdJF2bgE_normal.jpg",
"cover_image": null,
"created_at": "Sat Mar 08 16:34:05 +0000 2025",
"description": null,
"favorites_count": 6005,
"followers_count": 164,
"friends_count": null,
"location": "New York, NY",
"name": "Mari Hottie",
"rest_id": "1898411877006225408",
"screen_name": "marixhottie",
"url": null,
"verified": false,
"verified_type": null
},
"views": "8"
},
"… 17 more items in the full response"
]
}
}
]探索更多
| API | 价格 | 响应 |
|---|---|---|
Twitter | $0.001 每次调用 | JSON |
Twitter | $0.001 每次调用 | JSON |
Twitter | $0.001 每次调用 | JSON |
Twitter | $0.001 每次调用 | JSON |
Twitter | $0.001 每次调用 | JSON |
Twitter | $0.001 每次调用 | JSON |
指南:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
问题
向 https://api.sandbase.ai/v1/api/twitter/web/latest-post-comments 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.001,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:tweet_id (string)。 可选:cursor (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Twitter (X) Latest Tweet Comments 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Twitter API 访问权限。