Developer tutorial
How to scrape Twitter (X) profiles with Node.js (2026)
This tutorial shows how to scrape Twitter (X) profiles in Node.js using the SocialCrawl API. You get a handle's follower and following counts, bio, verification, location, join date, and avatar without the paid X API from one GET request, with no X developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.
Code tested July 2026
How it works
- 1Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
- 2Set up Node.jsUse Node.js 18 or newer, which includes the fetch API with no extra packages.
- 3Call the X Profile endpointSend a GET request to /v1/twitter/profile with your API key in the x-api-key header and the `handle` parameter.
- 4Read the responseParse the JSON. SocialCrawl returns a handle's follower and following counts, bio, verification, location, join date, and avatar without the paid X API in one normalized schema, so you write no HTML parsing or proxy code.
The code
A real, unedited response from the request above.
const params = new URLSearchParams({
"handle": "NASA",
});
const response = await fetch(
`https://www.socialcrawl.dev/v1/twitter/profile?${params}`,
{ headers: { "x-api-key": "YOUR_API_KEY" } },
);
const data = await response.json();
console.log(data);[ RESPONSE ]
{
"success": true,
"platform": "twitter",
"endpoint": "/v1/twitter/profile",
"data": {
"author": {
"id": "11348282",
"username": "NASA",
"display_name": "NASA",
"avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
"bio": "Making the seemingly impossible, possible. ✨",
"verified": true,
"followers": 92203829,
"following": 119,
"posts_count": 74231,
"likes_count": null,
"url": "https://x.com/i/communities/11348282",
"private": false,
"joined_at": null
},
"computed": {
"engagement_rate": null,
"language": "en",
"content_category": "other",
"estimated_reach": null
}
},
"credits_used": 1,
"credits_remaining": 9999,
"request_id": "req_example000000",
"cached": false
}Prefer another language?
FAQ
Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usDo I need a X developer account to scrape Twitter (X) profiles?
No. SocialCrawl handles authentication and proxies upstream, so you never register a X app, manage OAuth tokens, or run your own scrapers. One API key returns X data directly.
What does the X Profile endpoint return?
It returns a handle's follower and following counts, bio, verification, location, join date, and avatar without the paid X API. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape Twitter (X) profiles?
Each call costs a small number of credits, and new accounts start with free credits. There are no monthly minimums, so you pay only for the calls you make.
Can I use this Node.js code in production?
Yes. The snippet on this page is the real request against the live API. For production, add error handling and follow the response cursor to paginate through large result sets.
Ask AI about SocialCrawl
