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.
Extract data in minutes
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(); Start extracting x.com data in 3 steps
Get your API key
Sign up for free and get 1,000 credits instantly.
Configure your scrape
Set your target URL, output format, and stealth level.
Extract structured data
Get clean JSON back in seconds — ready for your pipeline.
Structured data endpoint
Extract structured JSON from x.com with a single POST request. AI-configured selectors, cached for fast repeat calls.
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"}' 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()) 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); 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
Data you can extract
Anti-bot bypass
Residential proxy rotation and fingerprint randomization to reliably access X pages despite aggressive bot detection.
Full React SPA
Complete JavaScript execution renders X's React interface, including lazy-loaded tweets and infinite scroll.
Rich tweet data
Extract text, engagement metrics, media, threads, and profile data in clean structured JSON.
Why teams choose Spider for x.com
Free tier with 1,000 credits. No credit card required to get started.
Scale to millions of pages. Pay only for what you use.
Unlike competitors, unused credits roll over indefinitely.
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).
More Social scrapers
Extract subreddit posts, comments, vote counts, and user data from Reddit. The fastest Reddit scraping API with full JavaScript rendering for new Reddit and old Reddit layouts.
Extract public company profiles, employee counts, job listings, and professional data from LinkedIn. The most reliable LinkedIn scraping API with residential proxy rotation and stealth browsing to handle aggressive anti-bot protection.
Extract pins, board data, user profiles, and visual content from Pinterest.
Join Zapier, Swiss Re, and 10,000+ developers
Start scraping x.com
Get your API key and start extracting data in minutes.