Skip to main content
AI Studio  add-on for Spider.
facebook.com · HTTP 200

Facebook Scraper API

Extract public page posts, event data, business info, and community content from Facebook. Stealth browsing handles Meta's aggressive anti-scraping measures.

Facebook remains the largest social network with billions of public business pages, community groups, and event listings. Spider uses stealth browsing to render Facebook's React interface and extract structured data from public pages.

Get your free API key
Free balance on signup No card. Failed requests cost $0.
Response developers.facebook.com/docs/content-library-and-api/content-library-api/guides/fb-comments.md markdown · 252 lines
* Disclosures and disclaimers# Guide to Facebook comments dataYou can fetch comments on a Facebook post or replies to a specific Facebook comment by using the `get()` method with the `facebook/posts/<id>/comments/preview` path. This document describes the parameters, and shows how to perform basic queries using the method.All of the examples in this document are taken from a Secure Research Environment use case and assume you have already created a Python or R Jupyter notebook and have created a client object. See Getting started to learn more.See Data dictionary for detailed information about the fields that are available.See Guide to bulk comments data for information about retrieving Facebook comments on multiple post or comment IDs using a single asynchronous query.**Estimating response size for comments**Estimating response size for any asynchronous search for comments (bulk or otherwise) has a limit of 1 million. A response size estimate of 1 million should therefore be interpreted as 1 million or more. See Search guide for more details on how to use asynchronous search, including estimating response size.## ParametersComma-separated list of fields you want included in the result. See Data dictionary for descriptions of all available fields.Sorting mode in which the comments are returned (only for synchronous endpoint). Available options:* `newest_to_oldest`: Comments are returned in reverse chronological order (newest first).* `oldest_to_newest`: Comments are returned in chronological order (oldest first).* `none`: No sorting is applied to the returned data.Default value: `newest_to_oldest`Boolean value that allows you to change the way of fetching comments. Available options:* `True`: All of the comments of the entity are returned, both nested and unnested. Since they are going to be returned in a “flattened way,” no sorting is applied.
Code · Fields · Cost · Run it keyless, no account

The same call, in code.

The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on facebook.com.

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

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

await spider.connect();
const page = spider.page!;
await page.goto("https://www.facebook.com/NASA/");

// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();

console.log(data);
await spider.close();
ready to run · spider-browser, no selectors

Ready for volume? Get an API key →

What teams build with facebook.com data.

Brand Monitoring

Track public mentions, reviews, and customer feedback across Facebook business pages and community groups.

Event Discovery

Aggregate public events by location, category, or date to build event listing platforms and calendars.

Competitive Analysis

Monitor competitor page activity, posting frequency, and engagement patterns on public business pages.

Local Business Data

Extract business profiles, hours, contact info, and reviews from Facebook business pages for directory enrichment.

Fields you can pull.

Post textLikesCommentsSharesAuthorTimestampMediaPage name

Spider names these from the page. The capture above came back as markdown; the same call with return_format: "json" returns them as keys.

Stealth

Meta anti-bot bypass

Residential proxies and fingerprint rotation handle Meta's aggressive anti-scraping detection on Facebook.

Rendering

React SPA rendering

Full browser rendering for Facebook's complex React interface, including lazy-loaded posts and comments.

Data

Page & post data

Extract posts, engagement metrics, business info, events, and page metadata in structured JSON.

What facebook.com costs to scrape.

The capture above cost $0.00163 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.

  • Free balance on signup
  • No card required to test
  • Balance never expires
See the full pricing →

Run it keyless, no account

curl -X POST https://api.spider.cloud/scrape -H "Content-Type: application/json" -d '{"url": "https://developers.facebook.com/docs/content-library-and-api/content-library-api/guides/fb-comments/", "return_format": "markdown"}'

Scraping facebook.com.

Can I scrape Facebook without an account?

Spider extracts data from public Facebook pages, business profiles, and events that are visible without logging in.

How does Spider bypass Facebook anti-bot?

Spider uses residential proxies, browser fingerprint rotation, and full Chrome rendering to navigate Facebook's anti-scraping defenses.

What Facebook data can I extract?

Public posts, page names, likes, comments, shares, timestamps, media, event details, business info, and page metadata.

Can I scrape Facebook Marketplace?

Spider can access publicly visible Marketplace listings, though availability varies by region and listing visibility settings.

More Social scrapers.

Start scraping facebook.com.

You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.