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

Collect public posts from any Facebook page or profile using URLs or slugs. Export structured results with post text, reactions breakdown, comments, media URLs, video detection, and engagement metrics to support social listening, content analysis, competitor monitoring, and recurring research.

- **URL**: https://apify.com/parseforge/facebook-posts-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 68 total users, 18 monthly users, 84.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 📘 Facebook Posts Scraper

> 🚀 **Pull Facebook posts from any public page in minutes.** Text, reactions, comments, shares, media, video flag, engagement metrics. No login.

<table><tr>
<td style="border-left:4px solid #0F766E;padding:12px 16px;font-weight:600">Pull structured records from Facebook Posts — clean fields ready as CSV, JSON, JSONL, Excel, or XML for downstream pipelines.</td>
</tr></table>

<table>
<tr>
<td colspan="4" style="padding:10px 14px;background:#0F766E;border:none;border-radius:4px 4px 0 0">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">Related Scrapers</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:25%;background:#CCFBF1">
&nbsp;<a href="https://apify.com/parseforge/facebook-posts-scraper" style="color:#0F766E;text-decoration:none;font-weight:700;font-size:13px">Posts</a><br>
<span style="color:#0F766E;font-size:11px;font-weight:600">➸ You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:25%">
&nbsp;<a href="https://apify.com/parseforge/facebook-ads-library-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Ads Library</a><br>
<span style="color:#78716C;font-size:11px">Political+commercial ad archive</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:25%">
&nbsp;<a href="https://apify.com/parseforge/facebook-pages-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Pages</a><br>
<span style="color:#78716C;font-size:11px">Page profiles + about</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:25%">
&nbsp;<a href="https://apify.com/parseforge/facebook-reviews-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Reviews</a><br>
<span style="color:#78716C;font-size:11px">Business page ratings</span>
</td>
</tr>
</table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
parseforge/facebook-posts-scraper on Apify. Call: ApifyClient("TOKEN").actor("parseforge/facebook-posts-scraper").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: startUrls (array, default [{"url": "https://www.facebook.com/cern/"}]), maxItems (integer, default 10), pageSlugs (array), minPostDate (string), maxPostDate (string), maxConcurrency (integer, default 1). Full actor spec: fetch build via GET https://api.apify.com/v2/acts/parseforge~facebook-posts-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations
```

Pull live posts from Facebook public pages and profiles. The actor accepts a list of page URLs (or slugs), walks each page's feed, and returns one structured record per post ready for social listening, brand monitoring, content research, or competitive intelligence.

Every run fetches data live so you get the current state of Facebook at run time. Records include the post URL, post text, author name, post date, reaction counts (like, love, wow, haha, sad, angry), comment count, share count, media URLs (images and videos), video flag, and a back-reference URL.

| 👥 Built for | 🎯 Primary use cases |
|---|---|
| Brand and social listening | Monitor brand mentions across pages |
| Content marketers | Track competitor posting cadence and engagement |
| PR and crisis monitoring | Watch for reputation events in real time |
| Researchers | Study public discourse and content velocity |
| Marketing and growth | Identify high-performing post formats |
| App developers | Power archival and analytics products |

### 📋 What the Facebook Posts Scraper does

- 📘 **Two input formats.** Page URLs or page slugs (e.g. cern, nasa, bbcearth).
- 📅 **Date range filter.** minPostDate and maxPostDate for time-bounded scrapes.
- ❤️ **Reaction breakdown.** Count of like, love, wow, haha, sad, angry reactions.
- 📊 **Engagement metrics.** Comment count, share count.
- 🎥 **Media detection.** Image URLs, video URLs, video flag.
- 🆔 **Per-post back-reference.** Canonical post URL.

The scraper walks each page's feed, extracts post metadata, and pushes structured records to the dataset.

> 💡 **Why it matters:** Facebook public pages remain a primary source of brand and creator content but the platform's UI lacks bulk export. A live, structured pull beats manual scraping for social listening, brand monitoring, and competitive content research.

### 📊 Data fields

Each record includes: `comments`, `facebookId`, `facebookUrl`, `feedbackId`, `imageUrl`, `inputUrl`, `isReel`, `isShared`, `isVideo`, `likes`, `link`, `media`, `mediaType`, `mediaUrl`, `pageName`, `postId`, `reactionAngryCount`, `reactionCareCount`, `reactionHahaCount`, `reactionLikeCount`, `reactionLoveCount`, `reactionSadCount`, `reactionWowCount`, `scrapedAt`, `sharedFrom`, `shares`, `text`, `thumbnailUrl`, `time`, `timestamp`, `topReactionsCount`, `url`, `videoUrl`. All 33 field names come from a real production run, so what you see here is what lands in your dataset.

> ⚠️ **Good to Know:** the actor only processes public pages and profiles. Private pages and groups behind login are not accessible.

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Facebook Posts Scraper page on the Apify Store.
3. 🎯 **Set inputs.** Add page URLs or slugs and optional date filters.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

### 🔗 Recommended Actors

- [**📘 Facebook Reviews Scraper**](https://apify.com/parseforge/facebook-reviews-scraper) - Page reviews and ratings
- [**🐦 X (Twitter) Scraper**](https://apify.com/parseforge/x-com-scraper) - Tweets with engagement
- [**📸 Instagram Posts Scraper**](https://apify.com/parseforge/instagram-posts-scraper) - Instagram posts with metadata
- [**📱 Reddit Posts Scraper**](https://apify.com/parseforge/reddit-posts-scraper) - Subreddit posts with comments
- [**💼 LinkedIn Posts Scraper**](https://apify.com/parseforge/linkedin-posts-scraper) - LinkedIn posts from profiles

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

> ⚠️ **Disclaimer.** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Meta or Facebook. All trademarks mentioned are the property of their respective owners. The scraper accesses only publicly available pages and is intended for legitimate research, analytics, and brand-listening use. Users are responsible for compliance with Facebook's Terms of Service and applicable law.

### 🆘 Need Help?

If you hit a bug, have questions about setup, or need a scraper we haven't built yet, open our [contact form](https://tally.so/r/BzdKgA) or write to parseforge@protonmail.com. We also take on paid custom data projects.

For faster answers, join our [Discord](https://parseforge.co/discord). It's the best place to get support and suggest new actors.

# Actor input Schema

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

Facebook page or profile URLs to scrape posts from (e.g., https://www.facebook.com/cern/)

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

How many posts to collect per run.

## `pageSlugs` (type: `array`):

Facebook page slugs without the full URL (e.g., cern, nasa, bbcearth). Can be combined with Start URLs.

## `minPostDate` (type: `string`):

Only include posts published on or after this date (YYYY-MM-DD or ISO datetime).

## `maxPostDate` (type: `string`):

Only include posts published on or before this date (YYYY-MM-DD or ISO datetime).

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

Number of pages to scrape in parallel (1-5)

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/cern/"
    }
  ],
  "maxItems": 10,
  "maxConcurrency": 1
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset overview table

# 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/cern/"
        }
    ],
    "maxItems": 10,
    "minPostDate": "",
    "maxPostDate": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/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 = {
    "startUrls": [{ "url": "https://www.facebook.com/cern/" }],
    "maxItems": 10,
    "minPostDate": "",
    "maxPostDate": "",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/facebook-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/cern/"
    }
  ],
  "maxItems": 10,
  "minPostDate": "",
  "maxPostDate": ""
}' |
apify call parseforge/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/facebook-posts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/ekedGBxDBFbeZF5k1/builds/a7LPzoSr8399jBwC0/openapi.json
