Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Twitter (X) User Tweet Replies

Tài liệu 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.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 1 tùy chọn

Phòng thử nghiệm

Đầu vào
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
Đầu raVí dụ
Phản hồioutputs · 12.6 KB · 350 dòng
[
  {
    "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",

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

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.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Twitter$0.001 mỗi lần gọiJSON
Twitter$0.001 mỗi lần gọiJSON
Twitter$0.001 mỗi lần gọiJSON
Twitter$0.001 mỗi lần gọiJSON
Twitter$0.001 mỗi lần gọiJSON
Twitter$0.001 mỗi lần gọiJSON

Hướng dẫn:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Twitter (X) User Tweet Replies?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/twitter/web/user-tweet-replies với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Twitter (X) User Tweet Replies có giá bao nhiêu?

$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Twitter (X) User Tweet Replies chấp nhận những tham số nào?

Bắt buộc: screen_name (string). Tùy chọn: cursor (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Twitter (X) User Tweet Replies trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Twitter không?

Không. Twitter (X) User Tweet Replies chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Twitter.