# Facebook Page Posts Scraper — No Login Required (`crowdpull/facebook-page-posts-scraper`) Actor

Extract posts from any public Facebook page or profile. No login or cookies needed. Supports date filtering, pagination, and Smart Scrape dedup.

- **URL**: https://apify.com/crowdpull/facebook-page-posts-scraper.md
- **Developed by:** [Crowd Pull](https://apify.com/crowdpull) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 278 total users, 12 monthly users, 52.9% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 post extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Page Posts Scraper — No Login Required

Extract posts from any **public** Facebook page or profile — no login or cookies required.

No browser automation — just fast, lightweight HTTP requests for reliable extraction.

### Features

- **No login required** — extracts posts anonymously from public pages and profiles
- **Smart Scrape (dedup)** — skip posts already scraped in previous runs, saving up to 75% on recurring scrapes
- **Full post data** — text, author, permalink, timestamp, available engagement counts, images, videos, links, and hashtags
- **People URL support** — normalizes `/people/Name/{id}` and legacy `/pages/Name/{id}` URLs to the correct Facebook entity
- **Date filtering** — extract posts newer than a specific date (ISO or relative: `7d`, `30d`, `6m`)
- **Multi-page support** — process multiple pages or profiles in a single run
- **Pagination** — follows Facebook's available feed cursors until the requested limit or exposed feed ends
- **Low cost** — runs on 256MB memory, no browser overhead

### Smart Scrape: How It Saves You Money

Enable **Smart Scrape** to skip posts you've already extracted. The scraper maintains a persistent cache per page that survives across runs indefinitely.

| | Without Smart Scrape | With Smart Scrape |
|---|---|---|
| **Run 1** (500 posts) | **$1.755** | **$1.755** |
| **Run 2** (125 new) | **$1.755** | **$0.8175** |
| **Run 3** (125 new) | **$1.755** | **$0.8175** |
| **Run 4** (125 new) | **$1.755** | **$0.8175** |
| **Monthly total** | **$7.02** | **$4.2075** |
| **Unique posts** | 875 (+ 1,125 duplicate rows) | 875 (zero duplicate rows) |
| **Cost per unique post** | $0.0080 | $0.0048 |

This example uses the currently applied Free-tier price ($0.0035 per extracted post), the $0.001 cache-check price, and the $0.005 run-start charge. Higher Apify tiers have lower post prices; verify the Store pricing panel for current rates.

#### Refresh Window

Set `refreshWindowDays` to re-check recent posts for updated comment/reaction counts. For example, `refreshWindowDays: 7` re-scrapes posts from the last 7 days even if cached, so you always get fresh engagement data on recent content.

### What you get per post

| Field | Description |
|-------|-------------|
| `postId` | Unique post identifier |
| `postUrl` | Direct permalink to the post |
| `postText` | Full post text content |
| `authorName` | Author's display name |
| `authorProfileUrl` | Link to author's profile |
| `timestamp` | ISO 8601 timestamp |
| `commentCount` | Number of comments, or `null` when Facebook withholds it from logged-out responses |
| `reactionCount` | Number of reactions, or `null` when unavailable |
| `shareCount` | Number of shares, or `null` when unavailable |
| `imageUrls` | Array of image URLs attached to the post |
| `videoUrls` | Array of directly exposed video URLs |
| `sharedLinks` | URLs shared in the post text |
| `hashtags` | Hashtags parsed from post text |
| `pageUrl` | Source page URL |
| `pageName` | Page display name |
| `pageId` | Facebook page ID |

### How it works

1. Fetches the page or profile anonymously — no login, no cookies, no browser
2. Extracts Facebook's public request tokens and numeric entity ID
3. Queries the current public timeline GraphQL feed and parses structured post records
4. Checks each post against the dedup cache (if Smart Scrape is enabled)
5. Paginates via GraphQL until `maxPosts` is reached or Facebook stops exposing cursors
6. Saves the updated cache for the next run

### Input examples

#### Basic extraction

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

#### Date-filtered extraction

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/NASA" }
  ],
  "maxPosts": 50,
  "onlyPostsNewerThan": "30d"
}
```

#### Smart Scrape (incremental monitoring)

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/zuck" },
    { "url": "https://www.facebook.com/NASA" }
  ],
  "maxPosts": 100,
  "enableDedup": true,
  "refreshWindowDays": 7
}
```

### Output example

```json
{
  "postId": "1084920485123456",
  "postUrl": "https://www.facebook.com/zuck/posts/1084920485123456",
  "postText": "Excited to share what we've been working on. More details coming soon.",
  "authorName": "Mark Zuckerberg",
  "authorProfileUrl": "https://www.facebook.com/zuck",
  "timestamp": "2026-03-01T14:30:00.000Z",
  "commentCount": 8500,
  "reactionCount": 42000,
  "shareCount": 1250,
  "imageUrls": ["https://scontent.fudi1-1.fna.fbcdn.net/v/..."],
  "videoUrls": [],
  "sharedLinks": [],
  "hashtags": [],
  "pageUrl": "https://www.facebook.com/zuck",
  "pageName": "Mark Zuckerberg",
  "pageId": "4"
}
```

### Other CrowdPull Facebook scrapers

- **[Facebook Group Posts Scraper](https://apify.com/crowdpull/facebook-group-posts-scraper)** — extract posts from any public Facebook group
- **[Facebook Comment Scraper](https://apify.com/crowdpull/facebook-comment-scraper)** — extract comments where Facebook exposes them; optional cookies support signed-in-only surfaces
- **[Facebook Marketplace Scraper](https://apify.com/crowdpull/facebook-marketplace-scraper)** — extract listings from Facebook Marketplace by location with price filtering

### Cost estimate

This Actor uses **no browser** — just lightweight HTTP requests.

| Event | Cost |
|-------|------|
| Actor start | $0.005 (one-time per run) |
| Post extracted | $0.0035/post on Free; $0.003/$0.00225/$0.002/$0.0015/$0.001 on Bronze through Diamond |
| Cache check (Smart Scrape skip) | $0.001/post |

Volume discounts available at higher tiers.

### Is it legal to scrape Facebook pages?

Our scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our scrapers, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

### Limitations

- Only works with **public** pages and profiles (private profiles return 0 posts)
- Facebook may change internal APIs — report issues if extraction stops
- Facebook rate limits apply; residential proxies recommended
- Unavailable engagement counts are returned as `null`, not a misleading zero

### Session recovery and partial output

Feed requests retain the proxy and cookies used to acquire their tokens. A rate-limit refresh replaces that session together and resumes the same cursor. If later pagination fails after posts were collected, `OUTPUT.status` and the affected target status are `partial`; `partialTargets` counts them and the target retains its terminal error. The extracted rows remain available.

### Reliability update — September 21, 2026

An all-target login failure now fails the run; unavailable/deleted content remains a separate outcome. Server/transport recovery uses bounded backoff and refreshes tokens, cookies and proxy together before retrying the unfinished cursor. Explicit authentication restrictions stop recovery. Earlier posts remain available when later requests fail.

# Actor input Schema

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

One or more public Facebook page or profile URLs.

## `maxPosts` (type: `integer`):

Maximum number of posts to extract per page. Set to 0 for unlimited (scrape until end of feed).

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

Only extract posts newer than this date. Use ISO format (2024-01-15) or relative (7d, 30d, 6m, 1y). Leave empty for no date filter.

## `scrollDelay` (type: `integer`):

Delay between pagination requests in milliseconds. Increase if you experience rate limiting or empty results.

## `maxEmptyScrolls` (type: `integer`):

Stop after this many consecutive pages with no new posts.

## `enableDedup` (type: `boolean`):

Skip posts already scraped in previous runs. Uses a persistent cache per page.

## `refreshWindowDays` (type: `integer`):

Re-scrape posts from the last N days even if already cached, to capture updated comments/reactions. Set to 0 to never re-scrape cached posts.

## `debugMode` (type: `boolean`):

Save the first page HTML and GraphQL response to the run key-value store for troubleshooting. Leave off for normal runs.

## `proxyConfig` (type: `object`):

Proxy settings. Residential proxies recommended for Facebook.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/zuck"
    }
  ],
  "maxPosts": 20,
  "scrollDelay": 1500,
  "maxEmptyScrolls": 5,
  "enableDedup": false,
  "refreshWindowDays": 0,
  "debugMode": false,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `runSummary` (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/zuck"
        }
    ],
    "maxPosts": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("crowdpull/facebook-page-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/zuck" }],
    "maxPosts": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("crowdpull/facebook-page-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/zuck"
    }
  ],
  "maxPosts": 20
}' |
apify call crowdpull/facebook-page-posts-scraper --silent --output-dataset

```

## MCP server setup

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