# Facebook Comments Scraper — Posts, Reels, Replies, No Login (`valev-lab/facebook-comments-scraper`) Actor

Scrape all public Facebook comments and replies from posts, reels, videos and group posts. No login or cookies. Reactions by type, authors, dates, attachments, language. Keyword and reaction filters, new-comment monitoring. CSV/Excel/JSON. $0.80→$0.50 per 1K.

- **URL**: https://apify.com/valev-lab/facebook-comments-scraper.md
- **Developed by:** [Daniel Valev](https://apify.com/valev-lab) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 12 total users, 4 monthly users, 95.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 comment scrapeds

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 — Posts, Reels & Videos, Replies Included, No Login

Scrape **all public comments and replies** from any **Facebook post, reel, video, photo or public group post** without a Facebook account. Get the **comment text**, **date**, **author**, **reactions by type**, **reply threads**, **photos, GIFs and stickers**, **mentions** and the **language** of every comment, plus a **summary per post** with the top 10 comments and how often the Page answered. **No login, no cookies, no browser, no paid API.** Export to **CSV, Excel or JSON**, or read the results through the API.

**Price:** $0.80 per 1,000 comments on the Apify Free plan, down to **$0.50 on Gold and higher**. Replies cost the same as comments. Error rows, summaries, duplicates, filtered comments and comments you already have are free.

An empty run is a small sample: **5 comments** from a public Nike post. In our cloud test it finished in 7 seconds.

#### At a glance

| | |
| --- | --- |
| **Input** | Links to Facebook posts, reels, videos, photos, public group posts or share links, or post ids |
| **Output** | One row per comment and reply, plus a free summary row per post |
| **Login** | None. No account, cookies, tokens or Meta developer app |
| **Price** | $0.80 per 1,000 comments (Free plan) to $0.50 (Gold and higher); errors and filtered comments free |
| **Speed** | About 650 comments per minute on a large thread in our local test (6,178 comments in 9.3 minutes) |
| **Export** | JSON, CSV, Excel, XML, HTML, API, Make, Zapier, n8n, Google Sheets, MCP |

### What does Facebook Comments Scraper do?

Paste post links and get **one row per comment or reply**. The Actor follows Facebook's comment pages to the end of each thread, or to your limit, and saves each comment once, even when Facebook repeats it.

It accepts every public link format:

| Link | Example |
| --- | --- |
| Page post | `https://www.facebook.com/nike/posts/pfbid0gwt…` |
| Reel | `https://www.facebook.com/reel/1943984979901727` |
| Video and watch link | `https://www.facebook.com/watch/?v=7640688292608342`, `…/videos/7640688292608342/` |
| Photo | `https://www.facebook.com/photo/?fbid=1580109494162175` |
| Group post | `https://www.facebook.com/groups/<group>/posts/<id>/` or `/permalink/<id>/` |
| Share link | `https://www.facebook.com/share/p/1AXwxAjHhu/`, `/share/r/…`, `/share/v/…` |
| Classic permalink | `permalink.php?story_fbid=…&id=…`, `story.php?story_fbid=…` |
| Post id | `1715533349937627` or `100044429349683_1715533349937627` |

Mobile (`m.`) and `web.` links work too, and tracking parameters are removed.

### What can you use Facebook comments for?

| Use case | How |
| --- | --- |
| **Social listening and sentiment analysis** | Collect what people say under your posts and your competitors' posts; filter by **keywords** and **language**, then score sentiment in your own tool or AI model |
| **Ad feedback analysis** | Find ads with our [Facebook Ads Library Scraper](https://apify.com/valev-lab/facebook-ads-library), then read the comments under the same creative posted on the Page: complaints, questions, purchase intent |
| **Brand monitoring** | Schedule your own posts with **Only new comments** and get just the new comments each run |
| **Customer care audit** | **Page reply share** in each post summary shows how many comments the brand answered; **Only the Page's own comments** exports the brand's replies |
| **Lead discovery** | Keywords such as `price`, `how much` or `delivery` find people asking to buy; reactions and replies show which questions matter |
| **Content research** | The top 10 comments by reactions per post show what the audience responds to |
| **Giveaways and contests** | Export every comment of a giveaway post, with `createdAt` for the deadline and `commentUrl` as proof, and pick a winner in a spreadsheet |

To collect the posts themselves, use our [Facebook Page Posts Scraper](https://apify.com/valev-lab/facebook-page-posts-scraper) for Pages and our [Facebook Group Posts Scraper](https://apify.com/valev-lab/facebook-groups-scraper) for public groups. Paste their post URLs here to get the full comment threads.

### Why use this Facebook comment scraper?

- **No Facebook account.** Nothing to log into, no cookies, no tokens, no Meta app.
- **Replies included.** Replies and replies to replies, as their own rows with `parentCommentId` and `depth`.
- **Every link format.** Share links, reels, watch links, photos, group posts and bare post ids.
- **Your filters, free.** Date, minimum reactions, keywords, or only the Page's own comments. Rejected comments are not charged.
- **Only new comments.** Monitoring remembers what each post already delivered and skips it for free.
- **Rich rows.** Reactions by type, verified badge, attachments (photo, GIF, sticker, video, link), mentions, offline language detection.
- **Post summary.** Comment count shown on the post, rows saved, top 10 comments, Page reply share. Free.
- **Errors are free.** A deleted, private or login-only post, or a link that is not a post, returns an error row and is not charged. One bad link never fails the run.

### What data can you extract?

Every row has a `type`: `comment`, `postSummary`, or `error`.

| Comment field | Description |
| --- | --- |
| `commentId` / `commentUrl` | Comment id and a direct link to it |
| `postId` / `postUrl` / `inputUrl` | The post, its link after redirects, and your input |
| `text` / `createdAt` / `language` | What was written, when (ISO, UTC), and the detected language (ISO 639-3, e.g. `eng`, `bul`) |
| `authorName` / `authorUrl` | The commenter. Facebook hides the profile link of many personal profiles from logged-out visitors |
| `authorIsPage` | `true` when the Page (or public profile) that published the post wrote it |
| `isVerified` | The author has Facebook's verified badge |
| `reactionsCount` / `reactionBreakdown` | Total reactions and the count per type: like, love, care, haha, wow, sad, angry |
| `repliesCount` | Replies Facebook counts under the comment |
| `isReply` / `parentCommentId` / `depth` | Reply structure: `depth` 0 for comments, 1 for replies, 2 for replies to replies |
| `attachments` | Photos, GIFs, stickers, videos and links: `type` and `url` |
| `mentions` | People and Pages tagged in the comment |
| `isNew` | Not delivered for this post in an earlier run |

| Post summary field | Description |
| --- | --- |
| `postText` / `postAuthor` / `postCreatedAt` | First 300 characters of the post, who published it, and when |
| `totalCommentCount` | The comment count Facebook shows on the post, replies included |
| `scrapedCount` / `repliesScraped` | Rows saved for this post in this run |
| `commentsScanned` / `filteredOut` / `seenSkipped` | Comments read, rejected by your filters, and skipped as already seen |
| `topComments` | The 10 saved comments with the most reactions |
| `pageReplyShare` / `pageReplies` | Share of top-level comments that got a reply from the post's Page, and how many replies the Page wrote |
| `stopCode` | Why reading the post ended: `complete`, `max-comments`, `seen-boundary`, `too-old`, … |

The Output tab has two views: **Comments** and **Post summaries** (with the error rows).

### How to scrape Facebook comments

1. Open **Facebook Comments Scraper** and click **Try for free**.
2. Paste post, reel or video links.
3. Set **Max comments per post** (default 200; 0 reads every comment Facebook shows).
4. Choose the **Comment order**, keep **Include replies** on, and add filters if you need them.
5. Click **Start**. Download **JSON, CSV, Excel or HTML**, or connect an integration.

#### Input example

```json
{
  "postUrls": [
    "https://www.facebook.com/lidlbulgaria/posts/pfbid0MW5S6ETQoHH2i63SNLUwdG7SoeKyrQvvHz1zh4MyGKxzgR3RwHepLS43wVPeS49Rl",
    "https://www.facebook.com/reel/1943984979901727",
    "https://www.facebook.com/watch/?v=7640688292608342",
    "https://www.facebook.com/share/p/1AXwxAjHhu/"
  ],
  "maxCommentsPerPost": 200,
  "sort": "newest",
  "includeReplies": true,
  "dateFrom": "30 days",
  "keywords": [],
  "detectLanguage": true,
  "monitorMode": false,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Comment order

| Option | What Facebook returns |
| --- | --- |
| **Newest first** (default) | Every comment, newest first. Best for monitoring and date limits, because reading can stop at the first old or already-seen comments |
| **Most relevant** | Facebook's own ranking. Facebook filters some comments out, so this often returns slightly fewer |
| **All comments** | Every comment, including ones Facebook flags as possible spam, in ranked order |

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

Pricing is [pay-per-event](https://docs.apify.com/platform/actors/running/pay-per-event): you pay for the comments you receive, not for run time or proxy traffic. "Free" means the Apify Free plan.

| Event | Free | Bronze | Silver | Gold and higher | When |
| --- | ---: | ---: | ---: | ---: | --- |
| `comment-scraped` | **$0.0008** | $0.0007 | $0.0006 | **$0.0005** | A comment or reply was saved |
| `apify-actor-start` | $0.0005 | $0.0005 | $0.0005 | $0.0005 | Once per run |
| **1,000 comments** | **$0.80** | $0.70 | $0.60 | **$0.50** | |

**Examples (Free plan):**

- The 5-comment sample: `$0.0005 + 5 × $0.0008 = $0.0045`.
- 10 posts × 200 comments with replies: `$0.0005 + 2,000 × $0.0008 = $1.6005`.
- Daily monitoring of 5 posts that got 30 new comments in total: `$0.0005 + 30 × $0.0008 = $0.0245`.

**Never charged:** error rows (deleted, private or login-only posts, links that are not posts), post summaries, duplicate comments, comments rejected by your filters, and comments skipped in monitoring because you already have them. Set a **maximum total charge** on the run; the Actor stops cleanly when it is reached.

#### Price comparison

Prices from each Actor's public Apify API metadata on 2026-11-15, per 1,000 comments. Check each Store page for current prices; data and coverage differ.

| Actor | Free | Gold | Lowest tier | Fixed fees |
| --- | ---: | ---: | ---: | --- |
| **This Actor** | **$0.80** | **$0.50** | $0.50 | $0.0005 per run |
| [Apify Facebook Comments Scraper](https://apify.com/apify/facebook-comments-scraper) | $2.50 | $1.40 | $0.40 (Diamond) | $0.001 per run, plus a `filter-applied` event when you filter |
| [thedoor Facebook Comments Scraper](https://apify.com/thedoor/facebook-comment-scraper) | $0.25 | $0.24 | $0.24 | $0.00005 per run |
| [dami_studio Facebook Comments Scraper](https://apify.com/dami_studio/facebook-comments-scraper) | $0.25 | $0.244 | $0.244 | $0.001 per run; a new per-request event is scheduled from 2026-11-25 |
| [alfalfa Facebook Comments Scraper](https://apify.com/alfalfa/facebook-comments-scraper) | $0.30 | $0.20 | $0.20 | — |
| [memo23 Facebook Comments Scraper](https://apify.com/memo23/facebook-comments-scraper) | $0.49 | $0.49 | $0.49 | $0.05 per run |

This Actor is **68% cheaper than Apify's own Facebook Comments Scraper on Free** and 64% cheaper on Gold, and it does not charge extra for filters. On Apify's Diamond tier Apify's Actor is cheaper ($0.40). It is **not the cheapest**: thedoor, dami_studio, alfalfa and memo23 charge less per comment. What you get here for the price, compared with the input options those Actors document:

| Option | This Actor | thedoor | dami_studio |
| --- | :---: | :---: | :---: |
| Replies, sort order, date limit | ✓ | ✓ | ✓ |
| Only new comments (monitoring) | ✓ | ✓ | — |
| Keyword filter | ✓ | — | — |
| Minimum reactions filter | ✓ | — | — |
| Only the Page's own replies | ✓ | — | — |
| Language detection | ✓ | — | — |
| Post summary: top 10 comments, Page reply share | ✓ | — | — |
| Share links (`/share/p/`) and bare post ids | ✓ | not documented | not documented |
| Free error rows for deleted or private posts | ✓ | not documented | not documented |

### Use the Facebook comments API

Run `valev-lab/facebook-comments-scraper` through the [Apify API](https://docs.apify.com/api/v2). You need an Apify token; you do not need a Facebook account or a Meta app.

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('valev-lab/facebook-comments-scraper').call({
    postUrls: ['https://www.facebook.com/reel/1943984979901727'],
    maxCommentsPerPost: 500,
    includeReplies: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    if (item.type === 'comment') console.log(item.createdAt, item.reactionsCount, item.text);
}
// listItems returns one page; paginate larger exports.
```

Python, with the [official Apify client](https://docs.apify.com/api/client/python) 3.x:

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("valev-lab/facebook-comments-scraper").call(run_input={
    "postUrls": ["https://www.facebook.com/reel/1943984979901727"],
    "maxCommentsPerPost": 500,
    "includeReplies": True,
})
for item in client.dataset(run.default_dataset_id).iterate_items():
    if item["type"] == "comment":
        print(item["createdAt"], item["reactionsCount"], item["text"])
```

Make, Zapier, n8n, Google Sheets, and Apify schedules and webhooks run the same input.

#### Use with AI agents and MCP

Connect your MCP client to the [Apify MCP server](https://docs.apify.com/mcp) and select this Actor with `https://mcp.apify.com?tools=valev-lab/facebook-comments-scraper`. Example request: "Get the comments under these three posts and tell me the most common complaints and questions." The Actor returns the data; your agent does the analysis.

### Output examples

A comment (names in these examples are invented):

```json
{
  "type": "comment",
  "commentId": "1828392688196415",
  "postId": "1580109507495507",
  "postUrl": "https://www.facebook.com/lidlbulgaria/posts/pfbid0MW5S6ETQoHH2i63SNLUwdG7SoeKyrQvvHz1zh4MyGKxzgR3RwHepLS43wVPeS49Rl",
  "text": "Български ли са наистина?",
  "createdAt": "2026-11-06T14:07:38.000Z",
  "authorName": "Maria Petrova",
  "authorUrl": "https://www.facebook.com/maria.petrova.example",
  "authorIsPage": false,
  "isVerified": false,
  "reactionsCount": 37,
  "reactionBreakdown": { "like": 33, "wow": 2, "love": 1, "haha": 1 },
  "repliesCount": 6,
  "isReply": false,
  "parentCommentId": null,
  "depth": 0,
  "attachments": [],
  "mentions": [],
  "language": "bul",
  "commentUrl": "https://www.facebook.com/lidlbulgaria/posts/pfbid0MW5S6…?comment_id=1828392688196415",
  "isNew": true,
  "scrapedAt": "2026-11-15T12:40:11.204Z"
}
```

A reply by the Page that published the video:

```json
{
  "type": "comment",
  "commentId": "735999628599178",
  "text": "\"These are my three weird friends\" 😂 - Beast Team",
  "authorName": "MrBeast Gaming",
  "authorIsPage": true,
  "isVerified": true,
  "reactionsCount": 16,
  "reactionBreakdown": { "like": 8, "care": 4, "love": 3, "angry": 1 },
  "repliesCount": 23,
  "isReply": false,
  "depth": 0
}
```

A post summary (free):

```json
{
  "type": "postSummary",
  "postId": "1580109507495507",
  "postAuthor": "Lidl Bulgaria",
  "postText": "🍐Българските круши ги обичаме сладки и сочни…",
  "totalCommentCount": 77,
  "scrapedCount": 77,
  "repliesScraped": 23,
  "topComments": [{ "commentId": "2201486690448688", "text": "…", "reactionsCount": 56 }],
  "pageReplyShare": 0,
  "pageReplies": 0,
  "sort": "newest",
  "stopCode": "complete"
}
```

An error row (free):

```json
{
  "type": "error",
  "inputUrl": "https://www.facebook.com/share/r/15B1URzika/",
  "errorCode": "post-unavailable",
  "message": "Facebook did not show this post to a logged-out visitor. It may be deleted, private, in a private group, age- or country-restricted, or the link is wrong."
}
```

The `SUMMARY` record in the run's key-value store lists every post with its stop reason, the comment count shown and saved, and the requests and bytes per proxy route.

### Tips for better runs

- **Start small.** Try 50–100 comments per post while you check the fields, then raise the limit.
- **Monitoring:** turn on **Only new comments**, keep **Newest first**, and schedule the Actor. Use one **Monitor store name** per schedule.
- **Brand replies:** turn on **Only the Page's own comments** together with **Include replies**; most Page answers are replies.
- **Leads:** combine **Keywords** with **Comments from** (for example `7 days`) and schedule it.
- **Leave the proxy on.** Requests go out directly first; the proxy is used only after Facebook blocks or rate-limits a request.

### Limitations

- **Public content only.** A post that needs a login, sits in a private group, is age- or country-restricted, or was deleted returns a free `post-unavailable` error row.
- **Facebook shows logged-out visitors a part of each thread.** The count on the post includes replies and comments Facebook hides from people who are not logged in. In our tests the Actor saved 100% of the 77 comments shown on a recent Page post, 95% of 6,479 on a viral post, about 70–80% on a reel and a group post, and about 64% on a 2024 video, where Facebook returned no replies at all for some comments. Older posts lose the most replies.
- **`authorIsPage`** marks the post's own Page (Facebook's "Author" badge). Facebook does not tell logged-out visitors whether any other commenter is a Page or a person.
- **Group posts:** Facebook marks every group post as closed to logged-out commenters, so `commentsDisabled` is `null` there and `authorIsPage` is always `false`.
- **Monitoring with Newest first** stops after 20 already-seen comments in a row, so new replies to older comments are found only with **Most relevant** or **All comments** order (seen comments stay free).
- **Profile links:** many personal profiles appear without `authorUrl` to logged-out visitors.
- **Media URLs expire.** Facebook signs attachment links; download files soon after the run.
- Posts are read one after another; a thread of several thousand comments takes several minutes.

### FAQ

#### Do I need a Facebook account, cookies or an access token?

No. The Actor never logs in and never asks for cookies or tokens. It reads what Facebook shows any logged-out visitor.

#### How do I download all comments from a Facebook post?

Paste the post link, set **Max comments per post** to 0, keep **Include replies** on, and start the run. The Actor works as a Facebook comment exporter: it reads every comment and reply Facebook shows a logged-out visitor, and you download them from the **Comments** view as CSV, Excel or JSON.

#### Can I use it to pick a giveaway winner?

Yes. Export all comments of the giveaway post, filter by `createdAt` for your deadline, remove duplicates by `authorName`, and draw a winner in a spreadsheet. `commentUrl` links to each entry as proof. Comments Facebook hides from logged-out visitors are not included, so state in your rules that only visible public comments count.

#### Can I scrape comments on Facebook ads?

Use the post link of the ad, for example from our [Facebook Ads Library Scraper](https://apify.com/valev-lab/facebook-ads-library) or the Page. If Facebook shows that post to logged-out visitors, its comments are read like any other post. Otherwise you get a free error row.

#### Does it work for Facebook Live videos?

A finished live video usually has a normal video link (`/videos/…` or `/watch/?v=…`), which the Actor accepts. We have tested regular videos and reels, not live replays or broadcasts that are still running.

#### Is this a Facebook Graph API alternative for comments?

Yes for public posts. You get structured comments through Apify (Console, API or integrations) without a Meta developer app, app review or Page tokens. It is not Meta's official API.

#### How much does it cost to scrape 1,000 Facebook comments?

$0.80 on the Apify Free plan, $0.70 on Bronze, $0.60 on Silver, and $0.50 on Gold and higher, plus $0.0005 per run. Replies cost the same as comments. Errors, summaries, duplicates and filtered comments are free.

#### Can it scrape comments from reels, videos and group posts?

Yes. Reels, `/watch/?v=` and `/videos/` links, photos, public group posts and share links all work. Private groups do not.

#### Does it get replies to comments?

Yes, with **Include replies** on (the default): replies and replies to replies, each as its own row linked by `parentCommentId`. Set **Max replies per comment** to limit them.

#### Why are there fewer comments than the post shows?

The count on a post includes replies and comments Facebook hides from logged-out visitors. The Actor saves every comment Facebook serves to a logged-out visitor; the post summary shows both numbers.

#### How do I get only new comments?

Turn on **Only new comments**. The Actor remembers the comments it delivered for each post in the **Monitor store** and skips them for free. Every comment also has `isNew`.

#### How do I export Facebook comments to CSV or Excel?

Run the Actor, open the **Output** tab, choose the **Comments** view, and click **Export**. CSV, Excel, JSON, XML and HTML are available.

#### What happens with a deleted post or comments turned off?

You get a free error row (`post-unavailable` or `comments-disabled`) and the run continues with the next link.

#### Can I scrape the posts themselves, or ads?

Use [Facebook Page Posts Scraper](https://apify.com/valev-lab/facebook-page-posts-scraper) for Page posts, [Facebook Group Posts Scraper](https://apify.com/valev-lab/facebook-groups-scraper) for group posts, and [Facebook Ads Library Scraper](https://apify.com/valev-lab/facebook-ads-library) for ads.

### Legal and ethics

> This Actor collects only comments visible on public Facebook posts without logging in. Comment rows contain names and text that people published publicly. Personal data is protected by the GDPR in the European Union and by other laws worldwide. Do not scrape personal data unless you have a legitimate reason. If you are unsure, consult your lawyers. Respect Facebook's terms.

### Support

- Use the **Issues** tab for bugs and feature requests.
- Use the **API** tab for programmatic runs, webhooks, and dataset access.

# Actor input Schema

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

Any public post link: Page and group posts, /reel/, /watch/?v=, /videos/, /photo/?fbid=, permalink.php, story.php, and share links (facebook.com/share/p/…, /share/r/…, /share/v/…), on www., m. or web. Numeric post ids and pageId_postId ids work too. Each post is read once, even under two different links. A Page or group link without a post returns a free error row. Leave empty to read 5 comments from a demo post.

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

Comments saved per post, replies included. 0 saves every comment Facebook serves logged out, within the run timeout and your maximum charge.

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

Facebook's own comment menu. Newest: every comment, newest first (best for monitoring and date limits). Most relevant: Facebook's ranking; it hides some comments. All comments: every comment including ones Facebook flags as possible spam, ranked.

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

Also save replies, as their own rows after their parent comment (isReply = true, parentCommentId, depth 1–2). Replies are charged like comments and count toward Max comments per post.

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

Replies saved under one top-level comment, nested replies included. 0 saves every reply Facebook serves.

## `dateFrom` (type: `string`):

Keep comments posted on or after this time: YYYY-MM-DD, an ISO timestamp, or a phrase such as 24 hours, 7 days, 2 weeks, 3 months. Older comments are skipped and not charged. With Newest order the post stops after 10 older comments in a row.

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

Keep only comments with at least this many reactions. 0 keeps all. Filtered comments are not charged.

## `keywords` (type: `array`):

Keep only comments that contain at least one of these words or phrases (case-insensitive). Leave empty to keep all.

## `authorIsPageOnly` (type: `boolean`):

Keep only comments and replies written by the Page (or public profile) that published the post, for example a brand answering customers. Turn on Include replies too, since most Page answers are replies. Not available for group posts.

## `detectLanguage` (type: `boolean`):

Add language (ISO 639-3, e.g. eng, spa, bul) to each comment, detected locally from the text. Comments shorter than about 20 letters get null. No extra request and no extra charge.

## `monitorMode` (type: `boolean`):

Save only comments not delivered for the same post in earlier runs. Already-seen comments are skipped for free. With Newest order a post stops after 20 already-seen comments in a row, so new replies to older comments are found only with Most relevant or All comments order. Every run remembers delivered comments, so isNew is set even when this is off.

## `monitorStoreName` (type: `string`):

Named key-value store that remembers delivered comment ids per post. Use one name per schedule; lowercase letters, digits and hyphens.

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

Requests go out directly first. After a login wall or rate limit, your proxy URLs are used when present; otherwise Apify Residential. Turn Apify Proxy off to stay direct.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/nike/posts/pfbid0gwtYswxtEHHbiqWvHX5EHEi1A8Mmac4fT7tpcq3FTxFrQ7CGDmhfujGfV6gUbdBDl"
  ],
  "maxCommentsPerPost": 200,
  "sort": "newest",
  "includeReplies": true,
  "maxRepliesPerComment": 0,
  "minReactions": 0,
  "authorIsPageOnly": false,
  "detectLanguage": true,
  "monitorMode": false,
  "monitorStoreName": "facebook-comments-scraper-monitor",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Comment and reply columns. Filter type = comment for a comments-only table.

## `postSummaries` (type: `string`):

Per post: comment count shown, saved count, top 10 comments, Page reply share; plus error rows.

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

Every row with all fields.

## `runSummary` (type: `string`):

Stop reason per post, success rate, proxy requests and bytes. Not an invoice.

# 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/nike/posts/pfbid0gwtYswxtEHHbiqWvHX5EHEi1A8Mmac4fT7tpcq3FTxFrQ7CGDmhfujGfV6gUbdBDl"
    ],
    "maxCommentsPerPost": 200,
    "sort": "newest",
    "includeReplies": true,
    "maxRepliesPerComment": 0,
    "minReactions": 0,
    "authorIsPageOnly": false,
    "detectLanguage": true,
    "monitorMode": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("valev-lab/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/nike/posts/pfbid0gwtYswxtEHHbiqWvHX5EHEi1A8Mmac4fT7tpcq3FTxFrQ7CGDmhfujGfV6gUbdBDl"],
    "maxCommentsPerPost": 200,
    "sort": "newest",
    "includeReplies": True,
    "maxRepliesPerComment": 0,
    "minReactions": 0,
    "authorIsPageOnly": False,
    "detectLanguage": True,
    "monitorMode": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("valev-lab/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/nike/posts/pfbid0gwtYswxtEHHbiqWvHX5EHEi1A8Mmac4fT7tpcq3FTxFrQ7CGDmhfujGfV6gUbdBDl"
  ],
  "maxCommentsPerPost": 200,
  "sort": "newest",
  "includeReplies": true,
  "maxRepliesPerComment": 0,
  "minReactions": 0,
  "authorIsPageOnly": false,
  "detectLanguage": true,
  "monitorMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call valev-lab/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,valev-lab/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/MW2RG9292unUCp6SW/builds/6fb6uQWVUQEzCVo1B/openapi.json
