# Facebook Comments Scraper — No Login, No API Key (`bovi/facebook-comments-scraper`) Actor

**Scrape Facebook post comments without login or API key.** Returns author, text, timestamps, and full reply threading in a clean flat schema. No browser or Playwright needed. Public posts, pages, and groups.

- **URL**: https://apify.com/bovi/facebook-comments-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.94 / 1,000 facebook comments scraper — no login, no api keys

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Facebook Comments Scraper — No Login, No API Key

Scrape comments from public Facebook posts without login, without a Meta API key, and without a Facebook developer account. This Facebook post comments scraper returns structured comment data — author, text, timestamps, reply threading, and IDs — in a clean flat schema with a `parse_confidence` drift signal.

Works on public posts, pages, and groups. Residential proxy is required on Apify cloud (pre-filled by default) because Facebook blocks datacenter IP ranges.

### How this Facebook comments scraper beats the alternatives

Most Facebook comment scrapers depend on the official Graph API (limited to content you own or administer) or rely on headless Chromium which Facebook actively detects and blocks. This actor accesses Facebook's public SSR pages without a browser process:

1. Fetches the public post URL — no Chromium, no Playwright.
2. Handles Facebook's `__rd_verify` challenge transparently in the same session.
3. Parses comments from Facebook's server-side rendered ScheduledServerJS (`data-sjs`) blobs embedded in the page HTML — structured Relay store data with all core comment fields.
4. Streams results in real time with PPE billing per comment — you pay only for what's collected.

When Facebook changes its SSR payload structure, `parse_confidence` drops below 0.6 and the actor logs a loud warning — giving you a machine-readable drift signal instead of silent wrong data.

### What you get per comment

| Field | Example |
|-------|---------|
| `comment_id` | `10155345678901234` |
| `post_id` | `123456789` |
| `post_url` | `https://www.facebook.com/page/posts/...` |
| `author_name` | `Alice Johnson` |
| `author_profile_url` | `https://www.facebook.com/alice.johnson` |
| `text` | `Great post! 🔥` |
| `like_count` | `12` (null for some posts — reaction counts are not always SSR-embedded) |
| `reply_count` | `2` |
| `created_time` | `2024-06-01T10:00:00+00:00` |
| `is_reply` | `false` |
| `parent_id` | `null` (or parent comment ID for replies) |
| `parse_confidence` | `0.75–1.0` |
| `warnings` | `["missing_created_time"]` (empty if clean) |

### How it works

1. Fetches the public post URL without a browser process. No Chromium, no Playwright.
2. Handles Facebook's `__rd_verify` challenge transparently — a single verification step in the same session, then re-fetches the page.
3. Parses comments from Facebook's ScheduledServerJS `data-sjs` blobs — the server-side rendered Relay store that Facebook embeds in every page load. These blobs carry structured comment objects: `legacy_fbid`, `body.text`, `author.name`, `created_time`, `depth`, parent chain.
4. Streams results in real time with PPE billing per comment.

### Scope & limitations

- **Public posts/pages/groups**: SSR-rendered comments per page load (~15–25 top-level), no login needed.
- **Private profiles / friend-only posts**: login required — not supported.
- **Reels / Stories**: out of scope.
- **`like_count`**: reaction counts are not always embedded in Facebook's SSR payload — this field may be `null`. Author, text, timestamp, and threading fields are always populated.
- **Pagination**: V1 extracts the SSR-rendered first batch per URL. For deeper pagination, run multiple targeted URLs.

### Proxy requirement

**Facebook blocks datacenter IPs.** On the Apify cloud you MUST use a **RESIDENTIAL** proxy. The default input pre-fills `RESIDENTIAL` group — don't change it. Proxy cost is billed to your Apify account as part of the run.

### Input

```json
{
  "postUrls": [
    "https://www.facebook.com/someuser/posts/123456789",
    "https://www.facebook.com/permalink/12345"
  ],
  "maxComments": 200,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `postUrls` | string\[] | — | **Required.** Public post URLs. |
| `maxComments` | integer | unlimited | Cap per post (includes replies). |
| `pageSize` | integer | 25 | Real-time streaming batch size. |
| `proxyConfiguration` | object | RESIDENTIAL | Proxy config. RESIDENTIAL required. |

### Maintenance note

Facebook changes its SSR payload structure occasionally. When it does, `parse_confidence` drops below 0.6 and the actor logs a loud warning. That's the signal to patch the normalizer — the `data-sjs` blob structure and field names are the anchor points to check.

### Frequently asked questions

#### Can I scrape Facebook comments without a Facebook account?

Yes. This actor scrapes public posts without login or cookies. Facebook's SSR payload delivers comment data server-side — no login needed to access it.

#### Does this work on Facebook Pages, Groups, and personal posts?

Yes for public pages and public groups. Personal posts set to "Friends only" or narrower visibility are not accessible — the actor returns zero results for those.

#### How many comments can I scrape per post?

The actor extracts the SSR-rendered batch per page load (typically 15–25 top-level comments per URL). Use `maxComments` to cap the output. For posts with hundreds of comments, supply multiple permalink URLs targeting different comment ranges.

#### Why is RESIDENTIAL proxy required?

Facebook blocks Apify's datacenter IP ranges. The default input pre-fills `RESIDENTIAL` proxy group — this is the expected way to run this actor on Apify cloud. Proxy cost is billed to your Apify account at standard rates; the actor cost is PPE per comment only.

#### What does `parse_confidence` mean?

Every comment record includes a `parse_confidence` score (0.0–1.0). A score of 1.0 means all expected fields were found. Below 0.6 indicates schema drift — Facebook changed its internal format. The actor logs a warning and you can filter low-quality records programmatically.

### Integrations

Built for social-listening and community-research teams mining public post engagement and comment sentiment — the JSON/dataset output drops into the tools you already run, no glue code:

- **n8n / Make / Zapier** — trigger a run or pipe every new dataset item into 500+ apps (Google Sheets, Airtable, Slack, HubSpot, your database) with no code: [n8n](https://docs.apify.com/platform/integrations/n8n), [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier).
- **Webhooks** — fire your own endpoint the moment a run finishes, to push results straight into your pipeline ([docs](https://docs.apify.com/platform/integrations/webhooks)).
- **MCP server** — expose this actor as a tool to Claude, Cursor, or any [MCP client](https://mcp.apify.com) so an AI agent can pull this data mid-conversation ([guide](https://blog.apify.com/how-to-use-mcp/)).
- **API & SDKs** — fetch the dataset as JSON, CSV, or Excel through the Apify REST API or the Python / JS SDKs.

See all [Apify integrations](https://apify.com/integrations).

### Legal

Scrapes publicly-accessible data without login. Standard public-data scraping considerations apply. Not affiliated with Meta Platforms, Inc.

# Actor input Schema

## `postUrls` (type: `array`):

Public Facebook post or permalink URLs to scrape comments from. Each URL is processed separately.

## `maxComments` (type: `integer`):

Stop collecting after this many unique comments per post (includes replies). Leave empty for as many as pagination yields.

## `pageSize` (type: `integer`):

How many comments to push per batch (real-time output).

## `proxyConfiguration` (type: `object`):

REQUIRED for reliable scraping on the cloud — Facebook blocks datacenter IPs. Use a RESIDENTIAL group.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/someuser/posts/123456789"
  ],
  "maxComments": 200,
  "pageSize": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing Facebook Comments Scraper records (comment\_id, author\_name, text, like\_count, reply\_count, created\_time, is\_reply, parent\_id, post\_url, parse\_confidence).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "postUrls": [
        "https://www.facebook.com/someuser/posts/123456789"
    ],
    "maxComments": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/facebook-comments-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "postUrls": ["https://www.facebook.com/someuser/posts/123456789"],
    "maxComments": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/facebook-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postUrls": [
    "https://www.facebook.com/someuser/posts/123456789"
  ],
  "maxComments": 200
}' |
apify call bovi/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/facebook-comments-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gJ0MqEhu0oPoeoXhZ/builds/Nf8zejwyDyuH9A39Y/openapi.json
