DEV Community

agenthustler
agenthustler

Posted on

How to Scrape Twitter/X Data Without the API [2026 Guide]

If you have ever tried to pull data from Twitter/X programmatically, you know the pain. The official API v2 is expensive, rate-limited, and increasingly restrictive.

Why Developers Need Twitter/X Data

Twitter remains one of the richest real-time data sources on the internet.

1. Brand and Reputation Monitoring

Track what people say about your company, product, or competitors. Unlike Google Alerts, Twitter gives you real-time sentiment.

2. Market Research and Trend Detection

What topics are gaining traction in your niche? Which hashtags are emerging? Twitter data lets you build early-warning systems for trends.

3. Academic and Journalistic Research

Researchers studying misinformation, political discourse, or public health communication need large tweet datasets. The official Academic Research track was deprecated.

4. Lead Generation and Sales Intelligence

Monitor tweets from people asking for recommendations in your space.

5. Competitive Intelligence

Track your competitors engagement, messaging changes, and audience reactions.

The Twitter API Pricing Problem

Tier Monthly Cost Tweet Read Limit
Free $0 100 reads/month
Basic $200/mo 10,000 reads/month
Pro $5,000/mo 1,000,000 reads/month
Enterprise Custom Negotiated

For most developers and small teams, $200/month for just 10K tweets is a non-starter.

A Better Approach: Web Scraping with Apify

Instead of fighting the API, you can scrape public Twitter data using a pre-built actor on Apify. The Twitter/X Scraper handles all the complexity so you just define what you want and get structured JSON back.

The cost? $0.005 per tweet on a pay-per-result basis. No monthly commitment.

Quick comparison:

  • 10,000 tweets via Twitter API Basic: $200/month (fixed subscription)
  • 10,000 tweets via web scraping: $50 (one-time, no subscription)
  • 50,000 tweets via Twitter API: $5,000/month (need Pro tier)
  • 50,000 tweets via web scraping: $250 (one-time)

For most use cases, that is a 75-95% cost reduction.

Getting Started: Python Example

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "searchTerms": ["#machinelearning"],
    "maxTweets": 500,
    "sort": "Latest",
}

run = client.actor("cryptosignals/twitter-scraper").call(run_input=run_input)

for tweet in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(tweet["text"][:100])
    print(f"Likes: {tweet['likeCount']} | Retweets: {tweet['retweetCount']}")
Enter fullscreen mode Exit fullscreen mode

Install the client with:

pip install apify-client
Enter fullscreen mode Exit fullscreen mode

No browser setup, no proxy configuration, no CAPTCHA solving. The actor handles everything.

What Data Do You Get Back?

Each scraped tweet includes structured fields like:

  • Tweet text and media URLs
  • Author info including username, display name, follower count, verification status
  • Engagement metrics including likes, retweets, replies, quotes, views
  • Timestamps and tweet IDs
  • Hashtags and mentions

Real-World Integration Ideas

Slack alerts for brand mentions:
Run the scraper on a schedule using Apify built-in cron scheduling, filter for your brand name, and push matches to a Slack webhook.

Trend dashboard with Streamlit:
Collect tweets for a set of keywords daily, track volume over time, and visualize emerging trends.

Lead scoring enrichment:
Cross-reference Twitter activity with your CRM contacts. Prospects who tweet about problems your product solves? Move them up the queue.

Research datasets:
Export thousands of tweets to CSV or JSON for NLP analysis, sentiment classification, or network graph studies.

Getting Started

  1. Create a free Apify account at apify.com
  2. Navigate to the Twitter/X Scraper in the Apify Store
  3. Configure your search with keywords, hashtags, user profiles, or specific URLs
  4. Run it directly in the browser or via the Python/Node.js client
  5. Download your data in JSON, CSV, or Excel format

You can test the actor with free platform credits before committing any budget. If you are building something that needs Twitter data, this is the fastest path from needing tweets to having a dataset.


Have questions about scraping Twitter data or want to share what you are building? Drop a comment below.

Top comments (0)