NEW AI Studio is now available Try it now
Social Verified

Twitter/X Scraper API

Extract tweets, user profiles, engagement metrics, and trending topics from X (formerly Twitter). Full stealth browsing with residential proxies to handle X's aggressive bot detection. Powered by spider-browser .

X (formerly Twitter) has some of the most aggressive anti-scraping defenses on the web. Spider uses browser fingerprint rotation, residential proxies, and real browser rendering to reliably extract tweets, profiles, and engagement data at scale.

Get Started Documentation Free tier — no credit card
x.com target
Stealth mode anti-bot bypass
Real-time data freshness
Quick Start

Extract data in minutes

twitter-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://x.com/OpenAI");
await page.content(12000);

const data = await page.evaluate(`(() => {
  const tweets = [];
  document.querySelectorAll("article[data-testid='tweet']").forEach(el => {
    const text = el.querySelector("[data-testid='tweetText']")?.textContent?.trim();
    const time = el.querySelector("time")?.getAttribute("datetime");
    const likes = el.querySelector("[data-testid='like'] span")?.textContent?.trim();
    const retweets = el.querySelector("[data-testid='retweet'] span")?.textContent?.trim();
    if (text) tweets.push({ text: text.slice(0, 280), time, likes, retweets });
  });
  return JSON.stringify({ total: tweets.length, tweets: tweets.slice(0, 10) });
})()`);

console.log(JSON.parse(data));
await spider.close();
✓ ready to run | spider-browser | TypeScript
How It Works

Start extracting x.com data in 3 steps

01

Get your API key

Sign up for free and get 1,000 credits instantly.

02

Configure your scrape

Set your target URL, output format, and stealth level.

03

Extract structured data

Get clean JSON back in seconds — ready for your pipeline.

Fetch API

Structured data endpoint

Extract structured JSON from x.com with a single POST request. AI-configured selectors, cached for fast repeat calls.

POST /fetch/x.com/
Tweet textAuthorLikesRetweetsRepliesTimestamp
curl
curl -X POST https://api.spider.cloud/fetch/x.com/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_format": "json"}'
Python
import requests

resp = requests.post(
    "https://api.spider.cloud/fetch/x.com/",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={"return_format": "json"},
)
print(resp.json())
Node.js
const resp = await fetch("https://api.spider.cloud/fetch/x.com/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ return_format: "json" }),
});
const data = await resp.json();
console.log(data);
Use Cases

What people build with x.com data

Social Listening

Monitor brand mentions, competitor activity, and industry conversations across public tweets and threads.

Trend Analysis

Track trending topics, hashtags, and viral content to spot emerging narratives before they peak.

Influencer Research

Analyze engagement rates, follower counts, and posting patterns to identify high-value accounts for partnerships.

News Monitoring

Capture breaking news and real-time updates from journalist accounts, news outlets, and official sources.

Start extracting x.com data today

1,000 free credits — no credit card required

Extraction

Data you can extract

Tweet textAuthorLikesRetweetsRepliesTimestampMediaHashtags
Stealth

Anti-bot bypass

Residential proxy rotation and fingerprint randomization to reliably access X pages despite aggressive bot detection.

Rendering

Full React SPA

Complete JavaScript execution renders X's React interface, including lazy-loaded tweets and infinite scroll.

Data

Rich tweet data

Extract text, engagement metrics, media, threads, and profile data in clean structured JSON.

Why Spider

Why teams choose Spider for x.com

$0 to start

Free tier with 1,000 credits. No credit card required to get started.

No rate limits

Scale to millions of pages. Pay only for what you use.

Credits never expire

Unlike competitors, unused credits roll over indefinitely.

FAQ

Common questions about scraping x.com

Can I scrape X/Twitter without API access?

Yes. Spider renders X pages in a real browser and extracts data from the DOM. No Twitter/X API keys or paid API tier required.

How does Spider handle X's anti-bot detection?

Spider uses residential proxy rotation, browser fingerprint randomization, and stealth browsing with real Chrome instances to avoid detection.

What data can I extract from X?

Tweet text, author info, likes, retweets, replies, timestamps, media attachments, hashtags, and full user profiles.

Can I scrape X search results?

Yes. Spider can render X search results pages and extract tweets matching any query, hashtag, or advanced search filter.

Does scraping X violate their terms?

Spider accesses only publicly visible content. The legality of scraping public social media data is supported by court precedent (hiQ v. LinkedIn).

Related

More Social scrapers

Join Zapier, Swiss Re, and 10,000+ developers

Start scraping x.com

Get your API key and start extracting data in minutes.