# Facebook Likes Scraper (`lordfloofington/facebook-likes-scraper`) Actor

Scrape the people who reacted to public Facebook posts and reels: name, profile, reaction type and exact totals by type. Available to invited customers.

- **URL**: https://apify.com/lordfloofington/facebook-likes-scraper.md
- **Developed by:** [Seb](https://apify.com/lordfloofington) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 99.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 reactors

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 Likes Scraper

Get one row per person who reacted to a public Facebook post, photo, video or reel, with their reactor ID, name, profile URL and picture, reaction type, and the post's exact reaction totals by type. Each returned person costs $0.0006 ($0.60 per 1,000); a $0.00005 start fee applies per run.

Anyone can collect the reactors Facebook shows to logged-out visitors: up to about 70 people per post, plus the post's exact totals by type. Full reactor lists are available to invited customers with their access key.

### What it returns

Each dataset item is one reactor. `reactorId` is the Facebook ID; when Facebook does not show a profile URL, it may be anonymized. `reactionType` is null for preview-only reactors.

| Name | Type | Meaning |
| --- | --- | --- |
| `facebookUrl` | string | Resolved Facebook post URL. |
| `inputUrl` | string | URL supplied in `startUrls`. |
| `postId` | string | Facebook post ID. |
| `postUrl` | string | Resolved post URL. |
| `reactorId` | string | Facebook ID for the person or Page who reacted. |
| `reactorType` | string or null | `User`, `Page`, or null when unavailable. |
| `name` | string or null | Display name, when available. |
| `profileUrl` | string or null | Profile URL, when Facebook shows one. |
| `profilePicture` | string or null | Profile picture URL, when available. |
| `reactionType` | string or null | `LIKE`, `LOVE`, `CARE`, `HAHA`, `WOW`, `SAD`, `ANGRY`, or null for preview-only reactors. |
| `postReactionsCount` | integer or null | Total reactions across all types. |
| `postReactionCounts` | object | Exact totals for `LIKE`, `LOVE`, `CARE`, `HAHA`, `WOW`, `SAD`, and `ANGRY`. |
| `scrapedAt` | string | Time the row was collected, in ISO 8601 format. |

Example row (shortened, with placeholder names and IDs):

```json
{"facebookUrl":"https://www.facebook.com/example/posts/POST_ID","inputUrl":"https://www.facebook.com/example/posts/POST_ID","postId":"POST_ID","postUrl":"https://www.facebook.com/example/posts/POST_ID","reactorId":"REACTOR_ID","reactorType":"User","name":"Example Person","profileUrl":"https://www.facebook.com/REACTOR_ID","profilePicture":null,"reactionType":"LIKE","postReactionsCount":125,"postReactionCounts":{"LIKE":80,"LOVE":20,"CARE":5,"HAHA":10,"WOW":4,"SAD":3,"ANGRY":3},"scrapedAt":"2026-10-30T12:00:00.000Z"}
```

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `startUrls` | Required | Facebook post URLs; each item has a `url`. |
| `accessKey` | None | For invited customers: the access key included with your invitation. Without it, the run collects what Facebook shows logged-out visitors. |
| `resultsLimit` | No limit | Maximum returned reactors per post. |
| `freshList` | `false` | In managed mode, return the full list again without remembering this run; returned people are charged as usual. |
| `reactionTypes` | All types | Return only selected reaction types: `LIKE`, `LOVE`, `CARE`, `HAHA`, `WOW`, `SAD`, `ANGRY`. |
| `cookies` | No account | For invited customers: optional Cookie-Editor JSON export, raw Cookie header, or a saved account file. Requires `c_user`, `xs` and `accessKey`. Used only for this run. |
| `userAgent` | macOS browser identity | Used to match the browser operating system to the browser that exported the cookies. Ignored when an account file is provided. |
| `accountCountry` | `us` | Two-letter country code where the account normally logs in from. Ignored when an account file is provided. |

Collect all available reactors from a post:

```json
{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"}]}
```

Collect only likes and loves, up to 100 people per post:

```json
{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"}],"reactionTypes":["LIKE","LOVE"],"resultsLimit":100}
```

### Supported URLs

URLs may use `www.facebook.com`, `m.facebook.com` or `web.facebook.com`.

| URL form | Example path |
| --- | --- |
| Post | `/Page/posts/123456789` |
| Permalink | `/permalink.php?story_fbid=123&id=456` |
| Public group post | `/groups/GROUP/posts/123`, `/groups/GROUP/permalink/123` |
| Photo | `/photo/?fbid=123` |
| Reel | `/reel/123` |
| Watch | `/watch/?v=123` |
| Video | `/Page/videos/123` |
| Share | `/share/r/CODE`, `/share/v/CODE`, `/share/p/CODE` |

### Coverage report

The default key-value store's `OUTPUT` record contains a `targets` array with one report per URL. Each `COVERAGE` log line contains that URL's report. Reports include `inputUrl`, `postId`, `mode`, `reactionsTotal`, `reactionCounts`, `reactorsReturned`, `previouslyDelivered`, `status`, `stopReason`, `duplicateOf`, `retries` and `requestsFailed`.

In managed and own-account browser modes, `OUTPUT` is refreshed as reactors are delivered (at most about once every 10 seconds) and at the end of each attempt. While a post is being collected, its report has `status: "partial"` and `stopReason: null`; the final stop reason is set when the attempt ends.

| Field | Meaning |
| --- | --- |
| `reactorsReturned` | People returned in this run. |
| `previouslyDelivered` | People already returned to this user for this post and skipped in this run. |

| Status | Meaning |
| --- | --- |
| `complete` | The list ended with every counted person returned, the returned count matches the total, or this URL duplicates a post already collected. |
| `partial` | Collection is in progress or stopped at a result or charge limit, the logged-out visibility limit, an account interruption, lost connection, or run time limit, or the list ended before reaching Facebook's total (`stopReason: "end_of_list"`). |
| `failed` | Collection could not return rows or establish coverage. |
| `unavailable` | The post could not be accessed or found. |

Without cookies, Facebook shows up to 10 people per reaction type, so a post returns up to about 70 people, plus a few from the reaction preview. Exact totals by type are still returned. A post with this visibility limit has `stopReason: "logged_out_limit"` and `status: "partial"`; if visible reactors equal the total, it is `complete`.

| `stopReason` | Meaning |
| --- | --- |
| `end_of_list` | The list ended or the returned count matched the total. |
| `logged_out_limit` | Logged-out visibility stopped collection before the total. |
| `results_limit` | `resultsLimit` was reached. |
| `charge_cap` | The run's event charge limit was reached. |
| `free_plan_limit` | The free-plan URL or result limit was reached. |
| `account_logged_out` | Facebook logged the account out. |
| `account_checkpoint` | Facebook asked the account to verify itself. |
| `rate_limited` | Facebook rate limited the run. |
| `connection_lost` | The connection to Facebook could not be restored; rows already returned remain available. |
| `proxy_auth` | A temporary connection problem on our side stopped the run; rows already returned remain available. Try again later. |
| `time_limit` | The run stopped before its timeout so it could save results; increase the run timeout for large posts. |
| `no_account_available` | No account was available to continue collecting. |
| `unavailable` | The post was unavailable. |
| `error` | Collection encountered an error. |
| `duplicate_post` | This post was already collected from an earlier URL. |
| `reactors_hidden` | The post shows signed-in viewers only their friends' names, so no reactors can be collected. The post totals are still reported, the status is `failed`, and nothing is charged. |

### Account mode

Account mode is available to invited customers with their `accessKey`. To collect the full reactor list with your own Facebook account, provide its cookies. Install the Cookie-Editor browser extension, sign in to Facebook, open the extension on Facebook and use Export to copy the cookies as JSON. Paste that into `cookies`, or provide a raw Cookie header containing `c_user` and `xs`.

Set `userAgent` to the exporting browser's User-Agent so the Actor can match its operating system, and set `accountCountry` to the country the account normally logs in from. The Actor uses one Chrome tab and one residential IP for the run. Facebook's page opens and scrolls the reactions list. The Actor reads the page's responses and stops if Facebook logs the account out, asks it to verify itself (`account_checkpoint`) or rate limits it. Cookies are never written to logs, the dataset or run report. Use a secondary account; Facebook may restrict accounts used for automated access.

The account's Facebook interface must be in English or Spanish (Facebook **Settings → Language and region → Facebook language**); with another language the reactions list may not open and the post ends with `stopReason: "error"`.

### Pricing

Runs by users on Apify's free plan are limited to 3 URLs and 20 results per run.

- `reaction`: $0.0006 per returned person ($0.60 per 1,000) on every plan.
- Start fee: $0.00005 per run.
- Duplicate post URLs, unavailable posts and failed posts: free.

### Limits

Without an account, only reactors Facebook shows to logged-out visitors can be returned; hidden reactors are not available. `reactionTypes` filters returned rows, while the post totals still include every reaction type. Duplicate URLs for the same post are collected once. A later URL is reported with `status: "complete"`, `stopReason: "duplicate_post"` and `duplicateOf` set to the URL that collected it.

In managed mode, re-running a post that stopped partway returns only people not delivered to you before. Set `freshList` to `true` for a test run or full re-read; it returns everyone again and does not affect later runs. If Apify restarts the run container, the run continues where it stopped without returning anyone twice, with or without `freshList`.

### Use via API

Send JSON to the synchronous dataset-items endpoint:

```sh
curl -X POST 'https://api.apify.com/v2/acts/LordFloofington~facebook-likes-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"}]}'
```

### Compliance

Users are responsible for complying with Facebook's terms and applicable law when using this Actor.

# Changelog

This Actor's version history is a separate document: https://apify.com/lordfloofington/facebook-likes-scraper/changelog.md

# Actor input Schema

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

Facebook post, photo, video, or reel URLs to scrape. Runs by users on Apify's free plan are limited to 3 URLs and 20 results per run.

## `accessKey` (type: `string`):

For invited customers: the access key included with your invitation. Leave empty to collect the reactions Facebook shows logged-out visitors.

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

Maximum reactor rows per post. Omit for all available results.

## `freshList` (type: `boolean`):

Return every person again, including people returned by earlier runs of the same post. This run is not remembered, so later runs are unaffected; returned people are charged as usual.

## `reactionTypes` (type: `array`):

Select reaction types to return. Omit for all types.

## `cookies` (type: `string`):

For invited customers: optional Cookie-Editor JSON export, raw Cookie header, or a saved account file. Requires c_user and xs and the access key. Used only for this run.

## `userAgent` (type: `string`):

Used to match the browser's operating system to the browser that exported the cookies. Chrome uses its installed version. Ignored when an account file is provided.

## `accountCountry` (type: `string`):

Two-letter country code for the sticky account proxy session. Ignored when an account file is provided.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/NASA/posts/pfbid05VnyRjQarSMA1WC3gR9ymgwisUHdRUFq9Kp3ZBqebKYhsYyJUTVH48r37CNn1dGGl"
    }
  ],
  "freshList": false,
  "accountCountry": "us"
}
```

# Actor output Schema

## `reactions` (type: `string`):

No description

## `coverage` (type: `string`):

No description

# 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/NASA/posts/pfbid05VnyRjQarSMA1WC3gR9ymgwisUHdRUFq9Kp3ZBqebKYhsYyJUTVH48r37CNn1dGGl"
        }
    ],
    "accountCountry": "us"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lordfloofington/facebook-likes-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/NASA/posts/pfbid05VnyRjQarSMA1WC3gR9ymgwisUHdRUFq9Kp3ZBqebKYhsYyJUTVH48r37CNn1dGGl" }],
    "accountCountry": "us",
}

# Run the Actor and wait for it to finish
run = client.actor("lordfloofington/facebook-likes-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/NASA/posts/pfbid05VnyRjQarSMA1WC3gR9ymgwisUHdRUFq9Kp3ZBqebKYhsYyJUTVH48r37CNn1dGGl"
    }
  ],
  "accountCountry": "us"
}' |
apify call lordfloofington/facebook-likes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lordfloofington/facebook-likes-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/TmJH3MEC2BlA2EQyj/builds/mzezbhakrt7hb13lp/openapi.json
