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

Scrape Facebook posts from any public page, no login or Graph API token: text, date, reactions by type, comments, shares, video views, photos, video links and shared links. Filter by date, many pages per run, export to CSV or Excel.

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

## Pricing

from $4.00 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Scrape **the posts of any public Facebook page**, newest first, with no login and no Graph API token. The **Facebook Posts Scraper** returns each post's text, exact date, reactions (with the breakdown by type), comment and share counts, video views, photos, video links and thumbnails, shared links and the page's name and ID. Paste many page URLs or usernames in one run and export the posts to JSON, CSV or Excel. Use it to scrape Facebook posts for competitor monitoring, Facebook post engagement reports, brand and social listening, content research and page analytics.

### ✨ Features

- 📰 **Page timeline**: Public posts of a page, newest first, page after page, months back.
- 📈 **Engagement data**: Reactions total and per type (Like, Love, Haha, Wow, Sad, Angry, Care), comments, shares and video views.
- 🖼️ **Media**: Photo URLs, video URLs with thumbnail and duration, every photo of an album post.
- 🔗 **Shared links**: Target URL, title, description and preview image of shared articles.
- 📅 **Date filter**: Only posts published after a date (`2026-10-01`) or in a relative window (`30 days`).
- 📦 **Bulk pages**: Many pages per run, each with its own post limit; duplicate inputs are merged.

### 🛠️ How It Works

1. **Enter Facebook pages**: `https://www.facebook.com/NASA`, `NASA` or `facebook.com/profile.php?id=…`, one per line.
2. **Set the limit**: 50 posts per page by default, and optionally a "Posted after" date.
3. **Run the scraper**: download the posts as JSON, CSV or Excel, or get them through the API.

### ⚙️ Input

| Field | What it does |
| --- | --- |
| **Facebook pages** | Public page URLs, usernames or numeric IDs, one per line. |
| **Max posts per page** | Stop after this many posts from each page (newest first). Default 50. |
| **Posted after** | Only posts published on or after this date, e.g. `2026-10-01` or `30 days`. Optional. |

```json
{
    "pages": ["https://www.facebook.com/NASA", "natgeo"],
    "maxItems": 200,
    "postedAfter": "30 days"
}
```

### 💰 Pricing

You pay per post saved, with no monthly rental.

| Event | Price | What you get |
| --- | --- | --- |
| **Post** | $0.004 per post ($4 per 1,000) | One post with all the fields below |
| **Actor start** | $0.00005 per run | Charged once when the run starts |

Examples: 100 posts cost $0.40 and 1,000 posts cost $4. Pages that are private, not found or have no posts are listed in the run's status message and are not charged. Posts outside the "Posted after" window are not charged either.

### 📊 Sample Output Data

```json
{
    "id": "1696521885178568",
    "url": "https://www.facebook.com/reel/1390373583080292/",
    "text": "Don't let its stubby arms fool you—Koleken inakayali was an ambush predator from the abelisaurid family that once thrived in the Southern Hemisphere. …",
    "createdAt": "2026-10-20T22:01:16.000Z",
    "reactions": 1088,
    "topReactions": [
        { "name": "Like", "count": 964 },
        { "name": "Love", "count": 72 },
        { "name": "Wow", "count": 26 },
        { "name": "Haha", "count": 24 },
        { "name": "Care", "count": 2 }
    ],
    "comments": 52,
    "shares": 65,
    "videoViews": null,
    "mediaType": "Video",
    "media": [
        {
            "type": "Video",
            "id": "1390373583080292",
            "url": "https://www.facebook.com/reel/1390373583080292/",
            "imageUrl": "https://scontent.fdad3-1.fna.fbcdn.net/v/t15.5256-10/859640554_1390373673080283_8208256977604865481_n.jpg?…",
            "videoUrl": "https://video.fdad3-8.fna.fbcdn.net/o1/v/t2/f2/m366/AQNNaDtGaoiVghaNkE-azzhLMRBh9xK6GQucJtoGIXxgTHBEbR8spDCbIwfrwCrzzDC.mp4?…",
            "durationMs": 54976
        }
    ],
    "link": null,
    "author": { "name": "National Geographic", "id": "100044623170418", "url": "https://www.facebook.com/natgeo" },
    "pageId": "23497828950",
    "pageName": "National Geographic",
    "pageUrl": "https://www.facebook.com/natgeo",
    "isSponsored": false,
    "inputPage": "natgeo",
    "scrapedAt": "2026-10-21T10:51:10.010Z"
}
```

A shared article fills `link` instead of `media`:

```json
"mediaType": "Link",
"link": {
    "url": "https://on.natgeo.com/g4xcRU",
    "title": "Fighting to Save the Pangolin, the World’s Most Wanted Animal",
    "description": null,
    "source": null,
    "imageUrl": "https://external.fdad3-1.fna.fbcdn.net/emg1/v/t13/9680513787067458301?…"
}
```

`inputPage` is the page you entered, so rows from several pages are easy to group.

### 🎯 Use Cases

- **Competitor monitoring**: track what rival brands post and which posts get the most reactions and shares.
- **Facebook post engagement reports**: reactions, comments and shares per post over a date range, ready for a spreadsheet.
- **Social listening and research**: collect public posts of news outlets, public figures and organisations for analysis or AI pipelines.
- **Content planning**: see which formats (video, photo, link) perform best on a page.

### ❓ FAQ

**Do I need a Facebook account, cookies or a Graph API token?** No. The scraper reads public pages the way a logged-out visitor sees them.

**Which pages work?** Public pages and public figures. Personal profiles and groups need a login and are not supported.

**How far back does it go?** The page timeline goes months back: we read NASA's page 300 posts deep (back to January 2026, about 9 months) without reaching the end. Set "Max posts per page" high and use "Posted after" to stop at a date.

**Can I scrape Facebook posts to Excel or CSV?** Yes. Every run's dataset downloads as CSV, Excel, JSON or XML, or through the Apify API.

**Are comments included?** The comment count is. The comment text is not part of this actor.

**Why is `videoViews` usually empty?** Facebook shows view counts to logged-out visitors only on a few videos (about 1 in 200 posts in our tests).

**How long do the image and video links work?** Facebook's media links expire after a few days, so download the files you need soon after the run.

### 🔗 More Facebook Actors

- [Facebook Pages Scraper](https://apify.com/piotrv1001/facebook-pages-scraper): page profile, followers, contact details and rating, by URL or keyword.
- [Facebook Ads Library Scraper](https://apify.com/piotrv1001/facebook-ads-library-scraper): ads from Meta's Ad Library by keyword.
- [Facebook Page Ads Scraper](https://apify.com/piotrv1001/facebook-page-ads-scraper): all ads of a page.

# Actor input Schema

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

Public Facebook page URLs or usernames, one per line, e.g. `https://www.facebook.com/NASA` or `natgeo`. Public pages and public figures only; personal profiles and groups need a login and are not supported.

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

Stop after this many posts from each page (newest first).

## `postedAfter` (type: `string`):

Only posts published on or after this date, e.g. `2026-10-01` or `30 days`. Leave empty for the newest posts up to the limit.

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

Connection settings. Keep the default.

## Actor input object example

```json
{
  "pages": [
    "https://www.facebook.com/NASA",
    "natgeo"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "https://www.facebook.com/NASA"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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": ["https://www.facebook.com/NASA"],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/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": [
    "https://www.facebook.com/NASA"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call piotrv1001/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

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