Back to templates
Social Mediaextract
4.5
1.4k uses
X (Twitter) Profile Scraper
Extract public profile data from X/Twitter including display name, handle, bio, follower count, and tweet count
Target URL
https://x.com/elonmuskVisit SiteSteps
1
Go to X profile page
navigate
2
Wait for profile data to load
wait
3
Extract profile data
extract
| Field | Selector | Transform |
|---|---|---|
| displayName | [data-testid='UserName'] span:first-child | text |
| handle | [data-testid='UserName'] div:nth-child(2) span | text |
| bio | [data-testid='UserDescription'] | text |
| followerCount | a[href$='/verified_followers'] span span | text |
| followingCount | a[href$='/following'] span span | text |
| tweetCount | [data-testid='UserName'] + div | text |
Output Schema
| Field | Type |
|---|---|
| displayName | string |
| handle | string |
| bio | string |
| followerCount | string |
| followingCount | string |
| tweetCount | string |
Example Output
| displayName | handle | bio | followerCount | followingCount | tweetCount |
|---|---|---|---|---|---|
| Elon Musk | @elonmusk | Mars & Cars, Chips & Dips | 195.2M | 812 | 42.1K posts |
| Sam Altman | @sama | CEO of OpenAI | 3.8M | 1,247 | 8.9K posts |
| Dario Amodei | @DarioAmodei | CEO of Anthropic | 482K | 318 | 1.2K posts |
API Endpoint
curl -X POST https://api.scraper.bot/v1/flows \
-H "Authorization: Bearer scr_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tmpl-twitter-profile",
"url": "https://x.com/elonmusk"
}'