You can find this feature in Settings > Download Twitter Archive. It might take 24 hours to receive.
Unzip the file and open the data
folder in your terminal:
cd ~/Downloads/twitter-archive-zip-you-downloaded/data
(I have seen reports that this function may no longer be working, so this guide is mostly useful to those who were lucky enough to already have downloaded their archive.)
Go to Developer Portal and create a new App + Project with OAuth2 configuration.
Save the API Keys into a .env
file in the same folder as data
(which has all your downloaded Twitter data and .js
files).
TWITTER_CONSUMER_KEY="..."
TWITTER_CONSUMER_SECRET="..."
Copy the scrape_followers.js
file into the data
folder and then install deps:
npm init -y
npm install oauth axios dotenv
Then:
node scrape_followers.js
This will only save your following (people you follow) which hopefully is small enough that you can capture the whole thing without getting rate limited. If you see an error in terminal it might be that you have hit a rate limit (max 400-500 requests per day or something, and each request in this script grabs 100 followers at once).
It will save it to a file called scraped_following.json
and scraped_follower.json
which includes more details about each account.