x.com
Get a tweet and its replies on X (Twitter)
Input
tweet_url requiredFull URL of the tweet, e.g. https://x.com/handle/status/123
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.
Output
count requiredNumber of replies returned. 0 is a valid answer.
tweet requiredThe tweet at tweet_url. A deleted or unavailable tweet is an error.
replies requiredcomplete requiredTrue 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 required