# Facebook Comments & Replies Scraper (`alpha-scraper/facebook-comments-replies-scraper`) Actor

\[ 1k/1.49$ ] Facebook Comments & Replies Scraper extracts public comments and optional replies from Facebook posts, reels and videos: text, author, time, reaction counts and reply threads. No login or cookies needed; stops when Facebook stops returning more comments.

- **URL**: https://apify.com/alpha-scraper/facebook-comments-replies-scraper.md
- **Developed by:** [Alpha Scraper](https://apify.com/alpha-scraper) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 & Replies Scraper

**Facebook Comments & Replies Scraper** collects the public comments of Facebook posts, reels and videos, and can also collect the replies under each comment. Give Facebook Comments & Replies Scraper a post, reel or video link, and it returns every comment as a structured record with text, time, author, reactions, reply counts, mentions, hashtags and attachments.

Facebook Comments & Replies Scraper reads only what a logged-out visitor can see on Facebook. You do not need a Facebook account, cookies or an API key, so you can go from a Facebook post URL to a clean comment dataset in a few minutes.

> **📌 At a glance**
>
> - **Input:** Facebook post, reel and video URLs, including share links and short links
> - **Output:** one dataset record per comment, plus one per reply when you flatten replies
> - **Options:** comment order, replies on or off, replies per comment, and a per-URL limit
> - **Limit:** Facebook shows a logged-out visitor only part of a long comment thread, usually several hundred comments

Teams use Facebook Comments & Replies Scraper for audience research, community management, giveaway checks, customer feedback analysis and social listening. Every Facebook comment arrives in the same JSON shape, so the data is easy to export, filter and feed into a spreadsheet or a sentiment model.

### 🔹 Facebook Comments & Replies Scraper – Key Features

Facebook Comments & Replies Scraper focuses on the details that matter when you study a Facebook comment section.

- **Posts, reels and videos:** Facebook Comments & Replies Scraper handles Facebook post permalinks, reels, watch videos and share links.
- **Three comment orders:** choose most relevant, newest or the unfiltered list of all Facebook comments.
- **Optional replies:** switch on replies and collect up to a number you choose under each Facebook comment.
- **Nested or flat replies:** keep replies inside each comment, or turn each Facebook reply into its own row.
- **Engagement data:** reaction totals, a reaction breakdown such as Like and Love, and the reply count of every comment.
- **Author details:** name, profile link, avatar, account type, verified badge and a flag that marks the post owner.
- **Text signals:** mentions, hashtags and a language hint for each Facebook comment.
- **Comment attachments:** photos, stickers, GIFs and links attached to a comment are listed.
- **Post context:** every record repeats the post link, id, type and the total comment count Facebook reports.

> **✅ Why use this Actor**
>
> Facebook Comments & Replies Scraper replaces manual scrolling and copy-and-paste. Facebook Comments & Replies Scraper pages through the Facebook comment list for you, stops at your limit and returns fields you can export as JSON, CSV or Excel.

### 🔍 What Data Does Facebook Comments & Replies Scraper Extract?

Each dataset item describes one Facebook comment or one reply. The table groups the fields by purpose.

| Group | Fields | What you get |
|---|---|---|
| Identity | `id`, `commentNodeId`, `feedbackId`, `parentId`, `depth`, `url` | Ids, nesting level and a link to the Facebook comment |
| Content | `text`, `mentions`, `hashtags`, `attachments`, `languageHint` | Comment text and the entities inside it |
| Timing | `createdTime`, `createdTimestamp` | Publish time as ISO text and as a Unix timestamp |
| Author | `authorId`, `authorName`, `authorUrl`, `authorAvatar`, `authorType`, `authorIsVerified`, `isByPostOwner` | Who wrote the Facebook comment |
| Engagement | `reactionCount`, `reactionCountRounded`, `reactionBreakdown`, `replyCount`, `replies` | Public reactions and replies |
| Post context | `postUrl`, `postId`, `postType`, `postTotalComments` | The Facebook post the comment belongs to |
| Record info | `number`, `type`, `scrapedAt` | Position in the dataset, `comment` or `reply`, and collection time |

In Facebook Comments & Replies Scraper, the `type` field is `comment` for top-level comments and `reply` for flattened replies. The `postType` field shows whether the source was a post, a reel or a video.

### 🚀 How to Use Facebook Comments & Replies Scraper

Running Facebook Comments & Replies Scraper takes a few steps in Apify Console.

- **Step 1 – Open the Actor:** start Facebook Comments & Replies Scraper from the Apify Store and go to the Input tab.
- **Step 2 – Add your links:** paste Facebook post, reel or video URLs into *Start URLs*.
- **Step 3 – Choose the order:** pick *Comment order*, for example newest, to match your analysis.
- **Step 4 – Decide on replies:** tick *Include replies* and optionally *Flatten replies* if you want one row per reply.
- **Step 5 – Set limits:** use *Max items* for comments per URL and *Max replies per comment* for replies in Facebook Comments & Replies Scraper.
- **Step 6 – Run and export:** start the run, then download the Facebook comments as JSON, CSV or Excel, or read them through the Apify API.

> **💡 Tip:** the input is prefilled with a sample post link. Replace it with your own URLs before you run Facebook Comments & Replies Scraper.

### 📥 Facebook Comments & Replies Scraper Input

Facebook Comments & Replies Scraper has six input fields. All of them are optional, but you need at least one URL in `startUrls`.

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Facebook post, reel or video URLs. Accepted forms are `/<page>/posts/<id>`, `/reel/<id>`, `/watch/?v=<id>`, `/<page>/videos/<id>`, `/share/p`, `/share/r` and `/share/v` links, fb.watch short links, photo permalinks and a bare numeric video id. |
| `commentOrder` | string | Order of top-level comments. Values: `relevant` (Most relevant), `newest` (Newest), `all` (All comments, unfiltered, which can include spam). Default `relevant`. |
| `includeReplies` | boolean | Also collect the replies of every comment that has visible replies. Default `false`. |
| `flattenReplies` | boolean | Return each reply as its own row with type `reply` and a `parentId`, instead of nesting it in the comment's `replies` list. Works only when `includeReplies` is on. Default `false`. |
| `maxReplies` | integer | Maximum replies collected for each comment. Used only when `includeReplies` is on. Minimum 1, default 10. |
| `maxItems` | integer | Maximum top-level comments per URL. Minimum 1, default 25. |

With Facebook Comments & Replies Scraper, every entry in `startUrls` gets its own `maxItems` limit, so three URLs with `maxItems` set to 100 can return up to 300 comments, plus replies when they are included.

Here is a sample input for Facebook Comments & Replies Scraper that collects the 100 newest comments of one post, with up to 5 replies each:

```json
{
  "startUrls": ["https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId"],
  "commentOrder": "newest",
  "includeReplies": true,
  "flattenReplies": false,
  "maxReplies": 5,
  "maxItems": 100
}
```

### 📤 Facebook Comments & Replies Scraper Output

Facebook Comments & Replies Scraper writes one record per comment to the default dataset. With nested replies, each reply sits inside the `replies` list of its comment.

```json
{
  "number": 1,
  "type": "comment",
  "id": "1000000000000101",
  "commentNodeId": "Y29tbWVudDoxMjM0NTY3ODkwXzEwMDAwMDAwMDAwMDAxMDE=",
  "feedbackId": "ZmVlZGJhY2s6RXhhbXBsZUNvbW1lbnRGZWVkYmFja0lk",
  "parentId": null,
  "depth": 0,
  "text": "Love this launch! Where can I get the blue edition?",
  "createdTime": "2026-10-28T14:30:00.000Z",
  "createdTimestamp": 1793197800,
  "url": "https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId?comment_id=1000000000000101",
  "authorId": "100000000000002",
  "authorName": "Jane Doe",
  "authorUrl": "https://www.facebook.com/jane.doe.example",
  "authorAvatar": "https://example.com/avatar/jane-doe.jpg",
  "authorType": "User",
  "authorIsVerified": false,
  "isByPostOwner": false,
  "reactionCount": 42,
  "reactionCountRounded": "42",
  "reactionBreakdown": { "Like": 35, "Love": 7 },
  "replyCount": 1,
  "replies": [
    {
      "id": "1000000000000102",
      "parentId": "1000000000000101",
      "depth": 1,
      "text": "It is in the online store now.",
      "createdTime": "2026-10-28T15:05:00.000Z",
      "authorId": "100000000000001",
      "authorName": "Sample Page",
      "isByPostOwner": true,
      "reactionCount": 9,
      "replyCount": 0,
      "replies": []
    }
  ],
  "mentions": [],
  "hashtags": [],
  "attachments": [],
  "languageHint": "en_XX",
  "postUrl": "https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId",
  "postId": "1234567890123456",
  "postType": "post",
  "postTotalComments": 318,
  "scrapedAt": "2026-11-06T15:16:09.000Z"
}
```

The nested reply above is shortened. A real reply from Facebook Comments & Replies Scraper carries the same fields as a comment. With `flattenReplies` on, each reply becomes its own record with `type` set to `reply` and `replies` set to `null`.

#### 🧾 Output field guide

- `id`, `commentNodeId` and `feedbackId` identify the comment, and `url` links to it on Facebook.
- `parentId` is `null` for a comment and holds the parent comment id for a reply. `depth` is 0 for comments and 1 for replies.
- `text` holds the comment text, and `languageHint` shows the language code Facebook reports.
- `createdTime` and `createdTimestamp` give the publish time in two formats.
- `authorName`, `authorUrl` and `authorAvatar` describe the commenter, and `authorType` shows the account type such as `User` or `Page`.
- `isByPostOwner` is `true` when the Page that owns the post wrote the comment, and `null` when the owner is unknown.
- `reactionCount` is the total, and `reactionBreakdown` splits it by reaction type.
- `mentions` list tagged people or Pages with their offsets, and `hashtags` list tags found in the text.
- `attachments` list photos, stickers, GIFs and links with their `type`, `url`, `image`, `width` and `height`.
- `postUrl`, `postId`, `postType` and `postTotalComments` repeat the Facebook post context on every row.

### 💬 How to Scrape Comments and Replies from a Facebook Post

To scrape Facebook comments and replies from one post, paste the post link into `startUrls`, set `maxItems` and switch on `includeReplies`. Facebook Comments & Replies Scraper loads the post, reads its comment list and then opens the replies of each comment that has any.

Keep the replies nested when you want one row per comment, which suits dashboards and counts. Turn on `flattenReplies` when you want a flat table, where every comment and every reply is one row linked by `parentId`. Both modes hold the same data.

### 🎯 Facebook Comments & Replies Scraper Use Cases

Facebook Comments & Replies Scraper fits many workflows that start from public Facebook conversations.

- **Social listening:** use Facebook Comments & Replies Scraper to read what people say under a Facebook launch post or a news story.
- **Customer feedback:** collect questions and complaints from your Facebook Page posts for the support team.
- **Sentiment analysis:** export Facebook comment text from Facebook Comments & Replies Scraper to a language model or a spreadsheet and score it.
- **Giveaway checks:** list every commenter on a contest post and see who tagged friends.
- **Competitor research:** compare the engagement and tone under rival Facebook Page posts.
- **Spam review:** use the unfiltered comment order to find repeated or spam messages.

### 💰 Pricing

Facebook Comments & Replies Scraper runs on the Apify platform. The current pricing is shown on the Actor page in the Apify Store, and your cost depends on the number of results and the resources used by the run.

> **💡 Cost tip:** start with `maxItems` set to 25 and `maxReplies` set to 5. Check the output, then raise the limits once the Facebook comment data looks right.

### 💡 Tips and Best Practices

- **Start small:** a short run of Facebook Comments & Replies Scraper confirms the link works and shows the fields before a large collection.
- **Know the cap:** Facebook limits the comment list shown to a logged-out visitor, so Facebook Comments & Replies Scraper stops at several hundred comments on very large threads.
- **Check `postTotalComments`:** it shows how many comments Facebook reports, so you can compare it with your result.
- **Expect fewer replies on some Pages:** a few Facebook Pages hide replies from logged-out viewers, and `replyCount` may be higher than the replies returned.
- **Pick the right order:** use `newest` for monitoring, `relevant` for a quick look and `all` for audits.
- **Check nulls:** a `null` field means Facebook did not show the value for that comment.

> **⚠️ Important:** only collect data you are allowed to use. Facebook comments contain personal data such as names and profile links, so follow Facebook's terms and the privacy rules that apply to you, such as GDPR. This Actor is not affiliated with or endorsed by Meta.

### ❓ Frequently Asked Questions

#### 🔎 What is Facebook Comments & Replies Scraper?

Facebook Comments & Replies Scraper is an Apify Actor that collects public comments and replies from Facebook posts, reels and videos. It returns text, time, author, reactions and attachments in a structured format.

#### 🧭 How do I scrape comments from a Facebook post?

Open Facebook Comments & Replies Scraper, paste the post link into *Start URLs*, set *Max items* and start the run. The comments appear in the dataset in the order you chose.

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

Yes. Switch on *Include replies* and set *Max replies per comment*. Facebook Comments & Replies Scraper then collects the replies that Facebook shows publicly under each comment.

#### 📄 Can I get each reply as its own row?

Yes. Switch on *Flatten replies* in Facebook Comments & Replies Scraper. Every reply becomes a separate record with `type` set to `reply` and the comment it answers in `parentId`.

#### 🔐 Does Facebook Comments & Replies Scraper need a Facebook login?

No. Facebook Comments & Replies Scraper reads publicly visible content, so no account, cookies or API key are required.

#### 📦 What data does Facebook Comments & Replies Scraper return?

Each record includes ids, comment text, time, author details, reactions, reply counts, mentions, hashtags, attachments and the Facebook post context.

#### 🔢 How many Facebook comments can I scrape?

Set *Max items* to the number you need per URL. Facebook Comments & Replies Scraper stops when it reaches that number or when Facebook stops returning more comments, which for very large threads is usually after several hundred.

#### 🎥 Can I scrape comments from Facebook reels and videos?

Yes. Facebook Comments & Replies Scraper accepts Facebook reel, watch and video links like post links, and `postType` shows which kind of source each comment came from.

#### 🚫 Can I scrape private Facebook posts or groups?

No. Facebook Comments & Replies Scraper only returns public content that a visitor can see without logging in. Posts that are private or unavailable return no comments.

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

Yes. The dataset of Facebook Comments & Replies Scraper can be downloaded as JSON, CSV, Excel, XML or HTML, or read through the Apify API.

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

Facebook Comments & Replies Scraper collects public Facebook content only. You are responsible for how you use the data, so check Facebook's terms, local laws and privacy rules before you store or share personal information.

### 📞 Support

If you have questions, ideas for new fields or a link that does not return the expected comments, send the post URL and the input you used.

- Contact me by email: alphascraper69@gmail.com

# Actor input Schema

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

Post, reel or video URLs: /<page>/posts/<id or pfbid>, /reel/<id>, /watch/?v=<id>, /<page>/videos/<id>, /share/p|r|v/<code> links, fb.watch short links, photo permalinks, or a bare numeric video id.

## `commentOrder` (type: `string`):

Order of the top-level comments. 'All comments' is Facebook's unfiltered list and can include spam.

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

Also fetch the replies of every comment that has visible replies (up to 'Max replies per comment'). Replies are nested in each comment's 'replies' list unless 'Flatten replies' is on.

## `flattenReplies` (type: `boolean`):

Return each reply as its own row (type 'reply', with parentId) instead of nesting it in the comment's 'replies' list. Only has an effect when 'Include replies' is on.

## `maxReplies` (type: `integer`):

Maximum number of replies fetched for each comment. Only used when 'Include replies' is on.

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

Maximum number of top-level comments per URL - every entry of 'Start URLs' gets its own limit (N URLs return up to N x this value, plus replies when included).

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/reel/1108772172052484/",
    "https://www.facebook.com/leomessi/posts/pfbid02QuxhM8Ny1pn7szanLdfVpsFRxssoS6yuBF6KnAmMdySwTzyN53igBMaHA3jBBCThl"
  ],
  "commentOrder": "relevant",
  "includeReplies": true,
  "flattenReplies": false,
  "maxReplies": 10,
  "maxItems": 20
}
```

# Actor output Schema

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

Structured records extracted by Facebook Comments & Replies Scraper and stored in the run's default dataset.

# 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/reel/1108772172052484/",
        "https://www.facebook.com/leomessi/posts/pfbid02QuxhM8Ny1pn7szanLdfVpsFRxssoS6yuBF6KnAmMdySwTzyN53igBMaHA3jBBCThl"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("alpha-scraper/facebook-comments-replies-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/reel/1108772172052484/",
        "https://www.facebook.com/leomessi/posts/pfbid02QuxhM8Ny1pn7szanLdfVpsFRxssoS6yuBF6KnAmMdySwTzyN53igBMaHA3jBBCThl",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("alpha-scraper/facebook-comments-replies-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/reel/1108772172052484/",
    "https://www.facebook.com/leomessi/posts/pfbid02QuxhM8Ny1pn7szanLdfVpsFRxssoS6yuBF6KnAmMdySwTzyN53igBMaHA3jBBCThl"
  ],
  "maxItems": 20
}' |
apify call alpha-scraper/facebook-comments-replies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alpha-scraper/facebook-comments-replies-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/CIVgDpjQ6XiQlfUA3/builds/VXggn21pvEgN91TSa/openapi.json
