# Facebook Posts with Comments for Sentiment Analysis

**Use case:** 

Get the latest posts from Facebook Pages together with the comments Facebook shows under each post: comment text, author and date in the post row. For sentiment analysis or AI summaries. This example reads 5 posts each from 3 brand Pages. No login. $0.99 per 1,000 posts, $0.50 per 1,000 comments.

## Input

```json
{
  "startUrls": [
    "https://www.facebook.com/nike",
    "https://www.facebook.com/cocacola",
    "https://www.facebook.com/starbucks"
  ],
  "maxPostsPerPage": 5,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "onlyNewPosts": false,
  "monitorName": "default",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "status": {
    "label": "Status"
  },
  "pageName": {
    "label": "Page"
  },
  "time": {
    "label": "Posted"
  },
  "text": {
    "label": "Text"
  },
  "reactions": {
    "label": "Reactions",
    "format": "number"
  },
  "comments": {
    "label": "Comments",
    "format": "number"
  },
  "shares": {
    "label": "Shares",
    "format": "number"
  },
  "url": {
    "label": "Post",
    "format": "link"
  },
  "isNew": {
    "label": "New (monitor)",
    "format": "boolean"
  },
  "reason": {
    "label": "Why not returned"
  },
  "input": {
    "label": "Input"
  }
}
```

## How it works

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

The Facebook Posts Scraper 💰 $0.99/1K · New-Post Alerts · No Login Actor is ready to run with the inputs already set for "Facebook Posts with Comments for Sentiment Analysis". [Sign up or log in](https://console.apify.com/create-task-from-example/kGzJsM3TdKKzBPblC) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Facebook Posts with Comments for Sentiment Analysis" task

The Facebook Posts Scraper 💰 $0.99/1K · New-Post Alerts · No Login Actor will start running based on the input automatically. You can also change all the input fields, like facebook pages, profiles or post urls, max posts per page, and more, to match your specific use case.

### 3. Receive the "Facebook Posts with Comments for Sentiment Analysis" 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 status, page, posted, 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 "Facebook Posts with Comments for Sentiment Analysis" task via API](https://apify.com/first-penguin/facebook-posts-scraper.md).

## FAQ

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

Facebook shows logged-out visitors only part of the comments, and its count includes replies. In our test of 970 posts we got 73% of what was possible, a median of 6 per post.

### Are replies included?

No. You get the top-level comments with their reply count.

### What do comments cost?

$0.50 per 1,000 comments, only when Include comments is on. Posts are $0.99 per 1,000.

## About this Actor

This example demonstrates how to use [Facebook Posts Scraper 💰 $0.99/1K · New-Post Alerts · No Login](https://apify.com/first-penguin/facebook-posts-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/first-penguin/facebook-posts-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/first-penguin/facebook-posts-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`).
