Scraping Central is reader-supported. When you buy through links on our site, we may earn an affiliate commission.

Guide

How to Scrape Twitter Follower Data

Learn how to extract Twitter (X) follower lists, profiles, and engagement data. Covers the official API, scraping techniques, and third-party tools.

Twitter (now X) follower data is valuable for influencer analysis, audience research, and social media marketing. Here is how to access it.

What Follower Data Can You Get?

  • Follower/following lists, Who follows whom
  • Profile information, Bio, location, join date, verified status
  • Engagement metrics, Followers, following, tweet count
  • Recent tweets, Content and engagement from followers
  • Mutual connections, Overlapping follower networks

Method 1: Twitter API v2 (Official)

The official API is the most reliable approach, though access tiers have changed significantly.

import requests

BEARER_TOKEN = "YOUR_BEARER_TOKEN"
user_id = "12345678"

url = f"https://api.twitter.com/2/users/{user_id}/followers"
headers = {"Authorization": f"Bearer {BEARER_TOKEN}"}
params = {
    "max_results": 100,
    "user.fields": "description,location,public_metrics,verified"
}

resp = requests.get(url, headers=headers, params=params)
followers = resp.json().get("data", [])

for follower in followers:
    print(f"{follower['name']} - {follower['public_metrics']['followers_count']} followers")

API Tiers:

Tier Price Follower Lookups
Free $0 Very limited
Basic $100/mo 10,000 requests
Pro $5,000/mo 300,000 requests

Method 2: Web Scraping with ScraperAPI

For large-scale follower data without API costs, scrape Twitter profiles directly using ScraperAPI.

import requests

API_KEY = "YOUR_SCRAPERAPI_KEY"
url = "https://x.com/username/followers"

resp = requests.get(
    f"http://api.scraperapi.com?api_key={API_KEY}&url={url}&render=true"
)

Twitter is heavily JavaScript-dependent, so rendering is essential.

Method 3: Third-Party Tools

  • Twint, Open-source Twitter scraping tool (check current status)
  • snscrape, Multi-platform social media scraper
  • Apify Twitter Scraper, Cloud-based scraping actor

Use Cases

  • Influencer marketing, Find relevant followers for campaigns
  • Audience analysis, Understand demographics and interests
  • Competitive intelligence, Analyze competitor follower bases
  • Lead generation, Find potential customers by interest

Best Practices

  1. Start with the official API if your budget allows
  2. Use ScrapingAnt with residential proxies for web scraping, Twitter blocks datacenter IPs
  3. Paginate with cursors, Both API and web results use cursor-based pagination
  4. Respect privacy, Do not build profiles on individuals without consent
  5. Cache follower data, Follower lists change slowly; no need to re-scrape daily
  6. Handle rate limits gracefully, Both the API and website enforce strict limits