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

Twitter (X) User Tweet Replies

API 文件
https://api.sandbase.ai/v1/api/twitter/web/user-tweet-replies

Returns a timeline of replies posted by a specific Twitter user. Filter by username and paginate through responses using cursor tokens.

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

Playground

輸入
Screen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk
Cursor, default is None, used for paging, obtained from the last request
輸出範例
回應outputs · 12.6 KB · 350 行
[
  {
    "data": {
      "next_cursor": null,
      "timeline": [
        {
          "author": {
            "avatar": "https://pbs.twimg.com/profile_images/1694731396730789888/gEfNsQnC_normal.jpg",
            "blue_verified": null,
            "favorites_count": 13886,
            "followers_count": 1409009,
            "name": "example",
            "rest_id": "16542877",
            "screen_name": "example"
          },
          "bookmarks": 1,
          "conversation_id": "1824146406040539301",
          "created_at": "Thu Aug 15 18:09:28 +0000 2024",
          "entities": [],
          "favorites": 44,
          "in_reply_to_status_id_str": null,
          "lang": "en",
          "media": {
            "video": [
              {
                "aspect_ratio": [
                  9,
                  16
                ],
                "duration": 19200,
                "id": "1824146306576625664",
                "media_url_https": "https://pbs.twimg.com/amplify_video_thumb/1824146306576625664/img/CEMOPLxEFPYSSyGk.jpg",
                "original_info": {
                  "focus_rects": [],
                  "height": 1920,
                  "width": 1080
                },
                "variants": [
                  {
                    "content_type": "application/x-mpegURL",
                    "url": "https://video.twimg.com/amplify_video/1824146306576625664/pl/X715wXSSX4F7Y7z1.m3u8?tag=16&v=bee"
                  },
                  {
                    "bitrate": 632000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1824146306576625664/vid/avc1/320x568/kvDXEu-pxpPbZdgB.mp4?tag=16"
                  },
                  {
                    "bitrate": 950000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1824146306576625664/vid/avc1/480x852/QvHWpyXRbFOF6QtI.mp4?tag=16"
                  },
                  "… 2 more items in the full response"
                ]
              }
            ]
          },
          "quotes": 1,
          "replies": 15,
          "retweets": 5,
          "source": null,
          "text": "Vibe Chemistry x Local x Elro X Window Kid x Example\n\n‘RUNNY EGG’\n\nOUT AT MIDNIGHT. Everywhere … 🍳 https://t.co/rtBHL7w8pC",
          "tweet_id": "1824146406040539301",
          "views": "46510"
        },
        {
          "author": {
            "avatar": "https://pbs.twimg.com/profile_images/1694731396730789888/gEfNsQnC_normal.jpg",
            "blue_verified": null,
            "favorites_count": 13886,
            "followers_count": 1409009,
            "name": "example",
            "rest_id": "16542877",
            "screen_name": "example"
          },
          "bookmarks": 0,
          "conversation_id": "1819422918192853128",
          "created_at": "Fri Aug 02 17:20:01 +0000 2024",
          "entities": {
            "urls": [
              {
                "display_url": "staneric.lnk.to/Skyscanner",
                "expanded_url": "https://staneric.lnk.to/Skyscanner",
                "url": "https://t.co/J56RHJkryd"
              }
            ],
            "user_mentions": [
              {
                "id_str": "16542877",
                "name": "example",
                "screen_name": "example"
              },
              {
                "id_str": "1356609029989138434",
                "name": "Beyond Chicago",
                "screen_name": "BeyondChicago1"
              }
            ]
          },
          "favorites": 0,
          "in_reply_to_status_id_str": null,
          "lang": "en",
          "media": {
            "video": [
              {
                "aspect_ratio": [
                  9,
                  16
                ],
                "duration": 29500,
                "id": "1819286991659261952",
                "media_url_https": "https://pbs.twimg.com/amplify_video_thumb/1819286991659261952/img/g0CAUQtaodIuqE4W.jpg",
                "original_info": {
                  "focus_rects": [],
                  "height": 1920,
                  "width": 1080
                },
                "variants": [
                  {
                    "content_type": "application/x-mpegURL",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/pl/0CaNcUnf1UXhEtSX.m3u8?tag=16&v=4ce"
                  },
                  {
                    "bitrate": 632000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/320x568/_Zulr8uSwdu0W2qI.mp4?tag=16"
                  },
                  {
                    "bitrate": 950000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/480x852/0ub9ND1YGgQhZBwf.mp4?tag=16"
                  },
                  "… 2 more items in the full response"
                ]
              }
            ]
          },
          "quotes": 0,
          "replies": 0,
          "retweeted": {
            "id": "1819287109712146478"
          },
          "retweeted_tweet": {
            "author": {
              "avatar": "https://pbs.twimg.com/profile_images/1694731396730789888/gEfNsQnC_normal.jpg",
              "blue_verified": true,
              "name": "example",
              "rest_id": "16542877",
              "screen_name": "example"
            },
            "bookmarks": 11,
            "conversation_id": "1819287109712146478",
            "created_at": "Fri Aug 02 08:20:22 +0000 2024",
            "entities": {
              "urls": [
                {
                  "display_url": "staneric.lnk.to/Skyscanner",
                  "expanded_url": "https://staneric.lnk.to/Skyscanner",
                  "indices": [
                    64,
                    87
                  ],
                  "url": "https://t.co/J56RHJkryd"
                }
              ],
              "user_mentions": [
                {
                  "id_str": "1356609029989138434",
                  "indices": [
                    37,
                    52
                  ],
                  "name": "Beyond Chicago",
                  "screen_name": "BeyondChicago1"
                }
              ]
            },
            "favorites": 83,
            "lang": "en",
            "media": {
              "video": [
                {
                  "aspect_ratio": [
                    9,
                    16
                  ],
                  "duration": 29500,
                  "id": "1819286991659261952",
                  "media_url_https": "https://pbs.twimg.com/amplify_video_thumb/1819286991659261952/img/g0CAUQtaodIuqE4W.jpg",
                  "original_info": {
                    "focus_rects": [],
                    "height": 1920,
                    "width": 1080
                  },
                  "variants": [
                    {
                      "content_type": "application/x-mpegURL",
                      "url": "https://video.twimg.com/amplify_video/1819286991659261952/pl/0CaNcUnf1UXhEtSX.m3u8?tag=16&v=4ce"
                    },
                    {
                      "bitrate": 632000,
                      "content_type": "video/mp4",
                      "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/320x568/_Zulr8uSwdu0W2qI.mp4?tag=16"
                    },
                    {
                      "bitrate": 950000,
                      "content_type": "video/mp4",
                      "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/480x852/0ub9ND1YGgQhZBwf.mp4?tag=16"
                    },
                    "… 2 more items in the full response"
                  ]
                }
              ]
            },
            "quotes": 5,
            "replies": 7,
            "retweets": 23,
            "text": "‘Skyscanner’ - new one from me & @BeyondChicago1 - OUT NOW\n\nhttps://t.co/J56RHJkryd https://t.co/KO9WG8CIlo",
            "tweet_id": "1819287109712146478",
            "views": null
          },
          "retweets": 23,
          "source": null,
          "text": "RT @example: ‘Skyscanner’ - new one from me & @BeyondChicago1 - OUT NOW\n\nhttps://t.co/J56RHJkryd https://t.co/KO9WG8CIlo",
          "tweet_id": "1819422918192853128",
          "views": "1"
        },
        {
          "author": {
            "avatar": "https://pbs.twimg.com/profile_images/1694731396730789888/gEfNsQnC_normal.jpg",
            "blue_verified": null,
            "favorites_count": 13886,
            "followers_count": 1409009,
            "name": "example",
            "rest_id": "16542877",
            "screen_name": "example"
          },
          "bookmarks": 11,
          "conversation_id": "1819287109712146478",
          "created_at": "Fri Aug 02 08:20:22 +0000 2024",
          "entities": {
            "urls": [
              {
                "display_url": "staneric.lnk.to/Skyscanner",
                "expanded_url": "https://staneric.lnk.to/Skyscanner",
                "url": "https://t.co/J56RHJkryd"
              }
            ],
            "user_mentions": [
              {
                "id_str": "1356609029989138434",
                "name": "Beyond Chicago",
                "screen_name": "BeyondChicago1"
              }
            ]
          },
          "favorites": 83,
          "in_reply_to_status_id_str": null,
          "lang": "en",
          "media": {
            "video": [
              {
                "aspect_ratio": [
                  9,
                  16
                ],
                "duration": 29500,
                "id": "1819286991659261952",
                "media_url_https": "https://pbs.twimg.com/amplify_video_thumb/1819286991659261952/img/g0CAUQtaodIuqE4W.jpg",
                "original_info": {
                  "focus_rects": [],
                  "height": 1920,
                  "width": 1080
                },
                "variants": [
                  {
                    "content_type": "application/x-mpegURL",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/pl/0CaNcUnf1UXhEtSX.m3u8?tag=16&v=4ce"
                  },
                  {
                    "bitrate": 632000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/320x568/_Zulr8uSwdu0W2qI.mp4?tag=16"
                  },
                  {
                    "bitrate": 950000,
                    "content_type": "video/mp4",
                    "url": "https://video.twimg.com/amplify_video/1819286991659261952/vid/avc1/480x852/0ub9ND1YGgQhZBwf.mp4?tag=16"
                  },
                  "… 2 more items in the full response"
                ]
              }
            ]
          },
          "quotes": 5,
          "replies": 7,
          "retweets": 23,
          "source": null,
          "text": "‘Skyscanner’ - new one from me & @BeyondChicago1 - OUT NOW\n\nhttps://t.co/J56RHJkryd https://t.co/KO9WG8CIlo",
          "tweet_id": "1819287109712146478",

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Twitter (X) User Tweet Replies API

Returns a timeline of replies posted by one Twitter (X) user, plus that user's profile details. It needs the screen_name of the account, and you can pass a cursor to load the next page.

Use cases

  • Track how a brand account answers customers and which posts it replies under.
  • Collect the replies a public figure posts to build a record of their public conversations.
  • Compare reply engagement such as favorites, retweets and views across a user's recent replies.
  • Find the parent tweet of each reply through in_reply_to_status_id_str and conversation_id, then study the threads.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/web/user-tweet-replies" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"screen_name": "NASA"}'

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

Parameters

NameTypeRequiredDescription
screen_namestringYesScreen Name, for example: elonmusk, can be obtained from the user's homepage link, for example: elonmusk in https://twitter.com/elonmusk
cursorstringNoCursor, default is None, used for paging, obtained from the last request

Example response

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

{
  "next_cursor": "DAABCgABHWL0XC5__-oKAAIdPk6_s9rwAAgAAwAAAAIAAA",
  "timeline": [
    {
      "author": {
        "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
        "blue_verified": true,
        "favourites_count": null,
        "followers_count": null,
        "name": "NASA",
        "rest_id": "11348282",
        "screen_name": "NASA"
      },
      "bookmarks": 22,
      "conversation_id": "2117383753139925271",
      "created_at": "Mon Nov 02 22:30:00 +0000 2026",
      "entities": {
        "urls": [
          {
            "display_url": "go.nasa.gov/3V2iiWX",
            "expanded_url": "https://go.nasa.gov/3V2iiWX",
            "url": "https://t.co/aqD1x7wzRq"
          }
        ]
      },
      "favorites": 470,
      "in_reply_to_status_id_str": null,
      "lang": "en",
      "media": {
        "photo": [
          {
            "id": "2117375637358882816",
            "media_url_https": "https://pbs.twimg.com/media/HWJt7IDXsAAa7bN.jpg"
          }
        ]
      },
      "quotes": 6,
      "replies": 39,
      "retweets": 45
    }
  ],
  "user": {
    "affiliates": [],
    "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
    "blue_verified": true,
    "business_account": {
      "affiliates_count": 85
    },
    "created_at": "Wed Dec 19 20:20:32 +0000 2007",
    "desc": "Making the seemingly impossible, possible. ✨",
    "friends": 115,
    "header_image": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
    "id": "11348282",
    "location": "Pale Blue Dot",
    "media_count": 28223,
    "name": "NASA"
  }
}

Response fields

FieldMeaning
timeline[].tweet_idID of the tweet in the timeline, as a string.
timeline[].textText of the tweet. Long text may be cut off with an ellipsis.
timeline[].created_atPost time as a text date, for example Mon Nov 02 22:30:00 +0000 2026.
timeline[].in_reply_to_status_id_strID of the tweet this one replies to. It is null when the item is not a direct reply.
timeline[].conversation_idID of the tweet that started the conversation thread.
timeline[].favorites / timeline[].retweets / timeline[].replies / timeline[].quotes / timeline[].bookmarksEngagement counts for the tweet.
timeline[].viewsView count for the tweet, returned as a string.
timeline[].author.screen_name / timeline[].author.name / timeline[].author.rest_idHandle, display name and numeric ID of the account that wrote the tweet. A timeline item can come from another account in the same thread.
user.rest_id / user.screen_nameID and handle of the account you looked up.
user.sub_count / user.statuses_count / user.friendsCounts on the profile: sub_count is the subscriber count, statuses_count is the number of posts, and friends is the number of accounts it follows.
next_cursorCursor token to send as cursor to get the next page.

Notes

  • Take screen_name from the profile URL. For https://twitter.com/NASA, use NASA.
  • For the next page, send the next_cursor value from the last response as cursor, with the same screen_name.
  • The timeline can include tweets from the looked-up user and from other accounts in the same thread. Check timeline[].author.screen_name to tell them apart.
  • To read the replies under a single tweet, use Twitter (X) Tweet Comments with its tweet_id.

Pricing

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

探索更多

相關 APIs

所有 APIs
API價格回應
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON

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

問題

常見問題

我要如何使用 Twitter (X) User Tweet Replies API?

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

Twitter (X) User Tweet Replies API 的費用是多少?

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

Twitter (X) User Tweet Replies API 接受哪些參數?

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

Twitter (X) User Tweet Replies API 會回傳什麼?

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

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

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