# Facebook Comment Intent & Sentiment Classifier (`alpha-scraper/facebook-comment-intent-sentiment-classifier`) Actor

\[ 1k/1.49$ ] Facebook Comment Intent & Sentiment Classifier labels public Facebook post, reel and video comments with sentiment score, intent (question, purchase, complaint), language and emoji stats, plus optional per-post summaries. Rule-based, no login and no external API.

- **URL**: https://apify.com/alpha-scraper/facebook-comment-intent-sentiment-classifier.md
- **Developed by:** [Alpha Scraper](https://apify.com/alpha-scraper) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 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 Comment Intent & Sentiment Classifier

**Facebook Comment Intent & Sentiment Classifier** reads the public comments of Facebook posts, reels and videos and labels every comment with a sentiment and an intent. Give Facebook Comment Intent & Sentiment Classifier a post link, and it returns each comment with a sentiment label and score, an intent such as question or purchase-intent, a language and emoji statistics, plus optional summary records.

Facebook Comment Intent & Sentiment Classifier works with publicly visible Facebook content only, so you need no Facebook account, cookies or API key. The labels come from a transparent rule- and lexicon-based classifier, so there is no external API and no ML model to configure.

> **📌 At a glance**
>
> - **Input:** Facebook post, reel and video URLs
> - **Output:** one record per comment, with sentiment, intent, language and emoji fields
> - **Summaries:** one summary per post and an overall summary when you scan several URLs
> - **Options:** comment order, replies on or off, replies per comment and a per-URL limit

Social teams use Facebook Comment Intent & Sentiment Classifier to find questions that need an answer, spot purchase leads, flag complaints and measure how a Facebook audience feels about a Facebook post.

### 🔹 Facebook Comment Intent & Sentiment Classifier – Key Features

Facebook Comment Intent & Sentiment Classifier turns a raw Facebook comment list into labelled data.

- **Sentiment label and score:** Facebook Comment Intent & Sentiment Classifier marks each Facebook comment as `positive`, `neutral` or `negative`, with a score between -1 and 1.
- **Eight intents:** Facebook Comment Intent & Sentiment Classifier assigns question, purchase-intent, complaint, praise, support-request, spam/promo, giveaway-entry or other to every Facebook comment.
- **Confidence and signals:** every label comes with a confidence value and the rule that fired, so results are explainable.
- **Language detection:** the language code of each Facebook comment and where the guess came from.
- **Emoji statistics:** emoji count, the list of emojis, an emoji-only flag and an emoji polarity.
- **Optional replies:** classify Facebook replies as well, as their own records.
- **Summary records:** Facebook Comment Intent & Sentiment Classifier adds distributions, top terms, questions to answer, purchase leads and spam share for each Facebook post.
- **Multilingual rules:** the word lists and intent rules cover several languages, not only English.

> **✅ Why use this Actor**
>
> Facebook Comment Intent & Sentiment Classifier saves the manual reading of long Facebook threads. Facebook Comment Intent & Sentiment Classifier scores each comment the same way, so results are consistent and easy to filter in a spreadsheet.

### 🔍 What Data Does Facebook Comment Intent & Sentiment Classifier Extract?

Each record from Facebook Comment Intent & Sentiment Classifier combines the collected Facebook comment with the labels added by the classifier.

| Group | Fields | What you get |
|---|---|---|
| Comment | `id`, `text`, `createdTime`, `url`, `parentId`, `depth` | The Facebook comment and its place in the thread |
| Author | `authorName`, `authorUrl`, `authorType`, `authorIsVerified`, `isByPostOwner` | Who wrote it |
| Engagement | `reactionCount`, `reactionBreakdown`, `replyCount` | Public reactions and replies |
| Sentiment | `sentiment`, `sentimentScore`, `positiveTerms`, `negativeTerms` | Label, score and matched words |
| Intent | `intent`, `intents`, `intentConfidence`, `signals` | Main intent, all matches, confidence and reasons |
| Language and emoji | `language`, `languageSource`, `emojiCount`, `emojis`, `emojiOnly`, `emojiPolarity` | Language guess and emoji statistics |
| Post context | `postUrl`, `postId`, `scrapedAt`, `number`, `type` | Source post, time and record type |

In Facebook Comment Intent & Sentiment Classifier output, the `type` field is `comment`, `reply` or `summary`, so you can filter record types in one dataset.

### 🚀 How to Use Facebook Comment Intent & Sentiment Classifier

Running Facebook Comment Intent & Sentiment Classifier takes a few steps in Apify Console.

- **Step 1 – Open the Actor:** start Facebook Comment Intent & Sentiment Classifier from the Apify Store and open the Input tab.
- **Step 2 – Add Facebook links:** paste post, reel or video URLs into *Post URLs*.
- **Step 3 – Choose the order:** keep *All comments* for analysis, or pick *Most relevant* or *Newest* in Facebook Comment Intent & Sentiment Classifier.
- **Step 4 – Set limits:** use *Max items* for comments per URL, and tick *Include replies* if you want replies labelled too.
- **Step 5 – Keep the summary:** leave *Include summary* on to get totals and distributions first.
- **Step 6 – Run and export:** start the run, then download the labelled comments as JSON, CSV or Excel.

> **💡 Tip:** the input is prefilled with a sample post link. Replace it with your own URLs before you run Facebook Comment Intent & Sentiment Classifier.

### 📥 Facebook Comment Intent & Sentiment Classifier Input

Facebook Comment Intent & Sentiment Classifier has six input fields. All are optional, but `startUrls` needs at least one URL.

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Facebook post, reel or video URLs whose public comments are collected and classified. Minimum one URL. |
| `commentOrder` | string | Comment ordering requested from Facebook. Values: `all` (All comments, unfiltered), `relevant` (Most relevant), `newest` (Newest). Default `all`. |
| `includeReplies` | boolean | Also collect and classify the replies of each comment. Reply records have type `reply`. Default `false`. |
| `includeSummary` | boolean | Add summary records of type `summary` before the comment records. Default `true`. |
| `maxReplies` | integer | Maximum replies per comment. Used only when `includeReplies` is on. Minimum 1, default 5. |
| `maxItems` | integer | Maximum top-level comments per URL. Replies are extra. Minimum 1, default 30. |

Every URL in `startUrls` gets its own `maxItems` limit. Facebook Comment Intent & Sentiment Classifier adds an overall summary when you provide more than one URL.

Here is a sample input for Facebook Comment Intent & Sentiment Classifier that classifies 100 Facebook comments and their replies for one post:

```json
{
  "startUrls": ["https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId"],
  "commentOrder": "all",
  "includeReplies": true,
  "includeSummary": true,
  "maxReplies": 3,
  "maxItems": 100
}
```

### 📤 Facebook Comment Intent & Sentiment Classifier Output

Facebook Comment Intent & Sentiment Classifier writes summary records first, then one record per comment or reply. A comment record looks like this.

```json
{
  "number": 1,
  "type": "comment",
  "id": "1000000000000101",
  "parentId": null,
  "depth": 0,
  "text": "Love this! Where can I buy the blue one? 😍",
  "createdTime": "2026-10-28T14:30:00.000Z",
  "url": "https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId?comment_id=1000000000000101",
  "authorId": "100000000000002",
  "authorName": "Jane Doe",
  "authorUrl": "https://www.facebook.com/jane.doe.example",
  "authorType": "User",
  "authorIsVerified": false,
  "isByPostOwner": false,
  "reactionCount": 12,
  "reactionBreakdown": { "Like": 10, "Love": 2 },
  "replyCount": 1,
  "mentions": [],
  "hashtags": [],
  "attachments": [],
  "languageHint": "en_XX",
  "sentiment": "positive",
  "sentimentScore": 0.82,
  "intent": "purchase-intent",
  "intents": ["purchase-intent", "praise", "question"],
  "intentConfidence": 0.86,
  "language": "en",
  "languageSource": "stopwords",
  "emojiCount": 1,
  "emojis": ["😍"],
  "emojiOnly": false,
  "emojiPolarity": 1,
  "signals": ["purchase-intent:where to buy", "praise:praise words", "question:question mark"],
  "positiveTerms": ["love"],
  "negativeTerms": null,
  "hasAttachment": false,
  "postUrl": "https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId",
  "postId": "1234567890123456",
  "scrapedAt": "2026-11-06T15:16:09.000Z"
}
```

The Facebook Comment Intent & Sentiment Classifier record above is shortened: it also carries the Facebook ids `commentNodeId` and `feedbackId`, plus `createdTimestamp` and `authorAvatar`. The summary record has this shape.

```json
{
  "type": "summary",
  "scope": "post",
  "postUrl": "https://www.facebook.com/samplepage/posts/pfbid0ExampleSamplePostId",
  "postTotalComments": 318,
  "commentsAnalyzed": 100,
  "sentiment": { "positive": { "count": 46, "percent": 46 }, "neutral": { "count": 41, "percent": 41 }, "negative": { "count": 13, "percent": 13 } },
  "meanSentimentScore": 0.21,
  "netSentiment": 0.33,
  "intents": { "question": { "count": 14, "percent": 14 }, "purchase-intent": { "count": 6, "percent": 6 }, "complaint": { "count": 9, "percent": 9 } },
  "languages": { "en": 92, "es": 8 },
  "emoji": { "commentsWithEmoji": 31, "totalEmojis": 58, "emojiOnlyComments": 4, "top": [{ "emoji": "😍", "count": 12 }] },
  "topPositiveTerms": [{ "term": "love", "count": 11 }],
  "topNegativeTerms": [{ "term": "broken", "count": 3 }],
  "needsReply": { "count": 14, "commentIds": ["1000000000000101"] },
  "purchaseLeads": { "count": 6, "commentIds": ["1000000000000101"] },
  "spamShare": 2,
  "mostPositive": [{ "id": "1000000000000101", "author": "Jane Doe", "text": "Love this!", "score": 0.82, "url": "https://example.com/comment", "intent": "praise" }],
  "mostNegative": [],
  "scrapedAt": "2026-11-06T15:16:09.000Z"
}
```

The summary lists are shortened here. The `intents` object always lists all eight intents, and `emoji.top` and the term lists hold up to 10 entries.

#### 🧾 Output field guide

- `sentiment` is `positive` at a score of 0.15 or higher and `negative` at -0.15 or lower, otherwise `neutral`.
- `intent` is the strongest label, and `intents` lists every label that matched, strongest first.
- `intentConfidence` runs from 0.3 for `other` to 0.95, and `signals` names the rules behind the labels.
- `language` holds a language code, and `languageSource` shows how it was found.
- `emojiPolarity` is the average mood of the known emojis, or `null` when there are none.
- `needsReply` in a summary counts questions and support requests, and `purchaseLeads` counts purchase-intent comments.
- `scope` is `post` for a per-post summary and `overall` for the combined one.

### 🧠 How to Classify Facebook Comments by Intent and Sentiment

To classify Facebook comments, add the post link to `startUrls`, keep `commentOrder` on `all` and set `maxItems`. Facebook Comment Intent & Sentiment Classifier collects the comments, scores the wording against word lists, and applies intent rules such as price asks, question marks and complaint phrases.

Comments with no text, such as a sticker or photo, are labelled `neutral` with the intent `other`. Tagging friends in a very short comment counts as a `giveaway-entry` signal, and tagging the post owner does not.

### 🎯 Facebook Comment Intent & Sentiment Classifier Use Cases

Facebook Comment Intent & Sentiment Classifier fits many workflows built on Facebook conversations.

- **Customer support:** use `needsReply` from Facebook Comment Intent & Sentiment Classifier to find questions and help requests on your Facebook Page posts.
- **Sales leads:** list purchase-intent comments on a Facebook product post with `purchaseLeads`.
- **Brand monitoring:** track the share of positive and negative comments across Facebook posts with Facebook Comment Intent & Sentiment Classifier.
- **Campaign review:** compare the sentiment and intent mix of several Facebook posts in one run.
- **Spam cleanup:** measure `spamShare` and find promo links and repeated phrases in a Facebook comment section.
- **Giveaway analysis:** spot entries and tag comments under a Facebook contest post.
- **Market research:** read the top terms people use when they praise or criticise a Facebook post.

### 💰 Pricing

Facebook Comment Intent & Sentiment Classifier 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 30 and leave `includeReplies` off. Check the labels, then raise the limits once the Facebook data looks right.

### 💡 Tips and Best Practices

- **Start small:** a short run of Facebook Comment Intent & Sentiment Classifier confirms the Facebook link works and shows how the labels read before a large run.
- **Know the cap:** Facebook limits the comment list shown to a logged-out visitor, so very large threads stop at several hundred comments.
- **Treat labels as a guide:** Facebook Comment Intent & Sentiment Classifier uses word lists and rules, so sarcasm and slang can be misread. Review the `signals` field when a label looks odd.
- **Check short comments:** one-word comments often fall into `other` with a low `intentConfidence`.
- **Filter by type:** keep `type` equal to `comment` for top-level analysis, or include `reply` rows for the full thread.
- **Use the summary:** `commentsAnalyzed` next to `postTotalComments` shows how much of the thread you covered.
- **Check nulls:** a `null` field means no value was available 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 Comment Intent & Sentiment Classifier?

Facebook Comment Intent & Sentiment Classifier is an Apify Actor that collects public Facebook comments and labels each one with a sentiment, an intent, a language and emoji statistics.

#### 🧭 How do I analyse the sentiment of Facebook comments?

Open Facebook Comment Intent & Sentiment Classifier, paste a post link into *Post URLs*, set *Max items* and run it. Each comment gets a `sentiment` label and a `sentimentScore`.

#### 🏷️ What intents can Facebook Comment Intent & Sentiment Classifier detect?

Facebook Comment Intent & Sentiment Classifier detects question, purchase-intent, complaint, praise, support-request, spam/promo and giveaway-entry in Facebook comments. Comments that match none of them are labelled `other`.

#### 🤖 Does it use an AI model or an external API?

No. Facebook Comment Intent & Sentiment Classifier uses transparent rules and word lists, so there is nothing to configure and every label can be traced through `signals`.

#### 🌍 Can I classify comments in other languages?

Yes. Facebook Comment Intent & Sentiment Classifier detects the language of each comment, and its word lists and rules cover several languages. Languages outside that coverage may be scored as `neutral` more often.

#### 🛒 Can I find purchase leads in Facebook comments?

Yes. Comments such as price asks and where-to-buy questions get the `purchase-intent` label, and the summary lists their ids under `purchaseLeads`.

#### 💬 Can I classify replies too?

Yes. Switch on *Include replies* and set *Max replies* in Facebook Comment Intent & Sentiment Classifier. Facebook replies come back as separate records with `type` set to `reply`.

#### 🔐 Does it need a Facebook login?

No. Facebook Comment Intent & Sentiment Classifier reads publicly visible content, so no account, cookies or API key are required.

#### 📊 Can I export the results to CSV or Excel?

Yes. The dataset of Facebook Comment Intent & Sentiment Classifier can be downloaded as JSON, CSV, Excel, XML or HTML, or read through the Apify API.

#### 🚫 Can I use it on private Facebook posts?

No. Facebook Comment Intent & Sentiment Classifier only returns public content that a visitor can see without logging in.

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

Facebook Comment Intent & Sentiment Classifier 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 intents 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`):

Facebook post, reel or video URLs whose public comments are collected and classified. At least one URL is required.

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

Which comment ordering is requested from Facebook. 'All comments' is unfiltered and best for analysis; 'Most relevant' is Facebook's ranked view; 'Newest' lists the latest comments first.

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

Also fetch and classify the replies of each comment. Reply records have type 'reply'; limit them with 'Max replies'.

## `includeSummary` (type: `boolean`):

Add aggregate summary records (type 'summary') before the comment records: one per post, plus an overall one when several URLs are given. They hold sentiment, intent and language distributions, top emojis and terms, questions that need a reply, purchase leads and spam share.

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

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

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

Maximum number of top-level comments per post URL (replies are extra and limited by 'Max replies').

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/nike/posts/pfbid025BsfM3Da4Cio6WdAf2BNrz6JtNAEXoDib8xqRCeqoESMogAthPdEL42S7Rs1wGrDl"
  ],
  "commentOrder": "all",
  "includeReplies": false,
  "includeSummary": true,
  "maxReplies": 5,
  "maxItems": 15
}
```

# Actor output Schema

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

Structured records extracted by Facebook Comment Intent & Sentiment Classifier 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/nike/posts/pfbid025BsfM3Da4Cio6WdAf2BNrz6JtNAEXoDib8xqRCeqoESMogAthPdEL42S7Rs1wGrDl"
    ],
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("alpha-scraper/facebook-comment-intent-sentiment-classifier").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/nike/posts/pfbid025BsfM3Da4Cio6WdAf2BNrz6JtNAEXoDib8xqRCeqoESMogAthPdEL42S7Rs1wGrDl"],
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("alpha-scraper/facebook-comment-intent-sentiment-classifier").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/nike/posts/pfbid025BsfM3Da4Cio6WdAf2BNrz6JtNAEXoDib8xqRCeqoESMogAthPdEL42S7Rs1wGrDl"
  ],
  "maxItems": 15
}' |
apify call alpha-scraper/facebook-comment-intent-sentiment-classifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alpha-scraper/facebook-comment-intent-sentiment-classifier"
        }
    }
}
```

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/EVI9RvLgIVq0JZHCe/builds/VzBHjhAn5k2w2ILlW/openapi.json
