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

Extract comments from public Facebook posts, videos, reels and photos without logging in: comment text, author, publish time, reactions by type, reply counts and optionally the replies themselves, ordered newest first, all comments or most relevant.

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

## Pricing

from $2.49 / 1,000 results

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 — Extract Comments from Public Facebook Posts

![Facebook Comments Scraper](https://i.ibb.co/s92VZCPb/Screenshot-2026-09-20-at-5-04-12-PM.png)

This **Facebook comments scraper** turns the comment section of any public post on **[Facebook](https://www.facebook.com/)** into structured data. Give it post, video, reel or photo links and it returns the **Facebook post comments** with text, author, publish time, reactions broken down by type, reply counts and, when you ask for them, the replies themselves. Teams use it to read what an audience says about a launch, a campaign or a competitor, to moderate and answer at scale, and to build sentiment and research datasets without scrolling through threads by hand.

Paste as many posts as you like, choose how many comments you want from each and in which order, and get one dataset item per comment, ready to export to JSON, CSV or Excel. No Facebook account, cookies or API key are needed.

***

### 🚀 Key Features

- 🔗 **Posts, videos, reels and photos** — `/posts/`, `/videos/`, `/reel/`, `/photo/`, `watch?v=`, `permalink.php` and `story.php` links, with no limit on how many per run
- 🧾 **Full comment record** — text, publish time, author with profile link and picture, reactions with a per-type breakdown, reply count, attachments
- 🧵 **Replies on demand** — `includeReplies` adds the replies under each comment as separate items with `depth` and `parent_comment_id`
- 🔀 **Three orderings** — all comments, newest first, or Facebook's "most relevant" selection
- 🔢 **Per-post limit** — `maxItems` caps comments for each post separately, so one viral post cannot crowd out the rest
- 🛡️ **No login required** — reads only what Facebook shows to logged-out visitors; Apify residential proxies by default, datacenter works for post, video and reel links
- 📤 **Multiple export formats** — JSON, CSV, Excel, XML via the Apify dataset
- 🔁 **Schedulable runs** — run daily on the posts you are watching to keep their comment threads up to date

***

### 👥 Who Is This Actor For?

- 📣 **Social media and community managers** — reading and answering what people say under a brand's posts
- 📈 **Marketing analysts** — measuring sentiment and recurring themes across a campaign's posts
- 📰 **Journalists and researchers** — collecting public reactions to announcements, events and public figures
- 🧰 **Developers** — feeding comment threads into moderation tools, dashboards or a CRM
- 🤖 **AI builders** — grounding a sentiment or summarisation agent in the actual comments under a post

### 💡 Common Use Cases

- Scrape Facebook comments under a product launch post and classify them by sentiment
- Collect every comment on a competitor's campaign posts, with reactions, to see what resonates
- Export the comment threads of a public figure's posts for a media study
- Watch your own page's posts daily and flag comments that need an answer
- Build a dataset of comments with replies to study how discussions develop

***

### 🔗 Supported URL Types

| URL Type | Example |
| -------- | ------- |
| **Post** | `https://www.facebook.com/zuck/posts/pfbid02XPBMPD53Kh…` |
| **Video** | `https://www.facebook.com/zuck/videos/2300161320399228/` |
| **Reel** | `https://www.facebook.com/reel/1194067775494747/` |
| **Watch link** | `https://www.facebook.com/watch/?v=2300161320399228` |
| **Photo** | `https://www.facebook.com/photo/?fbid=10117964356277811&set=a.743613136151` |
| **Permalink** | `https://www.facebook.com/permalink.php?story_fbid=10116914317858221&id=4` |
| **`m.facebook.com` or `web.facebook.com` links** | `https://m.facebook.com/story.php?story_fbid=…&id=…` |

Group posts need a Facebook login and are skipped. Page and profile links are not post URLs; use the [Facebook Posts Scraper](https://apify.com/logical_scrapers/facebook-page-posts-scraper) to collect a page's posts first, then pass their `post_url` values here.

***

### 📥 Input

| Field | Type | Description | Default |
| ----- | ---- | ----------- | ------- |
| `startUrls` | Array | Public Facebook posts to collect comments from. Paste post links such as `https://www.facebook.com/zuck/posts/pfbid0…`, video or reel links, photo links, or `permalink.php` and `story.php` links. One entry per post, and as many posts as you like. | Required |
| `maxItems` | Integer | Maximum number of comments to scrape from each post (start URL). Replies count towards this limit when they are included. | `20` |
| `sortBy` | String | Which comments to collect and in what order: `all` (Facebook's default order), `newest` (newest first) or `most_relevant` (Facebook's selection, which leaves some comments out). | `all` |
| `includeReplies` | Boolean | Also collect the replies under each comment. Replies are separate items with `depth` 1 and a `parent_comment_id`, and count towards `maxItems`. | `false` |
| `maxRepliesPerComment` | Integer | When replies are included, how many to collect under each comment. | `10` |
| `proxyConfiguration` | Object | Proxy configuration. Defaults to Apify residential proxies, which work for every supported link. Datacenter proxies are cheaper and work for post, video and reel links, but Facebook sends photo links to its login page from datacenter IP addresses. | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` |

#### Example Input

```json
{
  "startUrls": [
    "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
    "https://www.facebook.com/zuck/videos/2300161320399228/"
  ],
  "maxItems": 20,
  "sortBy": "all",
  "includeReplies": false,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

***

### 📤 Output

One dataset item per comment or reply:

| Field | Type | Description |
| ----- | ---- | ----------- |
| `comment_id` | String | Facebook's identifier for the comment |
| `comment_url` | String | Link that opens the post with this comment focused |
| `text` | String | The comment text; `null` for a comment that is only a sticker, GIF or photo |
| `created_time` | String | Publish time as an ISO 8601 timestamp (UTC) |
| `depth` | Number | `0` for a comment on the post, `1` for a reply |
| `parent_comment_id` | String | For a reply, the `comment_id` it answers; `null` on top-level comments |
| `author` | Object | `id`, `name`, `url`, `profile_picture_url` and `is_verified` of the person or page that commented |
| `reactions` | Object | `total` and a `breakdown` by reaction type (`like`, `love`, `haha`, `care`, `wow`, `sad`, `angry`) |
| `replies_count` | Number | Number of replies under the comment |
| `attachments` | Array | Photos, GIFs, stickers and links on the comment: `type`, `url`, `thumbnail`, `width`, `height` |
| `post_id` | String | Facebook's id for the post the comment is on |
| `post_url` | String | Link to the post |
| `post_comments_count` | Number | Total number of comments on the post at the time of the run |
| `input_url` | String | The start URL you passed in |

#### Example Output

A real item from a run on the example input (2026-09-20), with the image URL query string removed:

```json
{
  "comment_id": "689395850406355",
  "comment_url": "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl?comment_id=689395850406355",
  "text": "with the development of meta ai, hopefully in the future it will be more advanced and we will all be enthusiastic in working healthily, successfully and happily,",
  "created_time": "2025-04-30T23:20:29.000Z",
  "depth": 0,
  "parent_comment_id": null,
  "author": {
    "id": "61560227881849",
    "name": "Risma Veana",
    "url": "https://www.facebook.com/maratti.manihuruk",
    "profile_picture_url": "https://scontent.fntr11-1.fna.fbcdn.net/v/t39.30808-1/676460401_122215877660340929_5051027082001229586_n.jpg",
    "is_verified": false
  },
  "reactions": {
    "total": 18,
    "breakdown": {
      "like": 12,
      "love": 4,
      "care": 2
    }
  },
  "replies_count": 3,
  "attachments": [],
  "post_id": "10116522560787531",
  "post_url": "https://www.facebook.com/zuck/posts/just-shared-metas-quarterly-earnings-report-ai-continues-to-transform-everything/10116522560787531/",
  "post_comments_count": 155102,
  "input_url": "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl"
}
```

You can export the dataset as **JSON, CSV, Excel, XML, RSS, or HTML** from the Apify Console or via the [Apify API](https://docs.apify.com/api/v2).

***

### 💰 Pricing

This Actor is **pay per event**. Each comment or reply saved counts as one result at **$0.0025 per result**, so **1,000 comments cost $2.50** plus Apify platform usage. In runs on 2026-09-20 that platform usage came to about $0.14 per 1,000 comments on the residential default and about $0.08 on datacenter proxies. A free Apify account is enough to try it.

***

### ❓ FAQ

#### What is the Facebook Comments Scraper?

It is an Apify Actor that reads the comment section of public Facebook posts, videos, reels and photos and returns the comments as structured data. Paste post links, set a limit per post, and run it from the Console, the API, or on a schedule.

#### Do I need an account, cookies or an API key?

No. The Actor reads only what Facebook shows to visitors who are not logged in.

#### Which posts work?

Public posts by pages and public profiles: brands, media outlets, public figures, businesses, organisations. Posts inside groups need a login and are skipped. A post that hides its comments from logged-out visitors returns none, and the run says so.

#### Do I need a proxy?

Yes. The residential default works for every supported link. Apify datacenter proxies are cheaper and, in runs on 2026-09-20, served post, video and reel links in full (200 comments from one post, no interruption), but Facebook sent photo links to its login page from datacenter IP addresses. Switch to datacenter when your list has no photo links.

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

`maxItems` caps comments per post, and the Actor keeps collecting until it reaches your limit or the end of the thread. In a run on 2026-09-20 it collected 200 comments from one post in about a minute. Long threads are carried through to the end for you — there is nothing to resume or stitch together.

#### What is the difference between the three orderings?

`all` returns every comment in the order Facebook lists them under "All comments". `newest` returns the most recent comments first. `most_relevant` returns the selection Facebook shows by default, which favours engaged comments and leaves the rest out, so it is the wrong choice when you want the whole thread.

#### Does it collect replies?

Yes, when `includeReplies` is on. Each reply is its own item with `depth` 1 and the `parent_comment_id` of the comment it answers. `maxRepliesPerComment` caps replies per comment, and replies count towards `maxItems`.

#### Why is `text` sometimes empty?

Comments that consist only of a sticker, a GIF or a photo have no text. The media is in `attachments`.

#### Can I schedule it or integrate it with my app?

Yes. Every Apify Actor exposes a REST API, webhooks, and integrations with Zapier, Make, Google Sheets and Slack, and can be called from an AI agent via the Apify MCP server.

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

This Actor accesses only publicly available pages. You are responsible for making sure your use complies with Facebook's terms of service and the laws in your jurisdiction, including any rules that apply to personal data.

#### What if Facebook changes and the Actor breaks?

Open an issue on the Actor's **Issues** tab with a post URL that fails, so the problem can be reproduced.

***

### 🧩 Part of the Facebook Scraper Suite

Goldmine's Actors for public Facebook data. Also try:

- [Facebook Group Scraper](https://apify.com/logical_scrapers/facebook-group-posts-scraper) — posts, authors, reactions and photos from public Facebook groups
- [Facebook Posts Scraper](https://apify.com/logical_scrapers/facebook-page-posts-scraper) — posts from public Facebook pages and profiles, with reactions, comments and shares
- [Facebook Page Details Scraper](https://apify.com/logical_scrapers/facebook-page-details-scraper) — followers, category, contact details and about text for a page, one row per page
- [Facebook Ads Library Scraper](https://apify.com/logical_scrapers/facebook-ads-library-scraper) — ad copy, creatives, CTAs and run dates from the public Facebook Ad Library

See every Goldmine Actor at [apify.com/logical\_scrapers](https://apify.com/logical_scrapers).

***

### 📷 Image Credit

Image credit: [facebook.com](https://www.facebook.com/)

***

### 📬 Contact & Support

- **Issues & feature requests**: use the Issues tab on this Actor's page. Include a post URL that fails so it can be reproduced.
- **Email**: `coredev.dan@gmail.com`
- **If this Actor saved you time, please leave a ⭐ rating on the Apify Store.** It helps us keep it maintained.

This Actor is an independent tool for collecting publicly available data. It is not affiliated with, endorsed by, or connected with Meta Platforms, Inc.

# Actor input Schema

## `startUrls` (type: `array`):

Public Facebook posts to collect comments from. Paste post links such as https://www.facebook.com/zuck/posts/pfbid0…, video or reel links, photo links, or permalink.php and story.php links. One entry per post, and as many posts as you like.

## `maxItems` (type: `integer`):

Maximum number of comments to scrape from each post (start URL). Replies count towards this limit when they are included.

## `sortBy` (type: `string`):

Which comments to collect and in what order: all comments in Facebook's default order, newest first, or Facebook's "most relevant" selection, which leaves some comments out.

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

Also collect the replies under each comment. Replies are separate items with depth 1 and a parent\_comment\_id, and count towards maxItems.

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

When replies are included, how many to collect under each comment.

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

Proxy configuration. Defaults to Apify residential proxies, which work for every supported link. Datacenter proxies are cheaper and work for post, video and reel links, but Facebook sends photo links to its login page from datacenter IP addresses.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
    "https://www.facebook.com/zuck/videos/2300161320399228/"
  ],
  "maxItems": 20,
  "sortBy": "all",
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
        "https://www.facebook.com/zuck/videos/2300161320399228/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logical_scrapers/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 = {
    "startUrls": [
        "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
        "https://www.facebook.com/zuck/videos/2300161320399228/",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logical_scrapers/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 '{
  "startUrls": [
    "https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
    "https://www.facebook.com/zuck/videos/2300161320399228/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call logical_scrapers/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

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