# Facebook Post Stats & Campaign Report (`getdataforu/facebook-post-stats`) Actor

Reactions, comments, shares and views for any list of public Facebook posts, reels and videos, with a reaction breakdown and a campaign report with cost per engagement. No login needed.

- **URL**: https://apify.com/getdataforu/facebook-post-stats.md
- **Developed by:** [EMT Crawler](https://apify.com/getdataforu) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 results

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 Post Stats & Campaign Report

Paste a list of public Facebook post, reel or video links. Get back **exact reactions, comments, shares and views** for every one, a breakdown by reaction type (Like, Love, Wow…), the page, caption and post date — plus a campaign report with cost per engagement you can send straight to a client.

No Facebook login, no cookies, no Graph API app.

### What it's for

- **Influencer & sponsored-post reporting** — paste every post from a campaign and get total reactions, comments, shares, views and cost per engagement in one run.
- **Proof of performance** — check what a creator's or a page's posts really did before you pay or renew.
- **Competitor tracking** — re-run on a rival brand's latest posts every week and see which formats win.
- **Content research** — compare posts vs reels vs videos, and which reactions people use.

### What you get for each post

| | |
|---|---|
| **Engagement** | Exact reactions, comments and shares (posts); exact reactions and comments (reels, videos) |
| **Reactions by type** | Like, Love, Care, Haha, Wow, Sad, Angry counts |
| **Views** | Exact public view count for reels and videos (the number shown on the video), plus Facebook's stricter `videoViews` count |
| **Post** | Page name, caption, post date, image, post ID, clean link |

Real rows from a test run:

| Page | Type | Reactions | Comments | Shares | Views |
|---|---|---|---|---|---|
| Netflix | video | 137,142 | 18,542 | — | 69,970,000 |
| National Geographic | post | 12,088 | 78 | 504 | — |
| Spotify | post | 8,632 | 1,248 | 250 | — |
| Nike | reel | 8,292 | 2,669 | — | 3,604,451 |
| Roc Nation | post | 4,262 | 195 | 538 | — |

### The campaign report

Every run writes a **`CAMPAIGN_REPORT`** to the key-value store: total reactions, comments, shares, engagements and views, average engagements per post, the top posts by engagement, a per-page breakdown, and — when you give a budget — **cost per post, cost per engagement and cost per 1,000 views (CPM)**. Links that failed are listed with the reason.

### Input

```json
{
  "postUrls": [
    "https://www.facebook.com/natgeo/posts/pfbid0ST4axVkhcZijdvvXXhNg1N26Lxo9naygKqXfy5FFRGS6pyaH2CqFcBM61yqUfnRxl",
    "https://www.facebook.com/reel/1902291290735944",
    "https://www.facebook.com/netflix/videos/2445344335530649"
  ],
  "campaignBudget": 5000,
  "currency": "USD"
}
```

| Field | Default | Notes |
|---|---|---|
| `postUrls` | — | **Required.** `/posts/` links, reels, videos, `/watch/?v=` links, `permalink.php` links, photos and `/share/` links. Duplicates are removed. |
| `campaignBudget` | — | Optional total spend. Adds cost per post, cost per engagement and CPM. |
| `currency` | `USD` | Label for the budget. |
| `maxConcurrency` | `5` | Posts fetched in parallel (up to 10). |

### Accurate, not rounded

Facebook shows most numbers rounded ("3.6M views · 8.2K reactions"). This actor reads the exact figures behind them: 3,604,451 views and 8,292 reactions on that Nike reel. It reads each post's **own** engagement block, so counts from comments or suggested videos on the same page never leak in. When Facebook occasionally serves a stale snapshot, the post is re-checked from a second IP automatically.

### Speed

Measured: **10 posts, reels and videos from 9 pages in about 5 seconds, every one returned, no retries.** The download stops as soon as the post's numbers have arrived instead of loading the whole page.

### You only pay for posts that load

Deleted, private and mistyped links are never written to the dataset, so they are never charged. They are listed with the reason in `CAMPAIGN_REPORT.failed`.

### Limitations

- **Public posts from Pages only.** Posts from personal profiles, private groups and anything that needs a login are reported as failed.
- **Shares are not available for reels and videos.** Facebook does not publish an exact share count for them to logged-out visitors.
- Comment text is not included. This actor counts engagement; it does not scrape comments.

### Legal

Reads only what Facebook shows any visitor without logging in. You are responsible for how you use the data.

# Actor input Schema

## `postUrls` (type: `array`):

Links to public posts on Facebook pages: /posts/ links, reels, videos, /watch/?v= links, permalink.php links, photos and /share/ links, one per line. Duplicates are removed automatically.

## `campaignBudget` (type: `integer`):

What you paid for these posts in total. When set, the report adds cost per post, cost per engagement and cost per 1,000 views (CPM).

## `currency` (type: `string`):

Currency of the budget. Only used as a label.

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

Each post is fetched through its own proxy IP.

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

Residential proxies are required: Facebook sends server IPs to a login wall instead of the post.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.facebook.com/natgeo/posts/pfbid0ST4axVkhcZijdvvXXhNg1N26Lxo9naygKqXfy5FFRGS6pyaH2CqFcBM61yqUfnRxl",
    "https://www.facebook.com/reel/1902291290735944",
    "https://www.facebook.com/netflix/videos/2445344335530649"
  ],
  "currency": "USD",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

Every post that loaded: reactions with a breakdown by type, comments, shares, views, caption, page, post date and image.

## `campaignReport` (type: `string`):

Totals, top posts, a per-page breakdown, cost per engagement and CPM when a budget is given, and links that failed.

# 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 = {
    "postUrls": [
        "https://www.facebook.com/natgeo/posts/pfbid0ST4axVkhcZijdvvXXhNg1N26Lxo9naygKqXfy5FFRGS6pyaH2CqFcBM61yqUfnRxl",
        "https://www.facebook.com/reel/1902291290735944"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforu/facebook-post-stats").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 = { "postUrls": [
        "https://www.facebook.com/natgeo/posts/pfbid0ST4axVkhcZijdvvXXhNg1N26Lxo9naygKqXfy5FFRGS6pyaH2CqFcBM61yqUfnRxl",
        "https://www.facebook.com/reel/1902291290735944",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("getdataforu/facebook-post-stats").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 '{
  "postUrls": [
    "https://www.facebook.com/natgeo/posts/pfbid0ST4axVkhcZijdvvXXhNg1N26Lxo9naygKqXfy5FFRGS6pyaH2CqFcBM61yqUfnRxl",
    "https://www.facebook.com/reel/1902291290735944"
  ]
}' |
apify call getdataforu/facebook-post-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,getdataforu/facebook-post-stats"
        }
    }
}
```

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/Ppo3zaz2nlbgRXckr/builds/TK7Ugkng7E57zcLUf/openapi.json
