This is a simple script that uses the Twitter API to fetch data about a user's followers and save it to a CSV file.
- You will need credentials for the Twitter API, once you have them, copy the
.env.examplefile to.envand fill it with you credentials. FillSCREEN_NAMEwith the username andOUTPUT_PATHwith an absolute path where to save the CSV file. - Install the dependencies with
npm installoryarn install. - Run
node index.jsand... wait.
Note: If the user has a lot of followers, it's possible that the script will run into an API rate limit and have to wait for around 15 minutes before continuing. Don't worry, it does this automatically and will tell you about it.
ID: Internal Twitter user ID.
NAME: User display name.
USER: Twitter username (handle, @).
FOLLOWED: True if the user owner of the API keys follows this user.
FOLLOWERS: How many accounts follow the user.
FOLLOWING: How many accounts the user follows.
LISTED: How many lists the user is listed on.
FAVOURITES: How many tweets the user has favorited.
STATUSES: How many times the user has tweeted.
CREATED_AT: Date and time of creation of the user account.
PROFILE_IMAGE: URL of the user's profile image.