# Facebook Posts Scraper - Pages & Date Range (`icoe-man/facebook-posts-scraper-old`) Actor

Scrape posts from public Facebook pages with a date range, page details and optional comments and replies. No login or cookies.

- **URL**: https://apify.com/icoe-man/facebook-posts-scraper-old.md
- **Developed by:** [Icoe Man](https://apify.com/icoe-man) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.60 / 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.
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 - Pages & Date Range

Collect the posts of any public Facebook page, with optional comments. Set a date range to get exactly the window you need. Built for competitor and brand monitoring, social listening, content research and reporting.

- Paste page links or usernames and get clean, flat JSON, CSV or Excel
- Date range for the feed and up to 300 posts per section
- Optional comments and replies for every post, in the same run
- No Facebook login, no cookies and no proxies to manage

### Why this one

| Advantage | What it means |
|---|---|
| Date range | Limit the feed with **Only posts newer than** and **Only posts older than** |
| Comments in the same run | Optional comments and replies, linked to each post by `postId` |
| Reaction breakdown | Like, love, care, haha, wow, sad and angry counts per post |
| Free page details | One `page` row per page with followers, likes and categories, at no charge |
| No login | No Facebook account, cookies or proxies needed |

### What you get

```json
{
  "platform": "facebook",
  "type": "post",
  "id": "1200000000000001",
  "url": "https://www.facebook.com/1200000000000001",
  "section": "feed",
  "postType": "image",
  "text": "Our new store opens this Saturday. See you there!",
  "language": "en",
  "createdAt": "2026-10-15T15:30:00.000Z",
  "author": { "id": "100000000000001", "username": "examplepage", "name": "Example Page", "profileUrl": "https://www.facebook.com/examplepage" },
  "reactionCount": 342,
  "reactions": { "like": 290, "love": 41, "care": 3, "haha": 2, "wow": 5, "sad": 0, "angry": 1 },
  "commentCount": 57,
  "shareCount": 12,
  "imageUrls": ["https://image-cdn.example/post-1200000000000001.jpg"],
  "videoUrl": null,
  "thumbnailUrl": null,
  "link": null,
  "hashtags": [],
  "mentionedProfileIds": [],
  "scrapedAt": "2026-10-17T16:09:00.000Z"
}
```

Each page also returns one free `page` row with its name, categories, description, follower and like counts, website and verified flag. With **Include comments** on, each post's comments follow as `comment` rows (and their replies as `reply` rows, with **Include replies**), linked by `postId`.

### How to use it

1. Add one or more pages: `facebook.com/PAGE`, `facebook.com/profile.php?id=ID` or just the page username or id.
2. Set **Max posts per page**. The page's feed is collected by default. If you also pick reviews or mentions under **Sections**, for pages that show them, the limit applies to each section.
3. Optional: set **Only posts newer than** and **Only posts older than** (for example `30 days` or `2026-09-01`) to limit the feed to a date range, and turn on **Include comments**. Relative values are rounded down to the start of that UTC day (hours to the start of the hour), so runs on the same day use the same window.
4. Run it. Posts we collected recently arrive instantly. New pages take 1-5 minutes each, and up to 3 pages are processed in parallel.

Calling it from an AI agent or with a short timeout? Start the run asynchronously and fetch the dataset when it finishes, or turn on **Previously collected data only** for an instant answer.

### Pricing

Pay only for what you get:

| | Free | Starter | Scale | Business |
|---|---|---|---|---|
| Per 1,000 posts | $4.00 | $3.50 | $3.00 | $2.60 |
| Per 1,000 comments | $1.25 | $1.05 | $0.90 | $0.75 |
| Per post with comments | $0.005 | $0.005 | $0.005 | $0.005 |
| Per page processed | $0.025 | $0.025 | $0.025 | $0.025 |

Reviews and mentions are billed as posts. The page fee is charged once per page, and the page details row is free. With **Include comments** on, every post also carries the per-post comment fee, even when it has no comments. Pages that cannot be collected are not charged. Fees are charged as data is delivered: the page fee comes with a page's first post, or at the end for a page with none, so a page that is still pending or fails before its first post is never charged.

**Example:** 1,000 posts from 40 pages on the Starter plan cost 1,000 × $0.0035 + 40 × $0.025 = **$4.50**. Adding up to 10 comments per post (10,000 comments) adds 10,000 × $0.00105 + 1,000 × $0.005 = **$15.50**.

Use **Maximum cost per run** in the run options to cap your spend. The Actor stops cleanly at that limit.

**Free plan:** you get previously collected posts plus a small live allowance each day. Any paid Apify plan removes the limit.

### FAQ

#### Is scraping Facebook posts legal?

This Actor collects publicly visible posts, reviews and comments only. Personal data is protected by laws such as GDPR, so only collect what you have a legitimate reason to process, and consult your lawyer if unsure.

#### How fresh is the data?

The input form starts at 24 hours, so posts we collected in the last day come back instantly and the rest are collected live. API calls that leave it out also use 24 hours. The prefilled example may be answered from data up to 30 days old, so it finishes instantly. Higher values reuse older collected data (up to 720 hours). Set **Reuse data collected within** to 0 to always collect live.

#### Can I use it via API, Make, Zapier or n8n?

Yes. Use the Apify API or any Apify integration. Each run's results are in its default dataset, and `OUTPUT` in the key-value store has a per-page summary.

#### Can I collect a page's reviews or mentions?

Optionally, for pages that show them: pick them under **Sections**. They come back as `post` rows with `section` set to `reviews` or `mentions`. Many pages do not show these tabs publicly, so these sections are often empty, and the page fee still applies.

#### Do the date filters apply to reviews and mentions?

**Only posts newer than** applies to every selected section, reviews and mentions included. **Only posts older than** applies to the feed only.

#### Why did a page return fewer posts than I asked for?

**Max posts per page** is a maximum. A date range, or a page with fewer posts, returns less. A very large request for one page (many posts, each with many comments) is trimmed to the latest posts that fit, and `OUTPUT` then shows a note starting with "Large request".

#### Why do I get fewer comments than `commentCount`?

Facebook shows a most-relevant selection of comments, often far fewer than the total it reports, and **Max comments per post** counts replies too.

#### How many pages fit in one run?

Up to 200. Live collection is capped per run: all 200 new pages fit at 25 posts each, or about 110 at 25 posts with 24 comments each. Further pages get previously collected data, which may be older, or are marked limited in `OUTPUT`, so split bigger lists across runs.

#### Can I use it from an AI agent or MCP server?

Yes. Connect through the Apify MCP server at mcp.apify.com or call the Apify API. Live collection can take minutes, so start long runs asynchronously and fetch the dataset when the run finishes. For an instant answer, turn on **Previously collected data only**.

#### Why did I get no results?

Common reasons: the page is private, deleted or misspelled; the page has no posts in your date range, or no public reviews or mentions; on the free plan, the daily live allowance was used up; or the run reached your **Maximum cost per run**. A page that shows no public details or posts (for example a restricted or renamed one) is reported as `unavailable` and is not charged. The run's `OUTPUT` record in the key-value store lists a status and note for each page. A `pending` status means the source is still collecting that page, or another request is collecting it right now: it is not charged, so run it again later. `partial` means the run stopped before its timeout with part of it delivered; run it again with a longer timeout to get all of it.

### Related Actors

- [Facebook Comments Scraper - Reaction Breakdown](https://apify.com/icoe-man/facebook-comments-scraper)
- [Facebook Reels Scraper - Video URLs & Engagement](https://apify.com/icoe-man/facebook-reels-scraper)
- [Facebook Groups Scraper - Posts by Date](https://apify.com/icoe-man/facebook-groups-scraper)
- [Facebook Posts Search Scraper - Bulk Keywords](https://apify.com/icoe-man/facebook-posts-search-scraper)
- [Social Media Comments Scraper - FB, IG, TikTok, Reddit](https://apify.com/icoe-man/social-media-comments-scraper)
- [Instagram Comments Scraper - Profiles & Date Range](https://apify.com/icoe-man/instagram-comments-scraper)
- [TikTok Comments Scraper - Profiles & Date Range](https://apify.com/icoe-man/tiktok-comments-scraper)
- [Reddit Scraper - Posts & Comment Threads](https://apify.com/icoe-man/reddit-scraper)
- [Reddit Comments Scraper - Full Threads & Depth](https://apify.com/icoe-man/reddit-comments-scraper)

**Something is wrong?** Open an issue in the Issues tab. We usually respond within 24 hours.

# Actor input Schema

## `pageUrls` (type: `array`):

Links to public Facebook pages (https://www.facebook.com/NASA or profile.php?id=...), or just the page username or id, one per line. Up to 200 per run.

## `sections` (type: `array`):

Which parts of each page to collect: the page's own posts (feed) and, for pages that show them, its reviews and the posts that mention it. Reviews and mentions are often empty. Max posts per page applies to each section separately.

## `maxPostsPerPage` (type: `integer`):

How many posts to collect from each selected section of each page, so 2 sections give up to twice this number. Each post is billed, plus a small fee per page.

## `onlyNewerThan` (type: `string`):

Skip posts published before this date, in every selected section. Use a date like 2026-01-31 or a relative value like "7 days". Relative values are rounded down to the start of that UTC day (hours to the start of the hour), so runs on the same day use the same window.

## `onlyOlderThan` (type: `string`):

Feed only: skip posts published after this date, e.g. 2026-06-30 or "1 month". Relative values are rounded down to the start of that UTC day (hours to the start of the hour), so runs on the same day use the same window. Combine both fields for a date range.

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

Also collect the comments of every post. Each comment is billed, plus a small fee per post whose comments we collect.

## `maxCommentsPerPost` (type: `integer`):

How many comments (and replies, if enabled) to collect per post when Include comments is on. Facebook shows a most-relevant selection, often fewer than the post's comment count. Up to 24 is fastest.

## `includeReplies` (type: `boolean`):

Also collect replies to comments when Include comments is on. Replies count toward the comment limit.

## `maxDataAgeHours` (type: `integer`):

If we collected these posts within this many hours, you get them instantly at the same price. Use 0 to always collect fresh data.

## `cacheOnly` (type: `boolean`):

Return only posts we already collected, without waiting for live collection. Useful for AI agents with short timeouts.

## Actor input object example

```json
{
  "pageUrls": [
    "https://www.facebook.com/NASA"
  ],
  "sections": [
    "feed"
  ],
  "maxPostsPerPage": 5,
  "includeComments": false,
  "maxCommentsPerPost": 24,
  "includeReplies": false,
  "maxDataAgeHours": 24,
  "cacheOnly": false
}
```

# Actor output Schema

## `posts` (type: `string`):

No description

## `summary` (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 = {
    "pageUrls": [
        "https://www.facebook.com/NASA"
    ],
    "maxPostsPerPage": 5,
    "maxDataAgeHours": 24
};

// Run the Actor and wait for it to finish
const run = await client.actor("icoe-man/facebook-posts-scraper-old").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 = {
    "pageUrls": ["https://www.facebook.com/NASA"],
    "maxPostsPerPage": 5,
    "maxDataAgeHours": 24,
}

# Run the Actor and wait for it to finish
run = client.actor("icoe-man/facebook-posts-scraper-old").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 '{
  "pageUrls": [
    "https://www.facebook.com/NASA"
  ],
  "maxPostsPerPage": 5,
  "maxDataAgeHours": 24
}' |
apify call icoe-man/facebook-posts-scraper-old --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,icoe-man/facebook-posts-scraper-old"
        }
    }
}
```

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/KkYJUbTAfQoSXMJKr/builds/anmfhoL7ZOt0xlPqx/openapi.json
