# Facebook Comments Scraper (`neuro-scraper/facebook-comments-scraper`) Actor

Instantly extract thousands of Facebook comments & nested replies without login! Uncover hidden insights, track sentiment, and deep-dive into user profiles for followers and bios. Lightning-fast, API-ready, and undetectable. Turn public Facebook chatter into powerful market data in seconds!

- **URL**: https://apify.com/neuro-scraper/facebook-comments-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Automation, Social media, Videos
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

Extract comments, author details, nested reply counts, and comment engagement from any public Facebook post or video without login. This tool gathers structured data efficiently, perfect for social media listening, sentiment analysis, and competitor research. Export your scraped comments seamlessly to **JSON, CSV, Excel, XML, or HTML**.

***

### 🚀 Why Use Facebook Comments Scraper?

Facebook Comments Scraper is a robust data extraction tool designed for marketers, researchers, and developers who need detailed information from public Facebook posts. Unlike standard scrapers or the official Graph API, it operates **without requiring a Facebook account login, API keys, or App approvals**, ensuring higher reliability and completely bypassing API restrictions and account ban risks.

The scraper intelligently utilizes Facebook's internal REST/GraphQL API to paginate through a post's comment feed. It supports **Newest**, **Oldest**, **All**, **Most Relevant**, and **Top Comments** sorting modes, perfectly mirroring exactly what a user would see natively on Facebook. It runs seamlessly on the Apify platform using residential proxies to maintain uninterrupted access.

### ✨ Key Features

- **No Login Required:** Scrape completely anonymously. Never risk your personal Facebook account.
- **Deep Data Mining:** Extract full comment data, nested threads, and user profiles that the official Graph API restricts.
- **Unlimited Comments:** Paginate deeply to scrape thousands of comments without manual scrolling.
- **Multiple Sort Modes:** Choose between `Newest`, `Oldest`, `Most Relevant`, `Top Comments`, or `All` sorting.
- **Detailed Extraction:** Pulls comment text, timestamps, likes counts, reply counts, and author details (name, profile URL, ID, bio, followers).
- **Export Anywhere:** Download your structured data directly into **JSON, CSV, Excel, XML**, or integrate it into your own database via Apify API.
- **Automated Workflows:** Cloud-ready and built to run on a schedule with automatic residential proxy integration to prevent IP blocks.

### 🎯 Top Use Cases

- **🗣️ Sentiment Analysis & Brand Monitoring:** Monitor public response to product launches, news articles, and viral videos to track brand reputation.
- **📊 Competitor Analysis & Market Research:** Analyze what customers are saying on your competitors' posts and uncover market gaps.
- **📈 Lead Generation & Influencer Marketing:** Identify top fans, brand advocates, and highly-engaged users based on comment frequency and follower counts.
- **🗄️ Archiving & PR Tracking:** Export and backup important comments for Public Relations tracking or legal archiving.

### ⚙️ Configuration Options

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `postUrls` | Array | `["https://www.facebook.com/..."]` | List of public Facebook Post or Reel URLs you wish to scrape. |
| `maxComments` | Integer | `100` | Maximum number of comments to collect per post. |
| `scrapeReplies` | Boolean | `true` | Whether to automatically scrape nested replies for each comment. |
| `scrapeAuthorProfiles` | Boolean | `true` | Extract the author's followers, following, bio, and privacy status. (Note: Slows down scraper). |
| `sortMode` | String | `Newest` | How to sort the comments (`Newest`, `Oldest`, `Most Relevant`, `Top Comments`, or `All`). |

#### Example Configuration

```json
{
  "postUrls": [
    "https://www.facebook.com/zuck/posts/10114064560000001"
  ],
  "maxComments": 100,
  "scrapeReplies": true,
  "scrapeAuthorProfiles": true,
  "sortMode": "Newest"
}
```

### 📊 Output Format

The actor outputs data in JSON format, creating one object per scraped comment.

#### Example Output

```json
{
  "commentUrl": "https://www.facebook.com/zuck/posts/10114064560000001?comment_id=123456789",
  "commentId": "123456789",
  "author": {
    "id": "987654321",
    "name": "Jane Doe",
    "url": "https://www.facebook.com/987654321",
    "bio": "Bringing the world closer together.",
    "followers": "121M",
    "following": "",
    "isPrivate": false
  },
  "text": "This is a fantastic update! Great job.",
  "likesCount": 42,
  "timestamp": 1697270400,
  "repliesCount": 3,
  "parentCommentId": null,
  "postUrl": "https://www.facebook.com/zuck/posts/10114064560000001"
}
```

#### Field Reference

| Field Name | Type | Description |
| --- | --- | --- |
| `commentUrl` | String | The direct URL to the specific comment. |
| `commentId` | String | The unique ID of the comment. |
| `author` | Object | Details of the comment author (`id`, `name`, `url`, `bio`, `followers`, `following`, `isPrivate`). |
| `text` | String | The main body text of the comment. |
| `likesCount` | Integer | Total likes/reactions on the comment. |
| `timestamp` | Integer | Unix timestamp of the comment creation. |
| `repliesCount` | Integer | Total number of nested replies this comment has. |
| `parentCommentId` | String | If this is a nested reply, this will contain the ID of the parent comment. |
| `postUrl` | String | The source URL of the post provided in the input. |

# Actor input Schema

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

List of public Facebook Post or Reel URLs.

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

The maximum number of comments to extract per post.

## `scrapeReplies` (type: `boolean`):

Whether to also extract the nested replies for each comment.

## `scrapeAuthorProfiles` (type: `boolean`):

Extract the author's followers, following, bio, and privacy status. (WARNING: Slower)

## `sortMode` (type: `string`):

How to sort the comments (Newest, Oldest, Most Relevant, Top Comments, All).

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/reel/3536781926495651"
  ],
  "maxComments": 10,
  "scrapeReplies": true,
  "scrapeAuthorProfiles": true,
  "sortMode": "Newest"
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/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 '{}' |
apify call neuro-scraper/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuro-scraper/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/ZwwoDyrDv6wlCoXvS/builds/zKgcLHH6YlcDvTYcY/openapi.json
