100 free credits — no credit card required.Start building
Logo
Developer tutorial

How to scrape Facebook profiles with Node.js (2026)

This tutorial shows how to scrape Facebook profiles in Node.js using the SocialCrawl API. You get a page's name, category, like and follower counts, about text, website, and profile photo from its public URL from one GET request, with no Facebook developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.

How it works

  1. 1
    Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
  2. 2
    Set up Node.jsUse Node.js 18 or newer, which includes the fetch API with no extra packages.
  3. 3
    Call the Facebook Profile endpointSend a GET request to /v1/facebook/profile with your API key in the x-api-key header and the `url` parameter.
  4. 4
    Read the responseParse the JSON. SocialCrawl returns a page's name, category, like and follower counts, about text, website, and profile photo from its public URL 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({
  "url": "https://www.facebook.com/nasa",
});

const response = await fetch(
  `https://www.socialcrawl.dev/v1/facebook/profile?${params}`,
  { headers: { "x-api-key": "YOUR_API_KEY" } },
);
const data = await response.json();
console.log(data);
[ RESPONSE ]
{
  "success": true,
  "platform": "facebook",
  "endpoint": "/v1/facebook/profile",
  "data": {
    "author": {
      "id": "100044561550831",
      "username": null,
      "display_name": "NASA - National Aeronautics and Space Administration",
      "avatar_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?stp=dst-png&cstp=mx800x800&ctp=s480x480&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=8JwJCEbIJtcQ7kNvwF4m0PJ&_nc_oc=Adpb2KtMW7iJcfQDw5vrJ2gcmOIYzxcbskBkWUvyXuKB2knLf3KxIB31iNdtSSQfmXk&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=bQj0PJvWT0cTfauTYxaM5g&_nc_ss=7f289&oh=00_AQB2XBNizGaJC4t72LBffYn6lbMWlgguJwwv2jPTGaMcTQ&oe=6A632E95",
      "bio": "Explore the universe and discover our home planet. \nThere's space for everybody. ✨",
      "verified": null,
      "followers": 28000000,
      "following": null,
      "posts_count": null,
      "likes_count": 28657098,
      "url": "https://www.facebook.com/NASA/",
      "private": null,
      "joined_at": "March 4, 2009"
    },
    "computed": {
      "engagement_rate": null,
      "language": "en",
      "content_category": "other",
      "estimated_reach": null
    },
    "_warnings": [
      "computed.engagement_rate: author ratio exceeded 1.0 (raw: 1.023468); returned null — a lifetime likes/followers ratio is not a real engagement rate"
    ]
  },
  "credits_used": 1,
  "credits_remaining": 9999,
  "request_id": "req_example000000",
  "cached": false
}
API reference for this endpoint

Prefer another language?

FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
Do I need a Facebook developer account to scrape Facebook profiles?
No. SocialCrawl handles authentication and proxies upstream, so you never register a Facebook app, manage OAuth tokens, or run your own scrapers. One API key returns Facebook data directly.
What does the Facebook Profile endpoint return?
It returns a page's name, category, like and follower counts, about text, website, and profile photo from its public URL. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape Facebook 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