# 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
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 80.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 collects posts exposed on public Facebook pages, public groups and individual post URLs without Facebook credentials. Export post IDs and source links with available captions, dates, media and engagement for your own research or reporting. Facebook can restrict anonymous access, so a public URL does not guarantee usable posts.

### Quick start

Supply a known public Page, group or direct-post URL. Start with a small per-source cap, then inspect the returned records before widening your export. This existing recipe also illustrates an optional date cutoff:

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

Open the dataset to export JSON, CSV or Excel. Availability depends on what Facebook exposes without login. If Facebook explicitly marks a source unavailable, the run returns no posts for that source and explains why in the log.

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### What you get

Saved public post records with stable post IDs, source links and available visible text, publication dates, media, author labels and engagement counts. Fields Facebook does not expose anonymously remain null rather than being inferred. Nested comments and replies are excluded.

### Who is it for?

- **Social-listening teams** reviewing posts from known public Pages or groups.
- **Campaign researchers** collecting source-linked public post samples.
- **Community researchers** organizing visible posts for their own analysis.
- **Data teams** maintaining dated exports in their own reporting systems.

### How you can use the data

- **Prepare a known-Page post sample.** Use the existing NASA Page URL and a small per-source cap. Keep `postId`, `url`, `sourceUrl`, `timestamp` and available text together so a reviewer can trace each observation to its public post.
- **Collect after your own saved cutoff.** Supply the supported ISO date/time boundary when collecting campaign posts after a previous export. Keep the cutoff with your dataset and compare identifiers in your own system rather than assuming an automatic monitoring history.
- **Review a supplied public group's visible posts.** Use an exact group URL and inspect available author labels and engagement values. This does not retrieve member lists, private group content, nested comments or replies.
- **Inspect one known public post.** Supply its direct URL for source-linked content research. Summaries, sentiment analysis and alerts belong to your own downstream workflow, using only fields actually returned.

### Input settings

| Setting | API key | Supported use |
| --- | --- | --- |
| Public source URLs | `startUrls` | Public Page, public group or direct-post URLs. |
| Maximum posts per source | `maxPostsPerUrl` | Per-source cap from 1 to 500. |
| Optional date/time boundary | `onlyPostsNewerThan` | ISO date/time cutoff for recurring exports. |
| Proxy settings | `proxyConfiguration` | Omit for direct-first access with bounded residential HTTP fallback for public Pages. Explicit managed/custom settings or direct opt-outs remain honored. |

When `proxyConfiguration` is omitted, incomplete public Page collection can use a bounded Apify Residential Proxy fallback for anonymous Page/timeline requests after direct access. Browser traffic is not automatically moved to a paid proxy. Explicit direct opt-outs (`false`, `null`, or `{ "useApifyProxy": false }` without a custom pool) disable that fallback. Explicit managed or custom proxy selections stay selected; the Actor does not bypass them with direct requests or substitute another pool. Existing startup and saved-post prices are unchanged; managed proxy traffic can incur resource usage. No Facebook login, cookie or account is used.

Malformed or unsupported URLs are reported and skipped so other valid sources can continue. Recurring collection requires an external schedule or integration.

### Output data

Illustrative output shape, not an observed post or a guarantee that every field is exposed publicly:

```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"
}
```

Unavailable fields remain null. Engagement values and author labels reflect the public response rather than inferred personal data.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

The **Run started** event is charged when processing begins, even if no posts are saved. The **Public Facebook post saved** event is charged for each saved post.

See the [live Pricing tab](https://apify.com/fetch_cat/facebook-posts-scraper/pricing) for current rates and discounts.

Keep the source list and per-source cap small for an initial export.

### Tips for best results

- **Start with a known public source and a small cap.** Inspect the visible fields before expanding collection.
- **Keep the cutoff with recurring exports.** Use the supported date boundary deliberately when comparing later observations.
- **Retain post IDs and source links.** Use them in your own reporting and deduplication workflow.
- **Treat null fields as unavailable observations.** Do not infer missing author, media or engagement values.
- **Review reported source failures.** A failed source does not produce invented post records.

### Limits and caveats

Facebook varies its anonymous public surface and can show login walls or rate limits. The Actor uses only data exposed without login, so returned fields and coverage can vary.

It does not accept Facebook cookies or credentials or collect private groups or profiles, messages, follower-only content, member lists, nested comments or replies, or inferred personal data. Check the run log for skipped or failed sources and per-source outcome reasons. Supported no-post or unavailable responses can finish with no rows; an unknown page, blocking, parsing failure or interrupted extraction is not treated as proof that no posts exist. Failed or interrupted work retains useful saved posts and a pending source checkpoint rather than claiming complete extraction.

Response processing uses at most two concurrent body reads and retains at most 1,000 network candidates or 4,000,000 serialized UTF-8 bytes at once. Oversized declared responses are rejected before reading; the decoded parser limit is 2,000,000 UTF-8 bytes. Unknown or compressed bodies can still be fully materialized by the browser library before that check, so these limits do not guarantee peak memory usage. Embedded-script transfers are limited to 100 scripts and 2,000,000 characters; DOM transfers also have count and character limits. Acquisition or processing failures leave the source pending. Finalization closes the finite response window, waits for accepted reads within the work deadline and processes retained posts without extra navigation. Responses arriving after that boundary are outside the collection window, not a completeness guarantee.

Anonymous HTTP collection verifies the requested Page's canonical identity and unique owner before querying. Each selected HTTP transport allows at most 15 requests, including at most 12 timeline pages and bounded same-Page redirects, with 25-second request limits inside the original run deadline. Gzip responses have separate 2,000,000-byte wire and decoded bounds. The automatic residential fallback uses one session per source and caps response-wire plus request-body transfer at 4,000,000 bytes; these application-body counters exclude HTTP/proxy headers and do not replace platform billing records. A limit or query failure preserves useful posts and a pending source rather than claiming complete collection.

The per-source post cap ranges from 1 to 500 and is not a completeness guarantee. Malformed or unsupported URLs are skipped so valid sources can continue. External schedules, analysis, comparisons and alerts require your own workflow.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~facebook-posts-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/nasa/"
    }
  ],
  "maxPostsPerUrl": 20,
  "onlyPostsNewerThan": "2026-09-22T00:00:00.000Z"
}
JSON
```

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/facebook-posts-scraper').call({
  "startUrls": [
    {
      "url": "https://www.facebook.com/nasa/"
    }
  ],
  "maxPostsPerUrl": 20,
  "onlyPostsNewerThan": "2026-09-22T00:00:00.000Z"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/facebook-posts-scraper').call(run_input={'startUrls': [{'url': 'https://www.facebook.com/nasa/'}], 'maxPostsPerUrl': 20, 'onlyPostsNewerThan': '2026-09-22T00:00:00.000Z'})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

#### Existing SDK recipe

With an initialized Apify JavaScript client, the existing short recipe uses the same public Page input:

```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();
```

### MCP and AI agents

You can ask your AI assistant to collect data with **Facebook Posts Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **Facebook Posts Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/facebook-posts-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **Facebook Posts Scraper** by Fetch Cat, or give it the identifier `fetch_cat/facebook-posts-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- “Use Fetch Cat’s Facebook Posts Scraper to collect up to 5 posts from the public NASA Page. Show post links, visible text and available publication times for a small research sample.”
- “Collect up to 3 posts from the exact public Facebook group URL I provide. Include source links and visible engagement fields, without retrieving members, private content or nested comments.”
- “Retrieve up to 5 posts from my supplied public Page after the ISO cutoff I provide. Keep post IDs, publication times and source URLs so I can compare them with my own earlier export.”

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/facebook-posts-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Does this require Facebook credentials?

No. The Actor uses logged-out public views and does not accept cookies or credentials.

#### Can I collect a Page, group or one post?

Yes. Supply the corresponding public source URL. Private content and nested comments or replies are outside this Actor's scope.

#### Does the Actor analyze sentiment or send alerts?

Use the returned records in your own analysis or alerting workflow. Schedules and integrations are external to the post extraction.

#### Why is an output field null?

Facebook may not expose that field anonymously. Values are not inferred to fill missing public data.

### Related 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.

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/facebook-posts-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/facebook-posts-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# 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`):

Omit for direct-first access with a bounded Apify Residential Proxy fallback for incomplete public Page collection. The automatic fallback applies only when this field is omitted and only to anonymous HTTP Page/timeline requests, not browser traffic. Explicit managed/custom settings remain selected from the first source; no direct bypass or automatic pool substitution. Explicit direct opt-outs disable paid fallback. Managed proxy traffic can incur usage costs; startup and saved-post event prices are unchanged. Changing connection settings does not guarantee anonymous Facebook access.

## 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/leVCdH8s73PypFUe2/openapi.json
