5 minutes

How to Scrape Twitter Followers

Learn how to extract the complete follower list of any Twitter account with profile data, follower counts, and bios.

1

Get your API key

Sign up at scrapebadger.com (free, no credit card) and copy your API key from the dashboard.

# Your API key looks like: sb_live_xxxxxxxxxxxx
2

Install the SDK

Install the ScrapeBadger SDK for your language.

# Python
pip install scrapebadger

# Node.js
npm install scrapebadger
3

Fetch the first page of followers

Call the Get Followers endpoint with the target username.

from scrapebadger import ScrapeBadger

sb = ScrapeBadger(api_key="YOUR_API_KEY")
followers = sb.twitter.users.get_followers("elonmusk")

for f in followers["data"]:
    print(f["username"], f["followers_count"])
4

Paginate through all followers

Use the cursor from the response to fetch subsequent pages until all followers are retrieved.

all_followers = []
cursor = None

while True:
    result = sb.twitter.users.get_followers("elonmusk", cursor=cursor)
    all_followers.extend(result["data"])
    cursor = result.get("next_cursor")
    if not cursor:
        break

print(f"Total followers: {len(all_followers)}")
5

Export to CSV

Save the data to a CSV file for analysis in Excel, Google Sheets, or pandas.

import csv

with open("followers.csv", "w", newline="") as f:
    writer = csv.DictWriter(f, fieldnames=["username", "name", "followers_count", "bio"])
    writer.writeheader()
    for follower in all_followers:
        writer.writerow({
            "username": follower["username"],
            "name": follower["name"],
            "followers_count": follower["followers_count"],
            "bio": follower.get("bio", ""),
        })

Frequently Asked Questions

It depends on the account size. Each page returns ~100 followers. For an account with 10,000 followers, it takes about 100 API calls (~30 seconds).

No. Only followers of public accounts are accessible through the API.

Each page of followers uses 1 credit. Scraping 10,000 followers uses approximately 100 credits.

Yes. Analyze the follower data for default avatars, empty bios, very low follower counts, and recent creation dates.

Ready to Try It?

1,000 free credits. No credit card required.

Start Free Trial