# Facebook Comments Scraper: Replies & Reactions (`deepmine/facebook-comments-scraper`) Actor

Facebook comments scraper: paste post, reel, video or photo links and get every public comment and reply with author, text, date, reactions by type, reply counts, GIFs, photos and links. 3 reply levels, sort, date window. No login, no cookies, no browser.

- **URL**: https://apify.com/deepmine/facebook-comments-scraper.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.19 / 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: Replies & Reactions

Facebook comments scraper for public posts, reels, videos and photos. Paste the links and get **every public comment
and reply** as its own flat row: the author, the full text, the exact time, reactions **by type** (Like, Love, Care,
Haha, Wow, Sad, Angry), the commenter's gender, how many replies it drew, the thread it belongs to, and any GIF,
photo, sticker, video or link it carries. No login, no cookies, no browser.

| | |
|---|---|
| **Input** | Post, reel, video, watch, photo, share and public group-post links |
| **Output** | One row per comment or reply, 57 fields, plus a run summary |
| **Replies** | All 3 levels Facebook shows: comment, reply, reply to a reply |
| **Sort** | All comments, most relevant, newest first |
| **Dates** | Comments newer than / older than (a window); date filters are free |
| **Price** | $0.24 per 1,000 comments on Starter, replies included; no start fee |

#### What you get for each comment

| What | Fields |
|---|---|
| The comment | `text`, `textSnippet`, `date`, `timestamp`, `commentUrl`, `commentId`, `id`, `feedbackId` |
| Reactions | `likesCount` (exact when Facebook lists the types), `likesCountText` ("1.2K"), `reactionLikeCount` … `reactionAngryCount` |
| Replies and threads | `commentsCount`, `threadingDepth` (0, 1, 2), `isReply`, `replyToCommentId`, `replyToName`, `rootCommentId` |
| Attachments | `attachmentType` (Photo, Sticker, GIF, Video, Link, Post), `attachmentUrl`, `attachmentImageUrls`, `attachmentVideoUrl`, `attachmentTitle`, `attachmentSource`, `attachmentId`, `textLinks`, `sharedPostUrl`, `sharedPostText`, `mentions` |
| The author | `profileName`, `profilePicture`, `profileId`, `profileUrl`, `isAuthorVerified`, `profileGender` (`MALE`, `FEMALE`, or `NEUTER` for a page) |
| The post | `postTitle`, `postDescription`, `postUrl`, `postId`, `facebookId` (the post id, as in apify's rows), `pageName`, `pageId`, `pageAdLibraryId`, `isBusinessPageActive`, `facebookUrl` |
| Where it came from | `inputUrl` (your link, as you gave it), `scrapedAt` |
| apify-compatible | `author` {id, name, url, profile_picture_depth_0, gender, is_verified}, `attachments` (the media objects), `parentComment` (the thread's first comment), `parentReply` (the comment a reply answers), `pageAdLibrary` {id, is_business_page_active}: the same data in apify/facebook-comments-scraper's shape, so code written for its rows runs unchanged |

A real row from a run on 2026-10-18 (a comment Humans of New York wrote under its own post, with a link card):

```json
{
  "profilePicture": "https://scontent-lax7-1.xx.fbcdn.net/v/t39.30808-1/334611134_1536915246801761_214912837020673325_n.jpg?stp=c341.0.1365.1365a_cp0_dst-jpg_tt6&cstp=mx1365x1365&ctp=s64x64&_nc_cat=105&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=XB94OzzZmyEQ7kNvwHfl7W6&_nc_oc=Adr2sSOGAOnnYakYlAHM49D4NGQW86EVFnxDZI8exNFdtNZPy2BEfTr3jPwgaHuUszg&_nc_zt=24&_nc_ht=scontent-lax7-1.xx&_nc_gid=lX6oqVUzvlLN-PpXG0xRKw&_nc_ss=7b289&oh=00_AQMnuGmHxRWI9iaGlfAKpp1E8mPx-MDm0wAYPNcTzdxhVg&oe=6ADB20E6",
  "profileName": "Humans of New York",
  "text": "Gabby's story can also be found in Dear New York; a collection of hundreds of portraits and written stories from the streets of NYC. The most beautiful and complete of the HONY books; it's currently only $15.99 on Amazon-- which is a full 65 percent off. You can get a copy here: https://bit.ly/dearnewyorkbook",
  "textSnippet": "Gabby's story can also be found in Dear New York;…",
  "commentUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02zn6NLm1v5AymLXXzsFVNTDszchv5sPZfN83zadEVpNam8vjCeQ85fBNpy9k8wZhVl?comment_id=2299934260765286",
  "likesCount": 1138,
  "likesCountText": "1.1K",
  "commentsCount": 12,
  "date": "2026-09-18T14:29:06Z",
  "threadingDepth": 0,
  "isReply": false,
  "replyToCommentId": null,
  "replyToName": null,
  "rootCommentId": null,
  "reactionLikeCount": 938,
  "reactionLoveCount": 172,
  "reactionCareCount": 27,
  "reactionHahaCount": 0,
  "reactionWowCount": 0,
  "reactionSadCount": 1,
  "reactionAngryCount": 0,
  "attachmentType": "Link",
  "attachmentUrl": "https://bit.ly/dearnewyorkbook",
  "attachmentImageUrls": null,
  "attachmentVideoUrl": null,
  "attachmentTitle": "Dear New York",
  "attachmentSource": "static.macmillan.com",
  "attachmentId": "1650981263259523",
  "textLinks": [
    "https://bit.ly/dearnewyorkbook"
  ],
  "sharedPostUrl": null,
  "sharedPostText": null,
  "mentions": null,
  "isAuthorVerified": true,
  "profileUrl": "https://www.facebook.com/humansofnewyork",
  "profileId": "100050429952420",
  "profileGender": "NEUTER",
  "postTitle": "“My first end-of-life patient was a 97-year-old ma…",
  "postDescription": "“My first end-of-life patient was a 97-year-old man. He had a much younger girlfriend; she was seventy-four. But they loved each other so much. Back when their spouses were still alive, the four of them had been great friends. They would double date together. And when their spouses passed away—the two of them became a thing. Every day she would come over for lunch. I’d always cook a little meal for them. I’d prepare the table; I’d lay out my little candles and my little flowers. As soon as she arrived I’d put on music and dim the lights, then I’d leave the room and go wait in the bedroom. They would cuddle and snuggle. And the beauty of it was—even though he couldn’t control his fluids at that point, she never minded the smell. Her love for him was so great that they would still kiss and all that good stuff. When the doctors said that it was time for him to go to hospice, he said he didn’t want to go. He told them that he wanted to come back home and die with me. I was with him in the end. My patients never die alone. Never, ever. One week after his passing I was hired by his girlfriend’s family. She had terminal Alzheimer’s, and I ended up staying with her for seven years. I fell in love with her. We were family, just family. She used to be a tap dancer. We’d sing together. And if she didn’t feel like singing, I’d sing. Even near the end, she always knew when something was wrong with me. When I wasn’t being the Gabby that she knew-- she would always know. When the doctors said it was time for her to go to hospice, her children said: ‘We want her to die with Gabby.’ In the final days she wouldn’t eat, she’d lock her jaw. But she would always eat for me. One night I could see the fright in her eyes, and I knew it was time. My patients never die alone. Never, ever. So I climbed under the covers with her. And she passed away in my arms.”\n\n--------------------\n\nFrom the Archives: 1/10/24\n\nI met Gabby randomly on the UWS a few years back, and when I first posted her story I got hundreds of messages asking if she was available to hire, but she was not at the time. But she just told me that's she's hit a rough patch and is looking for more hours; I'll share her email in the comments if anyone is in need of the world's best caretaker for their NYC loved one.",
  "postUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02zn6NLm1v5AymLXXzsFVNTDszchv5sPZfN83zadEVpNam8vjCeQ85fBNpy9k8wZhVl",
  "postId": "1650977309926585",
  "pageName": "Humans of New York",
  "pageId": "100050429952420",
  "pageAdLibraryId": "102099916530784",
  "isBusinessPageActive": false,
  "facebookId": "1650977309926585",
  "commentId": "2299934260765286",
  "id": "Y29tbWVudDoxNjUwOTc3MzA5OTI2NTg1XzIyOTk5MzQyNjA3NjUyODY=",
  "feedbackId": "ZmVlZGJhY2s6MTY1MDk3NzMwOTkyNjU4NV8yMjk5OTM0MjYwNzY1Mjg2",
  "timestamp": 1789741746,
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02zn6NLm1v5AymLXXzsFVNTDszchv5sPZfN83zadEVpNam8vjCeQ85fBNpy9k8wZhVl",
  "inputUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl",
  "scrapedAt": "2026-10-18T21:49:33Z",
  "author": {
    "__typename": "User",
    "id": "100050429952420",
    "name": "Humans of New York",
    "url": "https://www.facebook.com/humansofnewyork",
    "profile_picture_depth_0": {
      "uri": "https://scontent-lax7-1.xx.fbcdn.net/v/t39.30808-1/334611134_1536915246801761_214912837020673325_n.jpg?stp=c341.0.1365.1365a_cp0_dst-jpg_tt6&cstp=mx1365x1365&ctp=s64x64&_nc_cat=105&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=XB94OzzZmyEQ7kNvwHfl7W6&_nc_oc=Adr2sSOGAOnnYakYlAHM49D4NGQW86EVFnxDZI8exNFdtNZPy2BEfTr3jPwgaHuUszg&_nc_zt=24&_nc_ht=scontent-lax7-1.xx&_nc_gid=lX6oqVUzvlLN-PpXG0xRKw&_nc_ss=7b289&oh=00_AQMnuGmHxRWI9iaGlfAKpp1E8mPx-MDm0wAYPNcTzdxhVg&oe=6ADB20E6"
    },
    "gender": "NEUTER",
    "is_verified": true
  },
  "attachments": [
    {
      "__typename": "GenericAttachmentMedia",
      "fallback_image": {
        "height": 196,
        "uri": "https://external-lax7-1.xx.fbcdn.net/emg1/v/t13/12758556562378803777?url=https%3A%2F%2Fstatic.macmillan.com%2Fstatic%2Fsmp%2Fdear-new-york-9781250277589%2Fimg%2FDearNewYork-HC.jpg&fb_obo=1&utld=macmillan.com&_nc_sid=c97757&_nc_ht=external-lax7-1.xx.fbcdn.net&stp=c0.5000x0.5000f_dst-emg0_p196x196_q75_tt6&ccb=18-1&_nc_gid=lX6oqVUzvlLN-PpXG0xRKw&_nc_zt=3&oh=06_Q3_EAc1TPLrnWjpdGPGrv6dbahoE3i5yx_WJnxc0wniBjNdq&oe=6AD73099",
        "width": 196
      },
      "is_playable": false,
      "id": "1650981263259523"
    }
  ],
  "parentComment": null,
  "parentReply": null,
  "pageAdLibrary": {
    "id": "102099916530784",
    "is_business_page_active": false
  }
}
```

The Output tab has four views: 📊 Overview, 🧵 Replies & threads, ❤️ Reactions and 📎 Attachments & links. Export
to JSON, CSV, Excel or HTML, or read the dataset from the API.

#### How to scrape Facebook comments

1. Paste one or more links into **Facebook post, reel, video or photo links**.
2. Set **Comments per post** (empty = every comment Facebook shows), and switch **Include replies** on or off.
3. Pick the order, and optionally a date window.
4. Click **Start**. Comments arrive in the dataset as they are read.

#### Input

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl" }],
  "resultsLimit": 100,
  "includeNestedComments": true,
  "viewOption": "RANKED_UNFILTERED",
  "onlyCommentsNewerThan": "2026-01-01",
  "onlyCommentsOlderThan": "2026-06-30"
}
```

| Field | What it does |
|---|---|
| `startUrls` | Post links (`/posts/pfbid…`, `permalink.php?story_fbid=…`, `story.php`), reels (`/reel/…`), videos (`/videos/…`, `watch/?v=…`, `fb.watch/…`), photos (`photo/?fbid=…`), share links (`/share/p/…`, `/share/r/…`, `/share/v/…`) and public group posts. A reel, video or photo link is resolved to the post it belongs to; `inputUrl` keeps your link. |
| `resultsLimit` | Comments per link, replies included. Empty: all of them. |
| `includeNestedComments` | Replies and replies to replies, each its own row. |
| `viewOption` | `RANKED_UNFILTERED` (all comments), `RANKED_THREADED` (most relevant), `RECENT_ACTIVITY` (newest first). |
| `onlyCommentsNewerThan`, `onlyCommentsOlderThan` | `2026-01-31`, an ISO time, or relative (`7 days`, `3 months`). With "newer than" the comments are read newest first and reading stops at the first older one. |
| `proxyConfiguration`, `residentialFallback` | Datacenter proxy by default; a call Facebook refuses there is asked again on a residential IP. |

**Coming from another comments scraper?** Its input works as it is. apify/facebook-comments-scraper's keys are the
ones above. `postUrls`, `targetComments` (`-1` = all), `orderingMode` (`MOST_RELEVANT`, `NEWEST`, `ALL`),
`includeReplies` and `includeReactions` (reactions are always included) are read too, and so is `proxyUrls` (your own
proxies).

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

You pay per comment or reply in your dataset, nothing per run:

| Plan | Per 1,000 comments |
|---|---|
| Free | $0.29 |
| Starter | $0.24 |
| Scale | $0.21 |
| Business, Platinum, Diamond | $0.19 |

A comment is charged once per run, however many of your links list it. Date filters and replies cost nothing extra,
and comments outside your date window aren't charged. The run stops at your spending limit.

#### Good to know

- **Public comments only, logged out.** Facebook shows logged-out visitors most commenters' names and pictures but
  hides most profile links: `profileUrl` is then empty and `profileId` is an anonymous `pfbid…` id, as on every
  logged-out scraper.
- **Fewer comments than the post's counter?** The counter includes comments Facebook doesn't show publicly (deleted
  accounts, private or hidden comments). "Newest first" with replies on usually reaches the most.
- **Empty vs failed.** A post with no comments ends as `empty`; a link that is dead, private or shows a login page on
  every IP tried ends as `failed` with the reason. Both are listed per link in the run summary (OUTPUT); a run whose
  every link failed ends as FAILED. Nothing is charged for either.
- **Page links** (`facebook.com/nike`) are rejected: a page has no comment thread. Get the post links first with a
  Facebook posts scraper.
- **Restarts are safe.** If the platform restarts or migrates the run, comments already in the dataset are never
  pushed or charged again.

#### FAQ

**Do I need a Facebook account or cookies?** No. Everything is read the way a logged-out visitor sees it.

**Is the limit per link or per run?** Per link. Ten links at 100 each is up to 1,000 rows.

**Can I get replies to replies?** Yes: `threadingDepth` 2 rows, with `replyToCommentId` (the reply they answer) and
`rootCommentId` (the thread's first comment), and the same as apify's objects: `parentReply` and `parentComment`,
each with its author's id, name and gender.

**Where does the gender come from?** From Facebook itself: the comment's author as Facebook describes it to a
logged-out visitor (`MALE`, `FEMALE`, `NEUTER` for pages). It is empty when Facebook gives none; it is never guessed
from a name.

**Can I call it from code or an AI agent?** Yes, through the Apify API (the API tab has Python, JavaScript and CLI
examples) or Apify's MCP server.

# Actor input Schema

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

Public Facebook links: posts (<code>/posts/pfbid...</code>, <code>permalink.php?story_fbid=...</code>), reels (<code>/reel/...</code>), videos (<code>/videos/...</code>, <code>watch/?v=...</code>, <code>fb.watch/...</code>), photos (<code>photo/?fbid=...</code>), share links (<code>/share/p/...</code>, <code>/share/r/...</code>, <code>/share/v/...</code>) and public group posts. Page links are rejected: a page has no comment thread of its own.

## `resultsLimit` (type: `integer`):

Up to this many comments (replies included) from each link. Empty: every comment Facebook shows, like apify/facebook-comments-scraper.

## `includeNestedComments` (type: `boolean`):

Replies too, up to the 3 levels Facebook shows (comment, reply, reply to a reply), each as its own row with the comment it answers and its thread's first comment. Replies count toward 'Comments per post'.

## `viewOption` (type: `string`):

Facebook's own comment orders.

## `onlyCommentsNewerThan` (type: `string`):

Only comments written after this date: <code>2026-01-31</code>, an ISO time, or relative like <code>7 days</code>, <code>3 months</code>. Comments are then read newest first, and reading stops at the first older one.

## `onlyCommentsOlderThan` (type: `string`):

Only comments written before this date (same formats). With 'Comments newer than' this keeps a window.

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

Apify Proxy datacenter IPs by default.

## `residentialFallback` (type: `boolean`):

When Facebook refuses a datacenter IP, ask again on a residential one.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl"
    }
  ],
  "resultsLimit": 100,
  "includeNestedComments": true,
  "viewOption": "RANKED_UNFILTERED",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl"
        }
    ],
    "resultsLimit": 100,
    "includeNestedComments": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/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": [{ "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl" }],
    "resultsLimit": 100,
    "includeNestedComments": True,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/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": [
    {
      "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0318QNw3ZPiGiR8HrMaYaGontt6eGV9NrWVLZR4UiPpWnabgQa9BYYrz2KNGfx2fabl"
    }
  ],
  "resultsLimit": 100,
  "includeNestedComments": true
}' |
apify call deepmine/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

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