# Scrape the Top Comments on a Facebook Post

**Use case:** 

Collect the top-ranked comments on any public Facebook post with author, comment text, date and like count. Useful for sentiment checks and audience research. Replace the example post link with your own.

## Input

```json
{
  "postUrls": [
    "https://www.facebook.com/zuck/posts/10117964356277811:1542144927680617"
  ],
  "minComments": 0,
  "maxCommentsPerPost": 50,
  "sortOrder": "RANKED",
  "includeReplies": false,
  "extractUrls": true,
  "enableDedup": false,
  "refreshWindowDays": 0,
  "maxConcurrency": 3,
  "maxLoginWallRetries": 3,
  "failOnEmpty": false,
  "debugMode": false,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "authorName": {
    "label": "Author Name",
    "format": "string"
  },
  "text": {
    "label": "Comment Text",
    "format": "string"
  },
  "timestamp": {
    "label": "Timestamp",
    "format": "string"
  },
  "reactionCount": {
    "label": "Reaction Count",
    "format": "integer"
  },
  "replyCount": {
    "label": "Reply Count",
    "format": "integer"
  },
  "authorGender": {
    "label": "Gender",
    "format": "string"
  },
  "authorType": {
    "label": "Author Type",
    "format": "string"
  },
  "spamDisplayMode": {
    "label": "Spam Status",
    "format": "string"
  },
  "postUrl": {
    "label": "Post URL",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Facebook Comment Scraper — Public Comments & Replies Actor is ready to run with the inputs already set for "Scrape the Top Comments on a Facebook Post". [Sign up or log in](https://console.apify.com/create-task-from-example/gYvLUmSEftw2KvBIo) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Scrape the Top Comments on a Facebook Post" task

The Facebook Comment Scraper — Public Comments & Replies Actor will start running based on the input automatically. You can also change all the input fields, like 🔗 post urls, minimum comments filter, and more, to match your specific use case.

### 3. Receive the "Scrape the Top Comments on a Facebook Post" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as author name, comment text, timestamp, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Scrape the Top Comments on a Facebook Post" task via API](https://apify.com/crowdpull/facebook-comment-scraper.md).

## FAQ

### What data does the post top comments task return?

The post top comments task returns one row per Facebook comment: author, comment text, date, like count, reply count and the comment link.

### How do I adapt the post top comments task to my own search?

Save the post top comments task to your account, then edit its input. Replace Post URLs with any public Facebook post links. Max comments per post and sort order control what is collected.

### Can the post top comments task run automatically?

The post top comments task can run on an Apify schedule and send results to Google Sheets, Slack, Zapier, Make, n8n or a webhook.

### Do I need an account or login for the site to run the post top comments task?

The post top comments task needs only an Apify account. It reads publicly visible pages, so you never enter a login or cookies for the site being scraped.

## About this Actor

This example demonstrates how to use [Facebook Comment Scraper — Public Comments & Replies](https://apify.com/crowdpull/facebook-comment-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/crowdpull/facebook-comment-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/crowdpull/facebook-comment-scraper.md

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`).
