# Facebook Comments Scraper · No Login · $1/1k (`alfalfa/facebook-comments-scraper`) Actor

Scrape comments and replies from public Facebook posts: text, author, date, likes, reply threads with parent links. Same output fields as the official Facebook Comments Scraper. No login, no start fee, no filter surcharge, $1 per 1,000 comments.

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

## Pricing

$1.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Facebook Comments Scraper (No Login)

Scrape **comments and replies from public Facebook posts**: text, author, date, reactions, reply counts and the whole reply thread with parent links. No Facebook account, login or cookies needed. **Same output fields as the official Facebook Comments Scraper** at **$1 per 1,000 comments**, with **no start fee and no surcharge for date filters**; a thousand comments in about a minute.

Works with every public post URL Facebook uses: `/posts/`, `/photo/?fbid=`, `/permalink.php`, `/videos/`, `/reel/`, `/watch/?v=`. Group posts need a login and are not supported.

### What you can do with Facebook comment data

- **Sentiment and brand monitoring**: pull the comments under your own or a competitor's posts every day and track how people react to a launch, a campaign or a crisis.
- **Audience research**: find the questions, objections and requests customers write under product posts.
- **Lead generation**: people who comment "price?", "where can I buy this?" or "DM me" are warm leads; the comment text, name and profile ID come in one row.
- **Giveaway and contest picks**: export every comment under a contest post to CSV and pick winners or check entries.
- **Moderation and research**: collect discussions under news posts for content analysis, journalism or academic studies.
- **Thread reconstruction**: each reply carries `replyToCommentId`, `parentComment` and `parentReply`, so a full conversation tree can be rebuilt without guessing.

### What data do you get

| Field | Example |
|---|---|
| `text`, `date`, `likesCount`, `commentsCount` | comment text, `2021-08-15T19:56:39.000Z`, `"92"`, number of replies |
| `profileName`, `profileId`, `profileUrl`, `profilePicture`, `author` | who wrote it (profile URL when Facebook shows it publicly) |
| `commentId`, `id`, `feedbackId`, `commentUrl` | comment IDs and direct link |
| `threadingDepth`, `replyToCommentId`, `parentComment`, `parentReply` | `0` for comments, `1` and `2` for replies, plus the parent comment and parent reply |
| `attachments` | photos, GIFs and videos attached to the comment |
| `facebookUrl`, `facebookId`, `postTitle`, `postDescription`, `pageAdLibrary`, `inputUrl` | the post the comment belongs to |

### How to scrape Facebook comments

1. Paste one or more **post URLs** into *Facebook post URLs*.
2. Set *Max comments per post*, choose the *Comments mode* (**All**, **Newest** or **Most relevant**) and switch on *Include replies* if you want the threads.
3. Click **Start**. Comments stream into the dataset as they are found; export as JSON, CSV, Excel or XML, or read them through the API.

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array of `{ "url": ... }` | Post URLs (same format as the official Actor, plain strings work too). |
| `resultsLimit` | integer | Max top-level comments per post. Replies come on top of it. Empty = everything Facebook shows to a logged-out visitor. |
| `includeNestedComments` | boolean | Also return replies (up to two levels), each as its own record. |
| `viewOption` | `RANKED_UNFILTERED` / `RECENT_ACTIVITY` / `RANKED_THREADED` | All (default), Newest, Most relevant. |
| `onlyCommentsNewerThan` | string | `YYYY-MM-DD`, ISO date-time, or relative (`1 day`, `2 weeks`, `3 months`). With **Newest** the run stops early; otherwise older comments are skipped for free. |
| `maxConcurrency` | integer | Posts scraped in parallel (default 5). |
| `proxyConfiguration` | object | Residential proxies by default, included in the price. Optionally pick a country or use your own proxy servers. |

Example:

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl" }],
  "resultsLimit": 200,
  "includeNestedComments": true,
  "viewOption": "RECENT_ACTIVITY",
  "onlyCommentsNewerThan": "30 days"
}
```

### Output

One record per comment. A top-level comment:

```json
{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02EuurTwosHG9NqVFYaREi7CsT2ZwXQQwosy324tBEndNMzzPzj3g1topHMAbRCUz4l",
  "commentUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02EuurTwosHG9NqVFYaREi7CsT2ZwXQQwosy324tBEndNMzzPzj3g1topHMAbRCUz4l?comment_id=3000854580150022",
  "commentId": "3000854580150022",
  "id": "Y29tbWVudDo2Mzc1MjE5MzQyNTUyMTEyXzMwMDA4NTQ1ODAxNTAwMjI=",
  "feedbackId": "ZmVlZGJhY2s6NjM3NTIxOTM0MjU1MjExMl8zMDAwODU0NTgwMTUwMDIy",
  "date": "2021-08-15T19:58:31.000Z",
  "text": "I'm struck by the goal you \"announced\" to the principal the first time you walked into the school.  You've modeled resilience and lifelong learning, and admitting that it was ok to not know everything to these kids, as well as healthy risk taking.  \n\nAnd I can't wait to hear the conclusion on Neveah and her mom and the amazing things they've accomplished! ",
  "attachments": [],
  "author": {
    "id": "pfbid0LiAr9wu1KXhDrSfp77CyuFXFVuwgNCsFn7SuEqqnTXbweeB3149645PZmThD9KGCl",
    "name": "Aimee J Bednar",
    "url": null,
    "__typename": "User",
    "gender": "FEMALE"
  },
  "profileUrl": null,
  "profileId": "pfbid0LiAr9wu1KXhDrSfp77CyuFXFVuwgNCsFn7SuEqqnTXbweeB3149645PZmThD9KGCl",
  "profileName": "Aimee J Bednar",
  "name": "Aimee J Bednar",
  "profilePicture": "https://scontent.fvlc4-1.fna.fbcdn.net/v/t39.30808-1/7382177...",
  "likesCount": "60",
  "commentsCount": 1,
  "threadingDepth": 0,
  "replyToCommentId": null,
  "parentComment": null,
  "parentReply": null,
  "facebookId": "6375219342552112",
  "postTitle": "(2/3) “I knew nothing about gardening. But I knew how to google, so I looked up some easy stuff to plant. Turns out it’s...",
  "postDescription": "(2/3) “I knew nothing about gardening. But I knew how to google, so I looked up some easy stuff to plant. Turns out it’s...",
  "pageAdLibrary": {
    "is_business_page_active": false,
    "id": "102099916530784"
  },
  "inputUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
}
```

A reply (with *Include replies* on):

```json
{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02EuurTwosHG9NqVFYaREi7CsT2ZwXQQwosy324tBEndNMzzPzj3g1topHMAbRCUz4l",
  "commentUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid02EuurTwosHG9NqVFYaREi7CsT2ZwXQQwosy324tBEndNMzzPzj3g1topHMAbRCUz4l?comment_id=560487351810151",
  "commentId": "560487351810151",
  "id": "Y29tbWVudDo2Mzc1MjE5MzQyNTUyMTEyXzU2MDQ4NzM1MTgxMDE1MQ==",
  "feedbackId": "ZmVlZGJhY2s6NjM3NTIxOTM0MjU1MjExMl81NjA0ODczNTE4MTAxNTE=",
  "date": "2021-08-16T13:39:20.000Z",
  "text": "Aimee J Bednar Yes. The curiosity & humility that are part of this story are SO important, especially when they’re modeled for kids. ",
  "attachments": [],
  "author": {
    "id": "pfbid0sfoZfStXQvqUocL9kuQJiz74oZkMonCXQreMDLPneWDkx2FuhhSiF3gR1fJn8bUtl",
    "name": "Gabrielle Halko",
    "url": null,
    "__typename": "User",
    "gender": "FEMALE"
  },
  "profileUrl": null,
  "profileId": "pfbid0sfoZfStXQvqUocL9kuQJiz74oZkMonCXQreMDLPneWDkx2FuhhSiF3gR1fJn8bUtl",
  "profileName": "Gabrielle Halko",
  "name": "Gabrielle Halko",
  "profilePicture": "https://scontent.fnce2-1.fna.fbcdn.net/v/t39.30808-1/6546181...",
  "likesCount": "1",
  "commentsCount": 0,
  "threadingDepth": 1,
  "replyToCommentId": "3000854580150022",
  "parentComment": {
    "commentId": "3000854580150022",
    "id": "Y29tbWVudDo2Mzc1MjE5MzQyNTUyMTEyXzMwMDA4NTQ1ODAxNTAwMjI=",
    "profileId": "pfbid0LiAr9wu1KXhDrSfp77CyuFXFVuwgNCsFn7SuEqqnTXbweeB3149645PZmThD9KGCl",
    "profileName": "Aimee J Bednar",
    "date": "2021-08-15T19:58:31.000Z",
    "text": "I'm struck by the goal you \"announced\" to the principal the first time you walked into the school.  You've modeled resilience and lifelong learning, and admitting that it was ok to not know everything to these kids, as well as healthy risk taking.  \n\nAnd I can't wait to hear the conclusion on Neveah and her mom and the amazing things they've accomplished! "
  },
  "parentReply": null,
  "facebookId": "6375219342552112",
  "postTitle": "(2/3) “I knew nothing about gardening. But I knew how to google, so I looked up some easy stuff to plant. Turns out it’s...",
  "postDescription": "(2/3) “I knew nothing about gardening. But I knew how to google, so I looked up some easy stuff to plant. Turns out it’s...",
  "pageAdLibrary": {
    "is_business_page_active": false,
    "id": "102099916530784"
  },
  "inputUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
}
```

### Pricing

**$1 per 1,000 comments** ($0.001 per comment or reply), **no start fee**, no surcharge for date filters, platform usage and residential proxies included. You pay only for records written to the dataset. Set the maximum budget per run in the Actor settings; the scraper stops when it is reached and never overshoots the number you typed.

| Monthly spend | Comments |
|---|---|
| $5, which is what the free plan includes | about 5,000 |
| $49 | about 49,000 |
| $499 | about 499,000 |

For comparison, the official Facebook Comments Scraper charges $2.50 per 1,000 comments on the free plan, less on higher plans, plus $1 per run and an extra fee per comment when a date filter is used.

### Switching from the official Facebook Comments Scraper

1. Replace the Actor ID in your integration and keep your input (`startUrls`, `resultsLimit`, `includeNestedComments`, `viewOption`, `onlyCommentsNewerThan`).
2. Output field names are the same: every field of the official dataset schema is present with the same type. Replies are separate records with `threadingDepth`, `replyToCommentId`, `parentComment` and `parentReply`, as with the official *Include comment replies* option.
3. `resultsLimit` counts top-level comments per post; replies come on top, as in the official Actor.

### Limitations

- Only comments Facebook shows to a logged-out visitor are returned. Facebook hides some comments ("filtered" replies, comments from restricted profiles), so the count can be lower than the number shown on the post itself.
- `profileUrl` is `null` when Facebook does not publish the commenter's profile link to logged-out visitors; `profileId` is always there.
- Group posts, private profiles and posts limited to friends are not supported.
- This Actor is not affiliated with, endorsed by or connected to Meta Platforms, Inc. or Facebook.

### FAQ

#### Can I scrape Facebook comments without logging in?

Yes. The scraper reads what any visitor without an account can see. No cookies, no session, no risk to your own account.

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

The number on the post counts every comment ever written, including ones Facebook hides from logged-out visitors, replies that were filtered as low quality, and comments from restricted profiles. Choose **All** mode to get the most.

#### Why do I get more records than my limit?

`resultsLimit` applies to top-level comments per post. With *Include replies* on, replies are added on top, each as its own record, the same way the official Actor counts.

#### Can I get only new comments every day?

Set `onlyCommentsNewerThan` to `1 day`, choose **Newest** mode and schedule the run daily. The run stops as soon as older comments appear, so you pay only for the new ones. No filter surcharge.

#### How fast is it?

About 10 comments per second per post, posts run in parallel. A thousand comments take around a minute.

#### Is scraping Facebook comments legal?

The Actor collects publicly available data only. Comments contain personal data (names, profile IDs), so you are responsible for using them in line with GDPR, CCPA and other laws that apply to you. Scrape only what you have a legitimate reason to process.

### More Facebook scrapers by Alfalfa

| Actor | What it does | Price |
|---|---|---|
| [Facebook Posts Scraper](https://apify.com/alfalfa/facebook-posts-scraper) | posts of any public page or profile with reactions, comment counts, media, optional video transcripts | $2 per 1,000 posts |
| [Facebook Pages Scraper](https://apify.com/alfalfa/facebook-pages-scraper) | page details with email, phone, address, followers, rating, About text | from $3.50 per 1,000 pages |
| [Facebook Events Scraper](https://apify.com/alfalfa/facebook-events-scraper) | events by search, city, page or URL, with organizer email | $5 per 1,000 events |

Same field names as the official Actors, no login, no start fees, one flat price each.

### Not working?

Open an issue in the **Issues** tab of this Actor with the post URL and the run ID. Facebook changes its pages often; fixes usually ship within a day.

# Actor input Schema

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

Public post URLs in any form Facebook uses: <code>https://www.facebook.com/humansofnewyork/posts/pfbid0...</code>, <code>.../photo/?fbid=...</code>, <code>.../permalink.php?story\_fbid=...\&id=...</code>, <code>.../NASA/videos/123</code>, <code>.../reel/123</code>. One URL = one post. Group posts need a login and are skipped.

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

Maximum number of top-level comments per post. Replies (with <b>Include replies</b> on) come on top of this number, like in the official scraper. Leave empty for all comments Facebook shows to a logged-out visitor.

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

Also return the replies under each comment (and replies to replies), each as its own record with <code>threadingDepth</code>, <code>replyToCommentId</code>, <code>parentComment</code> and <code>parentReply</code>, so the thread can be rebuilt. Costs one extra lookup per comment that has replies.

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

How Facebook orders and filters the comments: <b>All</b> (every public comment, oldest first), <b>Newest</b> (most recent first, best with the date filter), <b>Most relevant</b> (Facebook's ranked and filtered view, the one shown by default on the post).

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

Keep only comments posted after this date. Absolute <code>YYYY-MM-DD</code> (or full ISO date-time, UTC) or relative like <code>1 day</code>, <code>2 weeks</code>, <code>3 months</code>. With <b>Newest</b> mode the run stops as soon as older comments appear; in other modes older comments are skipped for free. No surcharge for filtering.

## `maxConcurrency` (type: `integer`):

How many posts are scraped in parallel (default 5). Comments of one post are always read in order.

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

Residential proxies are included in the price per comment. Leave the default unless you want to route the traffic through your own proxy servers.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
    }
  ],
  "resultsLimit": 50,
  "includeNestedComments": false,
  "viewOption": "RANKED_UNFILTERED",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped comments as JSON (same fields as the official Facebook Comments Scraper). Append ?format=csv for CSV.

# 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/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
        }
    ],
    "resultsLimit": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alfalfa/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/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl" }],
    "resultsLimit": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("alfalfa/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/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
    }
  ],
  "resultsLimit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call alfalfa/facebook-comments-scraper --silent --output-dataset

```

## MCP server setup

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