# Facebook Posts Scraper (`saswave/facebook-posts-scraper`) Actor

$0.8 / 1000 results. No proxies. Date filters. Extract posts from Facebook public profiles with engagement metrics, timestamps, and post content. Filter with dates

- **URL**: https://apify.com/saswave/facebook-posts-scraper.md
- **Developed by:** [SASWAVE](https://apify.com/saswave) (community)
- **Categories:** Automation, Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 9 total users, 3 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.80 / 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 Posts Scraper

Extract public Facebook posts, post text, engagement metrics, reaction breakdowns, and attached media from Facebook Pages and profiles.

The **Facebook Posts Scraper** automates the extraction of public posts and content engagement from **[Facebook](https://www.facebook.com)**.

Whether you need to monitor brand mention sentiment, analyze social media campaign performance, track competitor activity, or archive public Page posts, this Actor delivers clean, structured social data at scale.

Optional filtering with smart date range (min - max)

### Features

- 📜 **Public Page & Profile Post Scraping:** Extract posts, status updates, stories, and shared links directly using Facebook URLs.

- 📊 **In-Depth Engagement Metrics:** Capture total counts for **likes, comments, and shares** for every scraped post.

- ❤️ **Detailed Reaction Breakdown:** Extract exact reaction distribution, including *Like (J'aime)*, *Love (J'adore)*, *Haha*, *Wow*, *Sad*, and *Angry* counts.

- 🖼️ **Media & Attachment Extraction:** Collect photo URLs, attachment links, media IDs, and media types associated with each post.

- ⏰ **Timestamp & Permalink Tracking:** Retrieve precise publication timestamps, human-readable dates, post IDs, and canonical post permalinks.

- ⚡ **High-Performance & Anti-Blocking:** Built with smart session management and Apify Proxy support to maintain reliable extraction rates.

- 📂 **Multi-Format Data Export:** Export clean datasets to **JSON, CSV, Excel (XLSX), XML, or HTML**.

### USE CASES

- **Brand & Competitor Social Monitoring:** Track posting frequency, content strategy, and engagement rates of competing brands.

- **Sentiment & Reaction Analysis:** Analyze user emotional responses by tracking reaction breakdowns (*Love*, *Haha*, *Sad*, etc.) across campaign posts.

- **Influencer & Creator Analytics:** Evaluate organic reach, average interaction rates, and content quality of prospective brand partners.

- **Content Archiving & Social Intelligence:** Archive public Page timelines for market research, academic studies, or trend forecasting.

### OUTPUT

From Page

```json
{
  "post_id": "1648284428538472",
  "creation_time": 1504955308,
  "creation_time_date": "2017-09-09 13:08:28",
  "url": "https://www.facebook.com/creachriscrochet/posts/pfbid0Mx2YZRPuUPKHvqZoy6qSsZLbPtzCwG5VAWLLrq84D7n6aakpgftoqL95EuS7phM8l",
  "owner_id": "100067778341320",
  "owner_name": "CreaChris",
  "text": "Une commande un peu spéciale de ma maman qui a souhaité avoir un petit lutin de Noël ❤️",
  "story_id": "UzpfSTgzMjcwNjg3MzQyOTU2OToxNjQ4Mjg0NDI4NTM4NDcyOjE2NDgyODQ0Mjg1Mzg0NzI=",
  "likes": 12,
  "comments": 5,
  "shares": 1,
  "likes_breakdown": [
    {
      "name": "J’aime",
      "count": 9
    },
    {
      "name": "J’adore",
      "count": 3
    }
  ],
  "attachments": [
    {
      "media_image": "https://scontent-cdg6-1.xx.fbcdn.net/v/t39.30808-6/650109029_26683402667933302_1323148467762648575_n.jpg?stp=dst-jpg_tt6&cstp=mx822x960&ctp=s822x960&_nc_cat=103&ccb=1-7&_nc_sid=833d8c&_nc_ohc=OxB6C6CCuCgQ7kNvwFrfpwq&_nc_oc=AdpmoPyWxU3S7N6pAa1odP90QNOIz8C0_SX-twneBx2KUY95sQPOUj4AIv3uQrIYf7fNU32_R6iGRERvQalCUnjI&_nc_zt=23&_nc_ht=scontent-cdg6-1.xx&_nc_gid=08N2E3Lfq4jKxoRXDZ9-Rw&_nc_ss=7b289&oh=00_AQJR4L4FkPIH7Nj0JpITfwGSzAjUHTEvWqHDuipMR7Qc8g&oe=6A9C971B",
      "media_url": "https://www.facebook.com/photo/?fbid=1648284338538481&set=a.369027065366569",
      "media_id": "1648284338538481",
      "media_type": "Photo"
    }
  ]
}
```

### 🛟 SUPPORT

Share your runs with the developer team and create issues on error to help us improve actor quality.

You might discover edge case we didn't test yet

We stay available anytime

# Actor input Schema

## `pages` (type: `array`):

Provide public page identifier, ex: https://www.facebook.com/TeamBruceFr identifier is TeamBruceFr

## `min_date` (type: `string`):

Narrow search with minimum date

## `max_date` (type: `string`):

Narrow search with maximum date

## `max_results` (type: `integer`):

0 or empty = no limit

## Actor input object example

```json
{
  "pages": [
    "TeamBruceFr"
  ],
  "max_results": 1
}
```

# Actor output Schema

## `results` (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 = {
    "pages": [
        "TeamBruceFr"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("saswave/facebook-posts-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 = { "pages": ["TeamBruceFr"] }

# Run the Actor and wait for it to finish
run = client.actor("saswave/facebook-posts-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 '{
  "pages": [
    "TeamBruceFr"
  ]
}' |
apify call saswave/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

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