탐색으로 건너뛰기

How do I fetch replies to a post rather than replies written by an account?

To collect replies under one X post, call twitter.web.fetch_post_comments with that post’s tweet_id. To inspect replies authored by an X account, call twitter.web.fetch_user_tweet_replies with that account’s screen_name.

Choosing between fetch_post_comments and fetch_user_tweet_replies

Pick the action based on whether your target is a single post discussion or an account’s outbound reply timeline:

  • Replies to one post (twitter.web.fetch_post_comments): Pass tweet_id to collect reader questions under a specific post, such as a launch announcement:
{"action":"twitter.web.fetch_post_comments","params":{"tweet_id":"<tweet_id>"}}
  • Replies written by one account (twitter.web.fetch_user_tweet_replies): Pass screen_name to review whom an account has replied to, such as auditing answers sent by a support account:
{"action":"twitter.web.fetch_user_tweet_replies","params":{"screen_name":"<screen_name>"}}

Paginating replies under the same post

When fetching additional pages of replies for the same X post:

  1. Locate the actual cursor value returned in the saved twitter.web.fetch_post_comments response.
  2. Send the next twitter.web.fetch_post_comments request with the same tweet_id and pass that cursor value as cursor:
{"action":"twitter.web.fetch_post_comments","params":{"tweet_id":"<tweet_id>","cursor":"<saved_cursor>"}}

Preserving thread context during handoff

When quoting or handing over a collected reply, always attach the original post or thread that the reply answers so readers can verify what the commenter was responding to.

Review post replies · BeatAPI pricing