Official scripts
Explore our curated collection of scripts
Create X List
Creates a new X List with a name, optional description, and public/private visibility.
Bookmark tweet
Bookmark a tweet given its URL. Already-bookmarked tweets are reported rather than re-bookmarked. Returns tweet_id, bookmarked, was_bookmarked.
Retweet
Repost (retweet) a tweet given its URL. Safe to repeat: an already-reposted tweet is reported rather than reposted again. Returns tweet_id, retweeted, was_retweeted, and the repost's id.
Search X users
Search X for accounts by keyword (the People tab). Returns per account: user_id, handle, name, followers, following, tweets, verified, location, website, bio.
Get Community Posts
Reads the post feed of an X Community (Top or Latest), including author, text, media, and engagement counts.
Get X list members
List the accounts that belong to an X list, given the list's URL or id. Returns per account: user_id, handle, name, followers, following, tweets, verified, location, website, bio.
Unblock X user
Unblock an X user by handle. Accounts that aren't blocked are reported rather than erroring. Returns handle, blocked, was_blocked.
Like tweet
Like a tweet given its URL. Safe to repeat: an already-liked tweet is reported, not re-liked. Returns tweet_id, liked, was_liked.
Get X trending topics
Read X's Explore trends for a given tab (trending, news, sports, entertainment or for-you), with each trend's rank, name, context line and post count where shown. Results are personalised to the logged-in account's location and interests, not a global chart.
Unretweet
Undo your repost of a tweet given its URL. Tweets that aren't currently reposted are reported rather than causing an error. Returns tweet_id, retweeted, was_retweeted.
Get X list tweets
Read the timeline of an X list — the tweets from its member accounts, newest first, given the list's URL or id. Returns per tweet a canonical record: id, url, author {id, handle, name}, text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, is_retweet, is_quote.
Block X user
Block an X user by handle. Already-blocked accounts are reported rather than re-blocked. Returns handle, blocked, was_blocked.
Get X post analytics
Read a single X post's owner-only analytics panel (impressions, engagements, detail expands, profile visits, link clicks, and on media posts views/unique views, plus likes, reposts and replies) by post URL or id. Requires that the post belongs to the logged-in account. Returns metrics as a label-to-value list since the set varies by post type; the UI is assumed to be English, and abbreviated large counts (e.g. 1.2K) make `value` approximate. X sometimes shows a transient Retry error, so re-run on failure.
Get post reposters
List the accounts that reposted (retweeted) an X post, by post URL. Returns per account: user_id, handle, name, followers, following, tweets, verified, location, website, bio. X returns a sample of reposters, not the full set: high-repost posts cap out a few hundred deep.
Search X tweets
Search X for tweets, supporting all X search operators; the tab arg picks 'top' (ranked sample, default) or 'latest' (chronological). Returns per tweet a canonical record: id, url, author {id, handle, name}, text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, is_retweet, is_quote, plus followers (the author's follower count, a search-only enrichment), and the top-level query and count. Top is a ranked sample, not exhaustive.
Get X follows
List a user's followers or the accounts they follow, by handle — selected by the direction arg ('followers', the default, or 'following'). Returns per account: user_id, handle, name, followers, following, tweets, verified, location, website, bio. Scrolls until count is met or the list dries up.
Delete tweet
Delete one of your own tweets given its URL. Returns the deleted tweet id and a deleted flag.
Get X notifications
List the logged-in account's Notifications > All tab (not just mentions) — follows, likes, retweets, replies and other notification types X surfaces there. Returns per notification: id, type (a stable X-internal event key, e.g. users_followed_you), icon, text (the rendered notification sentence), url (the notification's target link, if any), timestamp_ms, and users (the accounts referenced in the notification text, with id/handle/name). Scrolls until count is met or the feed dries up.
Get X user info
Look up an X user's profile by handle. Returns handle, user_id, name, bio, location, website, joined, followers_count, following_count, is_verified, is_self, is_following, follows_you. Follower/following counts are exact integers, not X's abbreviated "3.7M" display text. bio and website carry the real destination URLs, with X's t.co shortlinks resolved. is_following is null on your own profile (you have no follow relationship to yourself); user_id is always present.
Get X mentions
List recent tweets mentioning the logged-in account (the Notifications > Mentions tab). Returns per tweet a canonical record: id, url, author {id, handle, name}, text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, is_retweet, is_quote, and in_reply_to {id, author_handle} (null unless the mention is a reply). Scrolls until count is met or the list dries up.
Follow X user
Follow an X user. Returns handle, was_following, is_following, status. Already-following accounts are reported rather than re-followed; errors on missing or suspended accounts.
Get X quote tweets
List the tweets that quote-tweeted a given X post, by post URL, including each quoter's own commentary. Returns per tweet a canonical record: id, url, author {id, handle, name}, text, created_at, lang, likes, retweets, replies, quotes, bookmarks, views, is_retweet, is_quote.
Like a TikTok video
Like a TikTok video (as the logged-in account) by URL or id. Safe to repeat: it does nothing if you already liked it.
Get YC company profile
Get one YC company's full public profile (ycombinator.com/companies/<slug>): pitch, batch/status, founders, socials, open jobs, news, launches, photos, founder Q&A.
Get X user posts
Get a user's Posts tab by handle (x.com/<handle>) — their own tweets and self-threads, newest first. Excludes replies to others (see get_user_replies for the Replies tab), and excludes reposts, which X keeps on a separate Reposts tab. The post count shown on the profile header includes replies, so expect fewer items than that number. Returns per tweet: id, url, text, created_at, lang, likes, retweets, replies, quotes, views, bookmarks, is_retweet, is_quote. Count is capped by how far X paginates before throttling.
