Alejandro Rioja.
Marketing

Twitter Scripts: Accept all Follower Requests, Unfollow, Like All Tweets, and more

Alejandro Rioja
Alejandro Rioja
6 min read
TL;DR

Browser-console scripts for X (formerly Twitter) that bulk-accept follower requests or mass-unfollow — with honest caveats: X's DOM changes constantly, these scripts break without warning, and aggressive automation violates X's ToS and risks suspension.

Free newsletter

Every Wednesday. 28,400+ operators. Zero fluff.

Table of contents

Open Table of contents

1. Accept all your X (Twitter) follower requests

Ever wanted to accept all your X follower requests at once?

You have two options:

Option 1 — Make your account public (still works)

Go to More → Settings and Support → Settings → Privacy and Safety → Audience and tagging → untick “Protect your posts”.

That will accept all pending requests and stop new ones from piling up.

Option 2 — Browser-console script (2021 original, likely broken)

Warning: This script targets CSS class names that X engineers change frequently. It may do nothing on current X. Test in a throwaway account first.

Steps:

  1. Navigate to your follower-requests page while logged in to X
  2. Open the JavaScript console (Cmd + Shift + J on Mac, Ctrl + Shift + J on Windows)
  3. Paste the code and hit Enter
js
// Originally written for Twitter 2021 — class names have changed on X
// This may no longer work. Verify selectors in DevTools before running.
var inputs = document.querySelectorAll('div.css-901oao.r-1awozwy.r-13gxpu9.r-6koalj.r-18u37iz.r-16y2uox.r-1qd0xha.r-a023e6.r-vw2c0b.r-1777fci.r-eljoum.r-dnmrzs.r-bcqeeo.r-q4m81j.r-qvutc0');
for (var i = 0; i < inputs.length; i++) {
    inputs[i].click();
}

What the code does: querySelectorAll(...) finds all “Accept” buttons by their CSS classes; the for loop iterates over them; inputs[i].click() triggers each one. If X’s class names have changed (likely), zero buttons will be found.


2. Unfollow everyone on X (Twitter)

If you care about your follower/following ratio, you can try this script to unfollow all accounts. Same caveats apply — DOM selectors are stale, and high-volume unfollowing can trigger X’s rate limits or suspension.

js
// Originally written for Twitter 2021 — class names have changed on X
// This may no longer work. Verify selectors in DevTools before running.
var inputs = document.querySelectorAll('div.css-18t94o4.css-1dbjc4n.r-urgr8i.r-42olwf.r-sdzlij.r-1phboty.r-rs99b7.r-1w2pmg.r-1vsu8ta.r-aj3cln.r-1fneopy.r-o7ynqc.r-6416eg.r-lrvibr');
for (var i = 0; i < inputs.length; i++) {
    inputs[i].click();
}

When the script was written, X would ask you to confirm each unfollow one by one:


What actually works in 2026

The free Twitter API was shut down in February 2023. X’s paid API tiers start at $200/month (Basic) and go up to $5,000/month (Pro). That puts the old “script + free API” stack out of reach for most personal accounts.

Practical options today:

If you are a developer building legitimate automation, the X API developer portal is the right starting point. Be aware that even with a paid tier, X’s automation policies restrict follow/unfollow rate limits tightly.


Bottom line

Hope you found these X growth tips useful — even if that usefulness is mostly in understanding why the old scripts no longer apply.

Here are other scripts you might enjoy:


X Automation — 2026 FAQ

Do these browser-console scripts still work on X in 2026?

Almost certainly not as written. X has rewritten its front-end multiple times since 2021. The CSS class selectors hardcoded in the original scripts change whenever X ships a major front-end update. To get them working again you would need to open DevTools on the current X DOM, find the updated class names for the relevant buttons, and substitute them. Even then, the scripts will break again the next time X pushes a redesign.

Will running automation scripts get my X account suspended?

It is a real risk. X’s Automation Rules explicitly prohibit “aggressive following or follow-churn.” Mass-unfollowing at speed has triggered enforcement actions for years. Suspension risk goes up if you are running the same action on many accounts simultaneously or if X’s systems flag unusual click velocity. Running occasional small-batch cleanup is lower risk than running it on thousands of accounts — but there is no safe threshold X publicly guarantees.

Is there a free API option for X in 2026?

No. X shut down the free API tier in February 2023. As of early 2026, the cheapest paid tier (Basic) is $200/month for 10,000 posts per month read and limited write access. The free tier only allows write access for your own app’s posts — it does not support reading timelines, follower lists, or bulk operations. See X’s developer pricing page for current rates, as they have changed multiple times.

What is the safest way to clean up my X following list today?

The genuinely safe option is to use X’s own interface. Go to your Following list, filter by “least active,” and unfollow manually. It takes more time than a script but carries zero ToS risk. If you need industrial-scale cleanup, a paid third-party tool that operates through the official API (and thus within X’s rate limits) is safer than a console script.

Related reading:


This guide is part of alejandrorioja.com — written by Alejandro Rioja, who now builds AI agent systems for founders. Including the agent that keeps this site current. How it works →

Updated for May 2026

X (the platform formerly known as Twitter, rebranded July 2023) has continued reshaping the surface area. As of 2026:

For 2026 growth: ~611M MAU per X’s last self-reported number (April 2025). Engagement still favors threaded, citation-friendly posts that get quoted by ChatGPT and Perplexity — the “X as feeder for AI engines” play is the dark-horse 2026 SEO move.

Keep reading

Get the AI playbook in your inbox

Every Wednesday. 28,400+ operators. Zero fluff.

↵ to see all results esc esc to close