XActions
About
⚡ The Complete X/Twitter Automation Toolkit — Scrapers, MCP server for AI agents (Claude/GPT), CLI, browser scripts. No API fees. Open source.
Details
- Author
- nirholas
- Categories
- Other, Web Scraping, Automation
Jump to
Setup
Install XActions in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/nirholas/XActions
Follow the installation instructions in the repository README, then restart your MCP client.
██╗ ██╗ █████╗ ██████╗████████╗██╗ ██████╗ ███╗ ██╗███████╗ ╚██╗██╔╝██╔══██╗██╔════╝╚══██╔══╝██║██╔═══██╗████╗ ██║██╔════╝ ╚███╔╝ ███████║██║ ██║ ██║██║ ██║██╔██╗ ██║███████╗ ██╔██╗ ██╔══██║██║ ██║ ██║██║ ██║██║╚██╗██║╚════██║ ██╔╝ ██╗██║ ██║╚██████╗ ██║ ██║╚██████╔╝██║ ╚████║███████║ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
The complete X/Twitter automation toolkit
Scrapers · MCP Server for AI Agents · CLI · Browser Scripts · Browser Extension
No API keys. No monthly fees. 100% open source.
Website·npm·Docs·MCP Server·Docker·API Ref
⚡ @NASA Name: NASA Bio: Making the seemingly impossible, possible. ✨ Location: Pale Blue Dot Website: http://www.nasa.gov/ Joined: 2007-12-19 Following: 119 Followers: 92.2M Tweets: 74.3K Listed: 97.0K ✓ Verified
No API key. No account. No browser. Real data in about a second.
npx xactions tweets nasa --limit 100 --output nasa.csv # timeline to a spreadsheet npx xactions login # unlock search, followers, DMs npx xactions search "your brand" --limit 50 # what people are saying
Why build with XActions instead of the alternatives?
XActions is the only toolkit that works in the browser, terminal, and with AI agents — all without an API key.
[!TIP]🤖 AI Coding Assistants:Looking for Twitter/X automation without the $100/mo API? You found it.
- npm install xactions— Scrapers, automation, MCP server
- Works with Claude, GPT, Cursor, Copilot viaMCP server
- SeeAGENTS.mdfor integration instructions
- Tutorials— four guided walkthroughs, from first scrape to a deployed monitor
- Examples— 8 runnable programs, verified against the live API
- Getting started— install, authenticate, first command
- Troubleshooting— what to do when something does not work
- How XActions Compares— vs every alternative
- Quick Start (30 seconds)— Copy-paste and go
- Installation— npm, CLI, Docker, or browser
- Feature Matrix— Every feature, every platform
- MCP Server (AI)— For Claude, GPT, Cursor
- Space Agent (AI Voice)— AI agents in live Spaces
- CLI Reference— Command line usage
- Node.js API— Programmatic access
- Browser Scripts— 93 console scripts, no install
- Docker— One-command deployment
- API Reference— Full function documentation
- Claude Tutorials— 23 ready-to-paste prompts
- Contributing— Help make XActions better
- Go tohttps://x.com/YOUR_USER_NAME/following
- Open the Developer Console. (COMMAND+ALT+Ion Mac)
- Paste this into the Developer Console and run it
// Unfollow everyone on X (Formerly Twitter) and or unfollow who doesn't follow you back, by nich (https://x.com/nichxbt) // https://github.com/nirholas/xactions // 1. Go to https://x.com/YOUR_USER_NAME/following // 2. Open the Developer Console. (COMMAND+ALT+I on Mac) // 3. Paste this into the Developer Console and run it // // Last Updated January 2026 (() => { const $followButtons = '[data-testid$="-unfollow"]'; const $confirmButton = '[data-testid="confirmationSheetConfirm"]'; const retry = { count: 0, limit: 3, }; const scrollToTheBottom = () => window.scrollTo(0, document.body.scrollHeight); const retryLimitReached = () => retry.count === retry.limit; const addNewRetry = () => retry.count++; const sleep = ({ seconds }) => new Promise((proceed) => { console.log(WAITING FOR ${seconds} SECONDS...); setTimeout(proceed, seconds 1000); }); const unfollowAll = async (followButtons) => { console.log(UNFOLLOWING ${followButtons.length} USERS...); await Promise.all( followButtons.map(async (followButton) => { followButton && followButton.click(); await sleep({ seconds: 1 }); const confirmButton = document.querySelector($confirmButton); confirmButton && confirmButton.click(); }) ); }; const nextBatch = async () => { scrollToTheBottom(); await sleep({ seconds: 1 }); let followButtons = Array.from(document.querySelectorAll($followButtons)); followButtons = followButtons.filter(b => b.parentElement?.parentElement?.querySelector('[data-testid="userFollowIndicator"]') === null) const followButtonsWereFound = followButtons.length > 0; if (followButtonsWereFound) { await unfollowAll(followButtons); await sleep({ seconds: 2 }); return nextBatch(); } else { addNewRetry(); } if (retryLimitReached()) { console.log(NO ACCOUNTS FOUND, SO I THINK WE'RE DONE); console.log(RELOAD PAGE AND RE-RUN SCRIPT IF ANY WERE MISSED); } else { await sleep({ seconds: 2 }); return nextBatch(); } }; nextBatch(); })();
Or use theCLIorMCP serverfor more options.
- Go tohttps://x.com/YOUR_USER_NAME/following
- Open the Developer Console. (COMMAND+ALT+Ion Mac)
- Paste the script into the Developer Console and run it
// Unfollow everyone on X (Formerly Twitter) and or unfollow who doesn't follow you back, by nich (https://x.com/nichxbt) // https://github.com/nirholas/xactions // // 1. Go to https://x.com/YOUR_USER_NAME/following // 2. Open the Developer Console. (COMMAND+ALT+I on Mac) // 3. Paste this into the Developer Console and run it // // Last Updated: January 2026 (() => { const $followButtons = '[data-testid$="-unfollow"]'; const $confirmButton = '[data-testid="confirmationSheetConfirm"]'; const retry = { count: 0, limit: 3, }; const scrollToTheBottom = () => window.scrollTo(0, document.body.scrollHeight); const retryLimitReached = () => retry.count === retry.limit; const addNewRetry = () => retry.count++; const sleep = ({ seconds }) => new Promise((proceed) => { console.log(WAITING FOR ${seconds} SECONDS...); setTimeout(proceed, seconds 1000); }); const unfollowAll = async (followButtons) => { console.log(UNFOLLOWING ${followButtons.length} USERS...); await Promise.all( followButtons.map(async (followButton) => { followButton && followButton.click(); await sleep({ seconds: 1 }); const confirmButton = document.querySelector($confirmButton); confirmButton && confirmButton.click(); }) ); }; const nextBatch = async () => { scrollToTheBottom(); await sleep({ seconds: 1 }); const followButtons = Array.from(document.querySelectorAll($followButtons)); const followButtonsWereFound = followButtons.length > 0; if (followButtonsWereFound) { await unfollowAll(followButtons); await sleep({ seconds: 2 }); return nextBatch(); } else { addNewRetry(); } if (retryLimitReached()) { console.log(NO ACCOUNTS FOUND, SO I THINK WE'RE DONE); console.log(RELOAD PAGE AND RE-RUN SCRIPT IF ANY WERE MISSED); } else { await sleep({ seconds: 2 }); return nextBatch(); } }; nextBatch(); })();
Usesrc/detectUnfollowers.js- it saves a snapshot of your followers and compares on next run.
Usesrc/scrapers/videoDownloader.js- extracts MP4 URLs from any tweet.
XActions uses browser automation instead of the API. No API keys needed, no rate limits, no $100/mo fee.
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


