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

Scrape comments and replies from public Facebook posts, reels and videos: text, date, commenter name and profile link, reactions and reply counts. Newest, most relevant or all comments. No login.

- **URL**: https://apify.com/automly/facebook-post-comments-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media
- **Stats:** 18 total users, 7 monthly users, 97.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 comments

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Comments Scraper

### What is Facebook Comments Scraper?

**Facebook Comments Scraper** is a tool that lets you **scrape comments and replies from public Facebook posts**, reels and videos: comment text, date, commenter name and profile link, reaction and reply counts, and which comment each reply belongs to. Paste post links, click **Start**, and download the comments as Excel, CSV or JSON.

- ⚡ **Speed:** about 2,000 comments per minute (1,250 comments and replies from 5 posts in 37 seconds in our test)
- 🔃 **Your order:** newest first, most relevant, or all comments
- ↩️ **Replies:** replies and replies to replies, linked to their comment
- 🔓 **No login:** no Facebook account, cookies or API key needed
- 💸 **Free to try:** the $5 of free usage every Apify account gets each month covers about 10,000 comments

### What can Facebook Comments Scraper do?

- Scrape comments from any public Facebook post, reel or video
- Scrape comments from posts in **public Facebook groups**
- Get **replies** too, each linked to the comment that started the thread
- Sort comments **newest first**, **most relevant**, or get **all comments**
- Keep only comments written **after a date you choose**
- Scrape many posts in one run
- Get results in seconds over the **real-time API**, without starting a run
- Export to Excel, CSV, JSON, HTML or XML, or send them to Google Sheets, Make, Zapier and more

### What data can you extract from Facebook comments?

| | | |
|---|---|---|
| 💬 Comment text | 📅 Date and time | 🔗 Comment link |
| 👤 Commenter name | 🆔 Commenter ID | 🌐 Commenter profile link |
| 👍 Number of reactions | 🔁 Number of replies | ↩️ Thread it belongs to (for replies) |
| 📏 Depth (comment, reply, reply to a reply) | 📰 Post ID | 🔗 Post link |

### How to scrape Facebook comments

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **Facebook Comments Scraper**.
3. Paste one or more **post links** (Page posts, group posts, reels or videos).
4. Choose how many comments you want per post, the order, and whether to include replies. Click **Start**.
5. When the run finishes, download your comments as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape Facebook comments?

You pay **$0.50 per 1,000 comments** (plus $0.00005 when a run starts), and only for the comments and replies you get. For example, 1,000 comments cost $0.50. Every Apify account gets **$5 of free usage each month**, so you can try it at no cost. See the **Pricing** tab for the current prices; paid Apify plans get the same price per result.

### ⬇️ Input

Post links can be any link to a public post, for example `https://www.facebook.com/NASA/posts/pfbid02Kv...`, `https://www.facebook.com/groups/dogspotting/posts/10166222724699467/`, `https://www.facebook.com/reel/2173770173351606/`, or just the numeric post ID.

| Setting | What it does |
|---|---|
| Post links | The posts to scrape |
| Comments per post | How many comments to get from each post (default 100). Replies count toward this number |
| Sort comments by | Newest first (default), most relevant, or all comments |
| Include replies | Also get the replies under each comment |
| Comments written after | With newest first: only comments from this date on |

Example: the newest 500 comments and their replies from two posts.

```json
{
  "postUrls": [
    "https://www.facebook.com/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl",
    "https://www.facebook.com/groups/dogspotting/posts/10166222724699467/"
  ],
  "resultsPerPost": 500,
  "includeReplies": true
}
```

Example: only comments written since 1 September 2026.

```json
{
  "postUrls": ["https://www.facebook.com/reel/2173770173351606/"],
  "resultsPerPost": 5000,
  "sortOrder": "newest",
  "commentsPublishedAfter": "2026-09-01"
}
```

### ⬆️ Output

You get one row per comment (`"type": "comment"`) or reply (`"type": "reply"`). You can view them as a table in Apify Console or download them as Excel, CSV, JSON, HTML or XML. A reply has `threadId` set to the comment that started its thread; for comments it is empty.

```json
{
  "type": "reply",
  "id": "10166223490894467",
  "url": "https://www.facebook.com/groups/dogspotting/posts/10166222724699467/?comment_id=10166223490894467",
  "text": "Coby Stafford who was president before biden, coby.",
  "createdAt": "2026-09-24T23:57:41Z",
  "authorName": "Maurielle Artis",
  "authorId": "pfbid0xhQMtWTtnm8dAruwqJjRMZEDWy4ptUnKKcBnXbH4oPN7MUbzPpwcdehnm6fMwiRnl",
  "authorUrl": null,
  "reactions": 0,
  "replies": 0,
  "depth": 2,
  "threadId": "10166223080149467",
  "postId": "10166222724699467",
  "postUrl": "https://www.facebook.com/groups/dogspotting/posts/10166222724699467/",
  "source": "https://www.facebook.com/groups/dogspotting/posts/10166222724699467/",
  "fetchedAt": "2026-09-25T00:59:39Z"
}
```

Each run also saves a short report with how many posts and comments it covered, and any post it could not scrape with the reason (for example, a deleted or private post).

### How can I use Facebook comments data?

- **Customer feedback:** read what people say under your posts and your competitors' posts
- **Brand monitoring:** track reactions to campaigns, launches and news
- **Sentiment analysis and AI:** build comment datasets for sentiment, topic or trend analysis
- **Community management:** find the most-reacted comments and the threads that need an answer
- **Giveaways:** collect everyone who commented on a contest post

### Real-time Facebook comments API

Need comments right away inside your app? Call the actor's API and get the comments back in the response, without starting a run:

```
GET https://<your-actor-standby-url>/comments?post=https://www.facebook.com/reel/2173770173351606/&limit=100&includeReplies=true
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

You can also run the actor from your own code with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/facebook-post-comments-scraper").call(run_input={
    "postUrls": ["https://www.facebook.com/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl"],
    "resultsPerPost": 1000,
})
for comment in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(comment["authorName"], comment["text"])
```

### ❓FAQ

#### How much does it cost to scrape Facebook comments?

You pay only for the comments you get, per 1,000 comments. See the **Pricing** tab for the current price. Every Apify account gets $5 of free usage each month, so you can try it at no cost.

#### How many comments can I scrape from one Facebook post?

As many as Facebook shows on the post. Set **Comments per post** to the number you need.

#### Why do I get fewer comments than the number shown on the post?

The number Facebook shows includes replies. Turn on **Include replies** to get those too. Facebook also hides some comments it considers spam, and its **Most relevant** view filters some out; choose **All comments** to ask for every comment.

#### Can I scrape replies to Facebook comments?

Yes. Turn on **Include replies**. Each reply is its own row with `threadId` pointing to the comment that started the thread and `depth` 1 or 2.

#### Why do some comments have fewer reply rows than their reply count?

Facebook shows visitors only part of a long reply thread, for example 8 of 20 replies. The `replies` number on each comment tells you the full count. **All comments** order tends to show a few more replies per thread.

#### Can I scrape comments from Facebook groups?

Yes, from posts in public groups. Posts in private groups can't be scraped.

#### Do I need a Facebook account?

No. You don't need a Facebook account, cookies or an API key.

#### Can I connect Facebook Comments Scraper to other tools or AI agents?

Yes. Start runs and download results with the Apify API or the Python and JavaScript clients, send results to Make, Zapier, n8n, Google Sheets or Slack with Apify integrations and webhooks, or let AI assistants and agents run it through the Apify MCP server at [mcp.apify.com](https://mcp.apify.com).

#### Is it legal to scrape Facebook comments?

This scraper only collects comments that people chose to post publicly. It does not collect private data such as e-mail addresses or phone numbers. Comments can still contain personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

Facebook Comments Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by Facebook or Meta.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the post link and what you expected. We usually reply within a day.

### Scrape more Facebook data

| Actor | What it gets |
|---|---|
| [Facebook Page Posts Scraper](https://apify.com/automly/facebook-page-posts-scraper) | Posts from public Pages, with reactions, comments and shares counts |
| [Facebook Group Posts Scraper](https://apify.com/automly/facebook-public-group-posts-scraper) | Posts from public groups |
| [Facebook Page Details Scraper](https://apify.com/automly/facebook-page-details-scraper) | Followers, category and contact details of many Pages |

### ⭐ Your feedback

Ideas, missing fields or problems: open the **Issues** tab and we'll take a look. If Facebook Comments Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

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

Links to public Facebook posts, reels or videos (Pages or public groups), or numeric post IDs.

## `resultsPerPost` (type: `integer`):

How many comments to scrape from each post. Replies count toward this number.

## `sortOrder` (type: `string`):

Newest first, most relevant first (as Facebook shows them), or all comments including the ones Facebook filters out of "Most relevant".

## `includeReplies` (type: `boolean`):

Also scrape the replies under each comment.

## `commentsPublishedAfter` (type: `string`):

With "Newest first": only comments written on or after this date, e.g. 2026-09-01.

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

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl"
  ],
  "resultsPerPost": 100,
  "sortOrder": "newest",
  "includeReplies": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

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

No description

## `report` (type: `string`):

No description

# 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/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/facebook-post-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/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/facebook-post-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/NASA/posts/pfbid02Kv6L9cDGRgwHGjeYDdT5F2F6uCZMMyfeU27DYgsxNwtrgV6kN9rPFLfnHTDzdbcVl"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/facebook-post-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/facebook-post-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/eWE3PaUbvs3yrAZmi/builds/xhrJrbHq4Gi06ClGB/openapi.json
