# Facebook Post Scraper — Public Page Posts Without Login (`maged120/facebook-post-scraper`) Actor

Extract posts from any public Facebook page without login. Returns post text, reactions, comment counts, share counts, and timestamps.

- **URL**: https://apify.com/maged120/facebook-post-scraper.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Categories:** Automation, Social media
- **Stats:** 15 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### What does Facebook Post Scraper do?

**Facebook Post Scraper** extracts posts from public Facebook pages — including post text, reactions, comment counts, share counts, timestamps, and media URLs — without requiring a Facebook login or Graph API access.

This Actor runs on the [Apify platform](https://apify.com). Use it for content research, competitive analysis, social media audits, or building public page activity datasets.

### Why use Facebook Post Scraper?

- **No Facebook login or API** — accesses public page posts directly
- **Full post data** — text, reactions, shares, comments, timestamps, and media
- **Batch pages** — scrape multiple Facebook pages in one run
- **Competitive analysis** — audit what content competitors are posting and how it performs
- **Content research** — find high-engagement posts in any niche

### How to use Facebook Post Scraper

1. Open the Actor and click **Try for free**
2. Enter Facebook page URLs in the `pageUrls` field
3. Set date range and maximum posts to extract
4. Click **Start** — posts appear in the Output tab
5. Download as JSON or CSV, or connect via the Apify API

### Input

```json
{
  "pageUrls": [
    "https://www.facebook.com/nasa",
    "https://www.facebook.com/natgeo"
  ],
  "maxPosts": 100,
  "startDate": "2024-01-01"
}
```

| Field | Type | Description | Default |
|---|---|---|---|
| `pageUrls` | array | Facebook public page URLs | required |
| `maxPosts` | integer | Max posts per page | `100` |
| `startDate` | string | Only posts from this date onward (YYYY-MM-DD) | — |

### Output

Results are stored in the Apify dataset. Download in JSON, CSV, HTML, or Excel.

```json
{
  "pageUrl": "https://www.facebook.com/nasa",
  "pageName": "NASA",
  "postText": "Today, astronauts aboard the ISS...",
  "postUrl": "https://www.facebook.com/nasa/posts/example",
  "publishedAt": "2024-03-19T14:30:00Z",
  "reactions": 45200,
  "comments": 3100,
  "shares": 8900,
  "mediaUrls": ["https://..."]
}
```

### Output fields

| Field | Type | Description |
|---|---|---|
| `pageName` | string | Facebook page name |
| `postText` | string | Full post text |
| `postUrl` | string | Direct post URL |
| `publishedAt` | string | Post publication timestamp |
| `reactions` | number | Total reaction count |
| `comments` | number | Comment count |
| `shares` | number | Share count |
| `mediaUrls` | array | Image/video URLs attached to the post |

### Cost

Pay-per-result pricing:

| Volume | Estimated cost |
|---|---|
| 500 posts | ~$0.05–$0.50 |
| 5,000 posts | ~$0.50–$5.00 |

### Tips

- Filter by `startDate` to only collect recent posts and reduce compute costs
- Sort exported results by `reactions` descending to identify the best-performing content
- Compare reaction counts across competitors to benchmark your own page performance
- Schedule monthly runs to build a longitudinal dataset of page activity

### FAQ

**Does this require a Facebook account?**
No — only public page posts are accessed.

**Can I scrape private pages or groups?**
No — only publicly visible page posts are supported.

**Is this compliant with Facebook's Terms of Service?**
This Actor accesses publicly visible data. Users are responsible for ensuring their use complies with applicable laws and platform policies.

**Is this Actor maintained?**
Yes. Report bugs or feature requests in the Issues tab.

**Need help or have questions?**
Open an issue in the Issues tab or reach out on Discord: **maged03211**

# Actor input Schema

## `queries` (type: `array`):

List of Facebook post URLs to scrape. Each item can be a plain URL string or an object with a `url` and optional `label` for tagging the output.

## `includeComments` (type: `boolean`):

Include top comments from the post in the output. This actor is a post data scraper and does not paginate through all comments.

## `scrapeFullContent` (type: `boolean`):

Extract the full, untruncated post text. When disabled, falls back to a short description (~250 characters).

## `includeAuthorPictures` (type: `boolean`):

Add each comment author's profile picture URL to the comment output (pictureUrl field).

## `includeVideoViews` (type: `boolean`):

Include the video view/play count in the output for video and reel posts (videoViewCount field).

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

Proxy settings. Residential proxies are recommended for large-scale runs.

## Actor input object example

```json
{
  "queries": [
    {
      "url": "https://www.facebook.com/NASA/posts/pfbid0F2Hd2hkfGjkY1TtFmgzK12fxuaZ4fCbTgcPRyiLAf2RPyTi7TXSamkKvVJspMTJCl",
      "label": "nasa-post"
    }
  ],
  "includeComments": true,
  "scrapeFullContent": true,
  "includeAuthorPictures": false,
  "includeVideoViews": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "queries": [
        {
            "url": "https://www.facebook.com/NASA/posts/pfbid0F2Hd2hkfGjkY1TtFmgzK12fxuaZ4fCbTgcPRyiLAf2RPyTi7TXSamkKvVJspMTJCl",
            "label": "nasa-post"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/facebook-post-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 = { "queries": [{
            "url": "https://www.facebook.com/NASA/posts/pfbid0F2Hd2hkfGjkY1TtFmgzK12fxuaZ4fCbTgcPRyiLAf2RPyTi7TXSamkKvVJspMTJCl",
            "label": "nasa-post",
        }] }

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/WIZh48ICkKDKRizY5/builds/8udxGFP1njVqp83k7/openapi.json
