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): Passtweet_idto collect reader questions under a specific post, such as a launch announcement:
- Replies written by one account (
twitter.web.fetch_user_tweet_replies): Passscreen_nameto review whom an account has replied to, such as auditing answers sent by a support account:
Paginating replies under the same post
When fetching additional pages of replies for the same X post:
- Locate the actual cursor value returned in the saved
twitter.web.fetch_post_commentsresponse. - Send the next
twitter.web.fetch_post_commentsrequest with the sametweet_idand pass that cursor value ascursor:
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.

