Get a tweet and its replies on X (Twitter)
Input
sort optionalOrder of the replies, as in the page's Sort replies menu: relevance (X's default ranking), recency (newest first) or likes (most liked first).
Default: "relevance"count optionalHow many replies to return. Without it, the script returns the first page X shows (often 20 to 40). With it, the script loads more until it has count, reaches the end, or X stops loading; complete says whether it reached the end.
tweet_url optionalFull URL of the tweet, e.g. https://x.com/handle/status/123.
tweet_urls optionalNot supported since 19 Oct 2026: the run fails with a message saying so. Send one tweet_url per call and fan out with run_script's scripts.
Output
count optionalNumber of replies returned. 0 is a valid answer.
tweet optionalThe tweet at tweet_url. A deleted or unavailable tweet is an error.
replies optionalcomplete optionalTrue when X showed the end of the conversation and every reply it sent is returned. False when there may be more. Replies behind "Show replies" are not opened, so true is a floor.
tweet_id optional