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

Export public Facebook page and group posts with text, dates, media, and visible engagement.

- **URL**: https://apify.com/fetch_cat/facebook-posts-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 1,000 public facebook post saveds

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

Monitor posts from public Facebook pages and public groups, or extract one public post. Export stable post IDs and URLs, visible captions, publication dates, media, author labels, and engagement for social listening, campaign tracking, and research—without Facebook credentials.

### Buyer workflows

Use the Actor to maintain brand and creator feeds, monitor public communities, compare visible engagement over time, or incrementally collect campaign posts after a saved cutoff.

### Input recipes

```json
{
  "startUrls": [{"url":"https://www.facebook.com/nasa/"}],
  "maxPostsPerUrl": 20,
  "onlyPostsNewerThan": "2026-09-22T00:00:00.000Z"
}
```

- `startUrls` accepts public page, public group, and direct post URLs.
- `maxPostsPerUrl` is a per-source limit from 1 to 500.
- `onlyPostsNewerThan` is an optional ISO date/time boundary for recurring exports.
- `proxyConfiguration` optionally configures Apify Proxy under Advanced options.

Malformed or unsupported URLs are reported and skipped, so other valid sources can continue.

### Output

```json
{
  "postId": "1234567890",
  "url": "https://www.facebook.com/nasa/posts/1234567890/",
  "sourceUrl": "https://www.facebook.com/nasa/",
  "sourceType": "page",
  "authorName": "NASA",
  "authorUrl": "https://www.facebook.com/NASA/",
  "text": "Visible public post text",
  "timestamp": "2026-09-28T18:00:00.000Z",
  "media": [{"type":"image","url":"https://..."}],
  "reactionsCount": 1200,
  "commentsCount": 82,
  "sharesCount": 31,
  "scrapedAt": "2026-09-29T20:00:00.000Z"
}
```

Fields Facebook does not expose anonymously remain `null`; values are never inferred. Results exclude nested comments and replies.

### Pricing

The Actor charges once for the **Run started** event and once for each **Public Facebook post saved** event. See the live [Pricing page](https://apify.com/fetch_cat/facebook-posts-scraper/pricing) for current rates.

### Support, limits, and privacy

Facebook varies its anonymous web surface and may show login walls or rate limits. The Actor uses only what an anonymous browser can see. It does not accept cookies or credentials and does not collect private groups or profiles, messages, follower-only content, member lists, comments/replies, or inferred personal data. A source failure is reported truthfully and does not generate placeholder records.

### API example

```js
const run = await client.actor('fetch_cat/facebook-posts-scraper').call({
  startUrls: [{ url: 'https://www.facebook.com/nasa/' }],
  maxPostsPerUrl: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

The same input works with Apify schedules, webhooks, API, and MCP integrations.

### Related Facebook Actors

- [Facebook Posts Search](https://apify.com/fetch_cat/facebook-post-search-scraper) — discover public posts by search query.
- [Facebook Pages](https://apify.com/fetch_cat/facebook-pages-scraper) — collect public page profile metadata.
- [Facebook Groups Search](https://apify.com/fetch_cat/facebook-groups-search-scraper) — discover relevant public groups.
- [Facebook Comments](https://apify.com/fetch_cat/facebook-comments-scraper) — export visible comments from public posts.
- [Facebook Reels](https://apify.com/fetch_cat/facebook-reels-scraper) — collect public Facebook Reel metadata.

# Changelog

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

# Actor input Schema

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

Public Facebook URLs to monitor.

## `maxPostsPerUrl` (type: `integer`):

Maximum unique posts saved from each source.

## `onlyPostsNewerThan` (type: `string`):

Optional ISO date/time lower bound.

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

Optional Apify Proxy configuration.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/nasa/"
    }
  ],
  "maxPostsPerUrl": 20
}
```

# Actor output Schema

## `dataset` (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/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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/nasa/" }] }

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

```

## MCP server setup

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