# Facebook Likes and Reactions Scraper (`apify/facebook-likes-scraper`) Actor

Extract Facebook likes data from one or multiple Facebook posts. Get post URL, reaction type (like, love, care, sad, angry, laugh), and basic liker info such as Facebook name and profile URL. Download the data in JSON, CSV Excel and use it in apps, spreadsheets, and reports.

- **URL**: https://apify.com/apify/facebook-likes-scraper.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 10,325 total users, 201 monthly users, 100.0% runs succeeded, 51 bookmarks
- **User rating**: 4.57 out of 5 stars

## Pricing

from $2.60 / 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

### What is Facebook Likes Scraper?

It's a simple and powerful tool that allows you to **extract data about reactions to Facebook posts.** To get that data, just **insert the post URL and click "Save & Start" button**.

### What Facebook likes data can I extract?

With this Facebook API, you will be able to extract the following likes data from Facebook:

<table>
<tr>
<td>🔗 Post URL</td>
<td>😢 Reaction type (like, love, care, angry, sad, laugh)</td>
</tr>
<tr>
<td>🖼 Liker Profile URL</td>
<td>💂‍♀️ Basic liker info</td>
</tr>
<tr>
<td> 👍 Facebook ID </td>
<td> ✍️ Post ID </td>
</tr>
</table>

### Why scrape Facebook likes?

🤬 Analyze social media and identify hot spots of misinformation or hate speech <br>

🔎 Conduct market research or product analysis <br>

🤺 Monitor competition <br>

🤔 Track brand sentiment and shifts in customer engagement <br>

### How do I use Facebook Likes Scraper?

Facebook Likes Scraper was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:

1. [Create](https://console.apify.com/sign-up) a free Apify account using your email.
2. Open [Facebook Likes Scraper.](https://apify.com/apify/facebook-likes-scraper)
3. Add one or more Facebook post URLs to scrape its likes and other reactions.
4. Click "Start" and wait for the data to be extracted.
5. Download your data in JSON, XML, CSV, Excel, or HTML.

### Input

The input for Facebook Likes Scraper should be **URLs of Facebook posts** you want to scrape reactions from. Click on the [input tab](https://apify.com/apify/facebook-likes-scraper/input-schema) for a full explanation of input in JSON.

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

```

### Output sample

The results will be wrapped into a dataset which you can find in the **Storage** tab. Here's an excerpt from the dataset you'd get if you apply the input parameters above:

![Facebook Likes scraping](https://i.imgur.com/xuI10WV.png)

And here is the same data but in JSON. You can choose in which format to download your Facebook data: JSON/JSONL, Excel, HTML table, CSV, or XML.

```json
[{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl",
  "reaction": "love",
  "name": "Michelle Smith",
  "profileUrl": null,
  "profilePicture": "https://scontent-man2-1.xx.fbcdn.net/v/t1.18169-1/22800_10207336193869748_1821910971530943054_n.jpg?stp=cp0_dst-jpg_p40x40&_nc_cat=105&ccb=1-7&_nc_sid=7206a8&_nc_ohc=_6ChvYNvDBMAX-J2bUl&_nc_oc=AQmF-nSdG94uKGQzDb_IHiQyu97QPNKqfndGF7uG_O950jt8L36m0o6DOhDmQPFtVqvwvqGsqGfcoFVXUvpgRrLx&_nc_ht=scontent-man2-1.xx&oh=00_AfB2hFdjSrD6F7ZsGHJoOSPgaGeMbIGeKW0PgGnO6hhguA&oe=64649844",
  "facebookId": "6375219342552112",
  "postId": "6375219342552112"
},
{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl",
  "reaction": "like",
  "name": "Sarah Dampson",
  "profileUrl": "https://www.facebook.com/people/Sarah-Dampson/pfbid0VQgN3GwLtyQLXMjxKc1TM9ion7B7r9oHAcVbM4EkCZwRNbh12FbpNs6neZhHm7dFl/",
  "profilePicture": "https://scontent-man2-1.xx.fbcdn.net/v/t39.30808-1/324069204_843562506947134_5065400659853604584_n.jpg?stp=cp0_dst-jpg_p40x40&_nc_cat=111&ccb=1-7&_nc_sid=7206a8&_nc_ohc=etfsyQ9lpW8AX8fIjHb&_nc_ht=scontent-man2-1.xx&oh=00_AfA5iEcJ7IU_yGK-cZyvJWEOSqGUv2Z31Eq4xDBQEC8OhA&oe=644230AF",
  "facebookId": "6375219342552112",
  "postId": "6375219342552112"
},
{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl",
  "reaction": "like",
  "name": "Caroline Paavola",
  "profileUrl": null,
  "profilePicture": "https://scontent-man2-1.xx.fbcdn.net/v/t39.30808-1/340095828_2223834257819881_2999023177662489964_n.jpg?stp=cp0_dst-jpg_p40x40&_nc_cat=110&ccb=1-7&_nc_sid=7206a8&_nc_ohc=a95c1A4ZAKIAX8Jy8sL&_nc_ht=scontent-man2-1.xx&oh=00_AfBXtH73Wi1cC6pDuprFD_RF-aAK1KKnL4-V1yEOyoNTnA&oe=64427771",
  "facebookId": "6375219342552112",
  "postId": "6375219342552112"
},
{
  "facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl",
  "reaction": "love",
  "name": "Penny Brill",
  "profileUrl": null,
  "profilePicture": "https://scontent-man2-1.xx.fbcdn.net/v/t31.18172-1/209387_1863556022561_7170678_o.jpg?stp=c0.0.40.40a_cp0_dst-jpg_p40x40&_nc_cat=100&ccb=1-7&_nc_sid=7206a8&_nc_ohc=yZ9FmYzoqBsAX_mDZVJ&_nc_ht=scontent-man2-1.xx&oh=00_AfBsMxH5CKqlEslCQLbzT1YPN9RjWbKksqu9pCyv561o-A&oe=64647994",
  "facebookId": "6375219342552112",
  "postId": "6375219342552112"
}]
...
```

### How many results can you scrape with Facebook Likes scraper?

Facebook Likes scraper can currently return 20 results on average - the preview of likes (reactions) you see per every post. However, you have to keep in mind that scraping facebook.com has many variables to it and may cause the results to fluctuate case by case. There’s no one-size-fits-all-use-cases number. The maximum number of results may vary depending on the complexity of the input, location, and other factors. Some of the most frequent cases are:

- website gives a different number of results depending on the type/value of the input
- website has an internal limit that no scraper can cross
- scraper has a limit that we are working on improving

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

### How much will scraping Facebook Likes cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

[Watch this video](https://www.youtube.com/watch?v=-wyz2iscZ30) for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

### Want to scrape Facebook Pages or comments?

You can use the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it group posts, reviews, events, or images. Feel free to browse them:

<table>
<tr>
<td>🏞 <a href="https://apify.com/apify/facebook-photos-scraper">Facebook Photos Scraper</a></td>
<td>🌟 <a href="https://apify.com/apify/facebook-reviews-scraper">Facebook Reviews Scraper</a></td>
</tr>
<tr>
<td>🗓 <a href="https://apify.com/apify/facebook-events-scraper">Facebook Events Scraper</a></td>
<td>📱 <a href="https://apify.com/apify/facebook-page-contact-information">Facebook Pages Info Scraper</a></td>
</tr>
<tr>
<td>👥 <a href="https://apify.com/apify/facebook-groups-scraper">Facebook Groups Scraper</a></td>
<td>🕵️‍♀️ <a href="https://apify.com/apify/facebook-search-scraper">Facebook Search Scraper</a></td>
</tr>
<tr>
<td>🕹 <a href="https://apify.com/apify/facebook-games-scraper">Facebook Games Scraper</a></td>
<td>👀 <a href="https://apify.com/apify/facebook-marketplace-scraper">Facebook Marketplace Scraper</a></td>
</tr>
<tr>
<td>💬 <a href="https://apify.com/apify/facebook-comments-scraper">Facebook Comments Scraper</a></td>
<td>📝 <a href="https://apify.com/apify/facebook-posts-scraper">Facebook Posts Scraper</a></td>
</tr>
<tr>
<td>🔮 <a href="https://apify.com/apify/brand-collaboration-scraper">Brand Collaboration Scraper</a></td>
<td>🚩 <a href="https://apify.com/apify/facebook-pages-scraper">Facebook Pages Scraper</a></td>
</tr>
<tr>
<td>🛍️ <a href="https://apify.com/apify/facebook-ads-scraper">Facebook Ads Library Scraper</a></td>
</tr>
</table>

### Integrations and Facebook Likes Scraper

Last but not least, Facebook Likes Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). You can **integrate with LangChain, Make, Trello, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive**, **Asana,** <a  href="https://docs.apify.com/integrations" target="_blank">and more</a>.

You can also use <a  href="https://docs.apify.com/integrations/webhooks"  target="_blank">webhooks</a> to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Likes Scraper successfully finishes a run.

### Using Facebook Likes Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more. To access the API using Node.js, use the `apify-client` NPM package. To access the API using Python, use the `apify-client PyPI` package.

Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for full details or click on the [API tab](https://apify.com/apify/facebook-likes-scraper/api) for code examples.

### Is it legal to scrape Facebook Likes data?

Our [Facebook scrapers](https://apify.com/store?search=facebook) are ethical and **do not extract any private user data, such as email addresses, gender, or location**. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.

If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) and [ethical scraping](https://blog.apify.com/what-is-ethical-web-scraping-and-how-do-you-do-it/).

### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Likes Scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://console.apify.com/actors/XKQI0Jr9lTVSx0BiH/issues) in Apify Console.

# Changelog

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

# Actor input Schema

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

Valid facebook URL

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

If this limit is not set as many results as possible are returned

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/WBBPosts/posts/pfbid02j21mpxEygikxxqKh3AaQxsct5vByRpuZVTgpBMELoKArJT6oJjvek8Y3TdRdDgvYl"
    }
  ],
  "resultsLimit": 10
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped data

# 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/WBBPosts/posts/pfbid02j21mpxEygikxxqKh3AaQxsct5vByRpuZVTgpBMELoKArJT6oJjvek8Y3TdRdDgvYl"
        }
    ],
    "resultsLimit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/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/WBBPosts/posts/pfbid02j21mpxEygikxxqKh3AaQxsct5vByRpuZVTgpBMELoKArJT6oJjvek8Y3TdRdDgvYl" }],
    "resultsLimit": 10,
}

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

```

## MCP server setup

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