# Facebook Comments Scraper - Post Comments, Replies & Reels (`kestrel/facebook-post-comments`) Actor

Export public Facebook comments and replies from post, reel, video, photo and public group URLs. One row per comment: text, author name and profile link as shown, date, reactions, reply count, reply-to id, attachments. Sort newest, relevant or all. Free: only-new monitoring, date, keyword filters.

- **URL**: https://apify.com/kestrel/facebook-post-comments.md
- **Developed by:** [Tedj MEABIOU](https://apify.com/kestrel) (community)
- **Categories:** Social media, Agents
- **Features:** Limited permissions
- **Stats:** 6 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 comments

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?

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 - Post Comments, Replies & Reels

Facebook Comments Scraper exports the public comments under a Facebook post, reel, video, photo or public group post, with their replies on request. You give it post URLs; you get one row per comment with the text, the commenter's display name and profile link exactly as Facebook shows them, the time, the reaction count, the reply count, the id of the comment it answers and links to any attached photo, GIF or sticker. Post comments can be read newest first, in Facebook's "Most relevant" order or oldest first, and repeat runs can deliver only new comments for comment monitoring.

It runs on Apify, so you can call it from the API, a schedule, n8n, Make, Zapier or any MCP client used by AI agents. It reads Facebook as a logged-out visitor: no Facebook account, cookies or login are needed or used. It is an independent tool, not a Meta product.

Last verified working: 2026-11-16 (26 public posts, reels, videos and group posts on the Apify platform, 100% answered, up to 300 top-level comments deep).

### Facebook comments scraper for AI agents: which input answers which request?

Use it when the user names one or more public Facebook posts (or reels, videos, photos, public group posts) and wants the comments under them. Do not use it to find posts (it does not search Facebook or list a Page's posts), for private groups, for personal profiles' friends-only posts, for commenter profiles, emails or phone numbers, or for Facebook ad comments.

| User request | Input JSON |
| --- | --- |
| "Get the comments on this post" | `{"postUrls": ["https://www.facebook.com/Starbucks/posts/1620755873417308"]}` |
| "All comments, not just 100" | `{"postUrls": ["…"], "maxCommentsPerPost": 0}` |
| "Comments with their replies" | `{"postUrls": ["…"], "includeReplies": true}` |
| "The 20 most relevant comments" | `{"postUrls": ["…"], "sort": "relevant", "maxCommentsPerPost": 20}` |
| "Comments from the last 7 days" | `{"postUrls": ["…"], "publishedAfter": "7 days"}` |
| "Comments that mention refunds" | `{"postUrls": ["…"], "textContains": ["refund", "money back"]}` |
| "Only comments I have not seen yet, every morning" | `{"postUrls": ["…"], "onlyNew": true, "monitorKey": "brand-daily"}` + an Apify schedule |
| "Comments on this reel / video" | `{"postUrls": ["https://www.facebook.com/reel/1157962813213302"]}` |
| "Cap the bill at $1" | Apify run option `maxTotalChargeUsd: 1` (not an input field) |

Main output fields: `comment_id`, `text`, `author_name`, `author_url`, `published_at`, `reactions`, `reply_count`, `parent_comment_id`, `depth`, `attachments`, `comment_url`, `post_url`. Each input URL also returns one free row with `type: "post"` that says how many comments Facebook lists for the post, how many were read and delivered, and why the walk stopped (`stopped_by`). An empty result is never silent: an unavailable post gets `status: "unavailable"`, a refused one `status: "error"`.

### Facebook comments: how do I start?

1. Paste one or more post URLs into `postUrls`.
2. Leave `maxCommentsPerPost` at 100 for a quick look, or set 0 for every comment.
3. Turn on `includeReplies` if you need the conversation under each comment.
4. Start the run, then read the dataset (the `comments` view) and the `SUMMARY` record.

```json
{
  "postUrls": [
    "https://www.facebook.com/Starbucks/posts/1620755873417308",
    "https://www.facebook.com/reel/1157962813213302"
  ],
  "maxCommentsPerPost": 100,
  "sort": "newest",
  "includeReplies": true,
  "maxRepliesPerComment": 20
}
```

Accepted URL forms: `facebook.com/<Page>/posts/<id or pfbid…>`, `/reel/<id>`, `/<Page>/videos/<id>`, `/watch/?v=<id>`, `/photo/?fbid=<id>`, `/permalink.php?story_fbid=…&id=…`, and `/groups/<group>/posts/<id>` or `/groups/<group>/permalink/<id>` for public groups. Mobile (`m.`), `web.` and bare `facebook.com` hosts are rewritten to `www.facebook.com`. The same post given twice is read once (the second gets a free `duplicate` row). Inputs written for other Facebook comment scrapers paste straight in: `startUrls`, `resultsLimit`, `viewOption`, `includeNestedComments` and `onlyCommentsNewerThan` are understood.

### Facebook comments output: what does one row contain?

One row per comment or reply (`type: "comment"`, billed):

| field | meaning |
| --- | --- |
| `comment_id` | Facebook's numeric comment id (stable) |
| `text` | the comment text as written (mentions appear as the names shown) |
| `author_name` | the commenter's display name as shown next to the comment |
| `author_url` | the profile link Facebook shows, or null when it shows none |
| `published_at` | when the comment was posted, ISO 8601 UTC |
| `reactions` | total reactions on the comment, all reaction types |
| `reply_count` | the reply count Facebook displays for the comment |
| `depth` | 0 = comment on the post, 1 = reply, 2 = reply to a reply |
| `parent_comment_id` | for replies: the `comment_id` it answers; null for comments |
| `attachments` | photos, GIFs, stickers, videos or links in the comment as `{type, url, image_url}` links; nothing is downloaded |
| `language` | the language Facebook detected, e.g. `en`, when it says |
| `comment_url` | link straight to the comment on Facebook |
| `post_url`, `post_id` | the post the comment belongs to |
| `target`, `sort`, `fetched_at` | the input line, the order used and the read time |

```json
{
  "type": "comment",
  "comment_id": "1604029614385978",
  "post_id": "1620755873417308",
  "post_url": "https://www.facebook.com/Starbucks/posts/1620755873417308",
  "comment_url": "https://www.facebook.com/Starbucks/posts/pfbid025mdJAC2SX3FevikVsR5M6BECEGEo1sE3kngAuzN4HYvsMN6o7dJdeuvpNoj98DELl?comment_id=1785616169335040&reply_comment_id=1604029614385978",
  "depth": 1,
  "parent_comment_id": "1785616169335040",
  "text": "let's get festive!",
  "published_at": "2026-11-15T18:28:27+00:00",
  "author_name": "Starbucks",
  "author_url": "https://www.facebook.com/Starbucks",
  "reactions": 0,
  "reply_count": 0,
  "attachments": [],
  "language": "en",
  "target": "https://www.facebook.com/Starbucks/posts/1620755873417308",
  "sort": "newest",
  "fetched_at": "2026-11-16T12:00:00+00:00"
}
```

One free status row per input URL (`type: "post"`, the `posts` view): `target`, `post_url`, `post_id`, `status` (`ok`, `unavailable`, `error`, `duplicate`, `invalid`, `limit`), `comments_listed` (Facebook's total including replies), `top_level_listed`, `comments_delivered`, `replies_delivered`, `found`, `filtered`, `filtered_by`, `already_seen`, `duplicates`, `pages`, `reply_pages`, `stopped_by` (`maxCommentsPerPost`, `maxItems`, `onlyNew`, `publishedAfter`, `spendingLimit`, `timeLimit` or null when every comment was read), `sort`, `error` and `fetched_at`.

### What does the scraper not collect about commenters?

Only what Facebook prints next to the comment. The actor does not open commenter profiles, does not collect avatars, gender, account ids, friends, emails or phone numbers, and never reads private groups. If you store the output, you decide its legal basis and retention; see the legal section below.

### Replies: how are comment threads delivered?

With `includeReplies: true` each comment that has replies gets one extra request, and its replies (and replies to replies) follow it as their own rows with `depth` 1 or 2 and `parent_comment_id`. `maxRepliesPerComment` (default 20, 0 = all) limits each thread, and every reply counts toward `maxCommentsPerPost`. Replies are billed like comments. Facebook sometimes counts replies it does not show to logged-out visitors, so `reply_count` can be higher than the replies delivered.

### Post comments monitoring: how does onlyNew work?

Set `onlyNew: true` and a `monitorKey` such as `"brand-daily"`, then schedule the same input. The first run sets the baseline: it delivers up to `maxCommentsPerPost` newest comments and remembers them. Each later run reads newest first, skips everything already delivered for free and stops as soon as it reaches what the previous run covered, so an hourly check of a quiet post costs nothing. With `includeReplies`, comments on the pages read whose reply count has grown are re-opened and only their new replies are delivered. The memory is kept per post and per `monitorKey` (the latest 50,000 comment ids); a new `monitorKey` starts a fresh baseline. `onlyNew` always uses the newest order.

### How many comments can I get, and in what order?

Facebook serves 10 top-level comments per request, so 1,000 comments take about 100 requests, roughly two minutes; several posts are read in parallel. The default run timeout (one hour) covers tens of thousands of comments; raise it for bigger exports, and a run that reaches it still ends successfully with what it read. Three orders exist, the same three Facebook offers: `newest` (every comment, newest first, the default), `relevant` (Facebook's "Most relevant", which leaves some comments out) and `all` (every comment, oldest first).

Facebook does not show every comment to logged-out visitors. On the 2026-11-16 test set most posts showed all or nearly all of them (a group post 34 of 34 top-level comments), while some news posts showed about half (20 of 35 on one). The subset is the same for every logged-out reader (a laptop and Apify's datacenter saw identical comments in our tests); the free post row puts the listed total next to what was delivered so you can judge coverage.

### Facebook comments pricing: how much does a run cost?

One event, `comment`, at $1 per 1,000 comments (less on Apify's Scale and Business plans). There is no start fee, and proxy and compute are included. You are not charged for comments your filters remove, comments an `onlyNew` run already delivered, duplicates, the free post rows, unavailable posts or bad input.

| run | cost |
| --- | --- |
| 1 post, default 100 comments | $0.10 |
| 10 posts x 100 comments | $1.00 |
| 1 post, 1,000 comments with replies | about $1.00 |
| daily `onlyNew` check with nothing new | $0.00 |

`maxItems` (sent by many AI tools) caps the comments of the whole run, and the Apify run option `maxTotalChargeUsd` stops the run at a dollar amount; both stop reading before the next page, so you never pay for rows you do not get.

### Facebook comments filters: which ones are free?

All of them run before billing. `publishedAfter` takes `2026-11-01`, an ISO time or a span like `7 days`, `24 hours`, `2 weeks`; with the newest order the walk stops at the first page that is entirely older. `textContains` keeps comments that contain any of the given words or phrases (case-insensitive). `minReactions` keeps comments with at least that many reactions.

### How do I call it from Python, JavaScript, curl, n8n or Make?

Python with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("kestrel/facebook-post-comments").call(run_input={
    "postUrls": ["https://www.facebook.com/Starbucks/posts/1620755873417308"],
    "maxCommentsPerPost": 200,
    "includeReplies": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "comment":
        print(row["published_at"], row["author_name"], row["text"][:80])
```

JavaScript (Node.js) with `apify-client`:

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('kestrel/facebook-post-comments').call({
    postUrls: ['https://www.facebook.com/reel/1157962813213302'],
    sort: 'newest',
    maxCommentsPerPost: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems({ view: 'comments' });
console.log(items.length, items[0]);
```

curl, waiting for the run and returning the rows in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/kestrel~facebook-post-comments/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postUrls": ["https://www.facebook.com/Starbucks/posts/1620755873417308"], "maxCommentsPerPost": 30}'
```

In n8n or Make, use the Apify node or module with this actor's id and the same JSON input; for monitoring, run a saved task on a schedule with `onlyNew: true`. AI agents reach it through the Apify MCP server (`mcp.apify.com`) as `kestrel/facebook-post-comments`.

### FAQ

#### Do I need a Facebook account or cookies?

No. The actor reads public posts the way a logged-out browser does and never logs in. It does not accept cookies or account credentials.

#### Why did I get fewer comments than the post shows?

Three reasons, all visible in the free post row: Facebook hides some comments from logged-out visitors, `relevant` order filters some out, and your filters or caps stop the walk (`stopped_by`). Use `sort: "newest"` or `"all"` and `maxCommentsPerPost: 0` for the most complete export.

#### Can it scrape comments from private groups or friends-only posts?

No. Only content Facebook shows to everyone is read. A private or deleted post ends with `status: "unavailable"` and costs nothing.

#### Does it work on reels, videos and photos?

Yes: reel comments, video comments and photo comments work the same way. `/reel/`, `/videos/`, `/watch/?v=` and `/photo/?fbid=` URLs were part of the 2026-11-16 test set, as were public group posts.

#### What happens if Facebook blocks the run?

Each refusal is retried after a growing pause on a new connection; after three in a row the run moves to Apify residential IPs by itself (when `proxyConfiguration` is the default Apify Proxy; your own proxy URLs are used as given). If every post is still refused the run fails with the reason, so you never pay for an empty result that looks successful. A run that nears its own timeout stops starting new pages, delivers what it read and ends successfully with `time_hit` in the `SUMMARY`.

#### Can I export Facebook comments to CSV or Excel?

Yes. Every Apify dataset downloads as CSV, Excel, JSON or XML; pick the `comments` view to leave out the post status rows.

#### Is scraping Facebook comments legal?

The actor only reads publicly available data that anyone can see without logging in, and it limits what it keeps about people to what is shown next to each comment. Whether you may process that data depends on your purpose and your jurisdiction (for example GDPR in the EU): commenter names are personal data. Use the output for analysis such as brand monitoring, customer feedback or research, respect Facebook's terms and people's privacy, and ask a lawyer when in doubt. This tool is not affiliated with Meta.

### Changelog and support

See the CHANGELOG tab for releases. Report problems or wishes in the Issues tab; include the run id so the run can be inspected.

# Changelog

This Actor's version history is a separate document: https://apify.com/kestrel/facebook-post-comments/changelog.md

# Actor input Schema

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

Public Facebook URLs, one per line: Page posts ("https://www.facebook.com/Starbucks/posts/1620755873417308"), reels (/reel/ID), videos (/videos/ID, /watch/?v=ID), photos (/photo/?fbid=ID), permalink.php links and PUBLIC group posts (/groups/ID/posts/ID). Not profiles, Page home pages or private groups. Every URL also gets one free type=post row: Facebook's comment total, what was read and why it stopped. startUrls \[{"url": ...}] is accepted too.

## `maxCommentsPerPost` (type: `integer`):

Most comment rows delivered per post, replies included. Default 100; 0 = every comment Facebook shows logged-out visitors. Filters run first, so 50 asked = up to 50 that pass them. The bill per post is at most this number of comment events. maxItems, if your tool sends it, caps the whole run and lifts this default. Facebook hides some comments from logged-out visitors, so a post can return fewer than its listed total.

## `sort` (type: `string`):

newest (DEFAULT) = every comment, newest first: best for "latest comments", monitoring and date cut-offs. relevant = Facebook's "Most relevant" order, which leaves some comments out. all = every comment, oldest first. onlyNew always reads newest first.

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

false (DEFAULT) = top-level comments only. true = also deliver the replies under each comment (and replies to replies) as their own rows with depth 1-2 and parent_comment_id; each reply is billed as one comment. Adds one request per comment that has replies. Use for "with replies", "full threads", "conversations", "brand responses".

## `maxRepliesPerComment` (type: `integer`):

Most replies delivered under one comment when includeReplies is true (default 20; 0 = all Facebook shows). Replies also count toward maxCommentsPerPost.

## `onlyNew` (type: `boolean`):

true = deliver and bill only comments that no earlier run with the same monitorKey delivered (plus new replies when includeReplies is on). The first run sets the baseline: up to maxCommentsPerPost newest comments. Later runs read newest first and stop where the last run left off, so a check with nothing new costs $0. Schedule the same input daily or hourly for brand monitoring.

## `monitorKey` (type: `string`):

Name of the only-new memory, e.g. "starbucks-daily" (1-60 letters, digits, dots, underscores or hyphens; empty = "default"). Runs that share the name share one memory per post; use a new name for a fresh baseline. Stored encrypted. It is a label, not a password. Ignored when onlyNew is false.

## `publishedAfter` (type: `string`):

Keep only comments posted on or after this time: "2026-11-01", an ISO time, or a relative span like "7 days", "24 hours", "2 weeks". Older comments are skipped free; with newest order the walk stops at the first page that is wholly older. Empty = all dates.

## `textContains` (type: `array`):

Keep only comments whose text contains any of these words or phrases, case-insensitive, e.g. \["refund", "late delivery"]. Other comments are skipped free. Empty = all comments.

## `minReactions` (type: `integer`):

Keep only comments with at least this many reactions (all reaction types), e.g. 5 for "popular comments". 0 (default) = all. Others are skipped free.

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

Default Apify Proxy works for public posts. If Facebook refuses three requests in a row the run backs off and moves to Apify RESIDENTIAL by itself; proxy and compute are included in the comment price. Custom proxy URLs are used as given.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/Starbucks/posts/1620755873417308"
  ],
  "maxCommentsPerPost": 20,
  "sort": "newest",
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "onlyNew": false,
  "publishedAfter": "",
  "textContains": [],
  "minReactions": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `comments` (type: `string`):

No description

## `summary` (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/Starbucks/posts/1620755873417308"
    ],
    "maxCommentsPerPost": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kestrel/facebook-post-comments").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/Starbucks/posts/1620755873417308"],
    "maxCommentsPerPost": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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

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/JkeSj3jjkxpzt3ccH/builds/vBAcTScGA7edEXliJ/openapi.json
