# Scrape Facebook Page Posts by Page ID - Cookieless (`patient_discovery/facebook-page-posts`) Actor

Extract Facebook page posts without login or cookies. Get post content, reactions breakdown, comments, shares, timestamps, media attachments, and author details in JSON or CSV. Ideal for engagement analysis, competitor research, content strategy, and social media intelligence at scale.

- **URL**: https://apify.com/patient_discovery/facebook-page-posts.md
- **Developed by:** [Surge Street](https://apify.com/patient_discovery) (community)
- **Categories:** Social media, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 111 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/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 - No Login Required**

## **What does this scraper do?**

This actor extracts posts from any public Facebook page using the page ID.

Enter a page ID, run the actor, and receive structured post data including message content, reactions breakdown, comments count, share count, timestamps, and media attachments.

No Facebook login, no cookies, no session handling required.

Cookieless architecture ensures stable, risk-free, and scalable automation.

## **Why scrape Facebook page posts?**

Facebook page posts contain valuable engagement signals and content performance insights. This helps marketers, analysts, and strategists to:

- Track engagement patterns across competitor pages
- Analyze reactions breakdown and audience sentiment
- Identify high-performing content formats
- Monitor posting frequency and timing strategies
- Benchmark brand performance across industries
- Build structured datasets for content intelligence
- Power data-driven social media strategies

Its cookieless design fits scalable data pipelines without needing Facebook accounts.

## **How much will scraping cost?**

The pricing for this actor is **$2.50 per 1,000 scraped results**. Refer to the pricing page.

Because this actor does not require login or session management, it reduces operational complexity and lowers the risk associated with account-based scraping. This predictable architecture keeps your data pipelines highly stable.

## **How to use the scraper**

Here is a **step-by-step guide**:

**Step 1: Open the actor:** Go to your Apify Console and open the scraper.

**Step 2: Enter your input parameters:** In the input field, enter the numeric `pageId` of the Facebook page.

**Step 3: Configure extraction depth:** Set optional limits such as maximum number of posts to extract.

**Step 4: Start the run:** Click Start to begin scraping. The actor will extract publicly available page posts.

**Step 5: Export or integrate:** Once complete, download the dataset in JSON, CSV, or connect it via API to your analytics or BI tools.

## **Input parameters**

Below are the configuration options you can use to control the scraper.

**Input example**

```json
{
  "pageId": "61553294532484",
  "maxPosts": 200
}
```

| Field | Type | Description |
|-------|------|-------------|
| pageId | String | Numeric Facebook Page ID found in the page URL |
| maxPosts | Number | Maximum number of posts to extract |

## **What data does this scraper extract?**

**Formats**: JSON, CSV, Excel

**Extracted Fields**:

- `post_id` - Unique post identifier
- `type` - Post classification
- `url` - Direct link to the post
- `message` - Full text content
- `message_rich` - Rich formatted message
- `timestamp` - Unix timestamp of publication
- `comments_count` - Total comments
- `reactions_count` - Total reactions
- `reshare_count` - Number of shares
- `reactions` - Breakdown (like, love, care, haha, wow, sad, angry)
- `author.id` - Author ID
- `author.name` - Author name
- `author.url` - Author page link
- `author.profile_picture_url` - Author profile image
- `image` - Attached image URL
- `video` - Video metadata
- `video_thumbnail` - Video preview image
- `external_url` - Linked external content
- `attached_post` - Shared post data

All data is returned as structured JSON with null-safe fields for reliable downstream processing.

### Sample Output

```json
{
  "post_id": "987654321098765",
  "type": "post",
  "url": "https://www.facebook.com/permalink.php?story_fbid=pfbid0XyZ123&id=987654321",
  "message": "Excited to announce our new product launch! Check out the features that will transform your workflow.",
  "message_rich": "Excited to announce our new product launch! Check out the features that will transform your workflow.",
  "timestamp": 1702915200,
  "comments_count": 127,
  "reactions_count": 1543,
  "reshare_count": 89,
  "reactions": {
    "angry": 3,
    "care": 45,
    "haha": 12,
    "like": 982,
    "love": 487,
    "sad": 1,
    "wow": 13
  },
  "author": {
    "id": "987654321",
    "name": "Tech Innovations Co",
    "url": "https://www.facebook.com/techinnovationsco",
    "profile_picture_url": "https://scontent.xx.fbcdn.net/v/t39.30808-1/profile_pic.jpg"
  },
  "image": "https://scontent.xx.fbcdn.net/v/t39.30808-6/product_image.jpg",
  "video": null,
  "external_url": "https://www.example.com/product-launch"
}
```

All data is delivered in structured JSON format suitable for engagement analysis, competitor benchmarking, social media reporting, and content performance research.

## **Key Features:**

- 📈 Extract Facebook page posts at scale
- 📊 Capture reactions breakdown and engagement metrics
- ⚡ Structured JSON output ready for analytics and automation
- 📈 Retrieve full author profile metadata
- 📊 Export-ready formats including JSON, CSV, and Excel
- ⚡ Scalable architecture for bulk page post extraction
- 🔒 Fully cookieless architecture with no login required

## **FAQs**

**Does this scraper require Facebook login?** No. It is fully cookieless and does not require login credentials.

**Can it scrape private pages?** No. Only publicly accessible Facebook pages can be extracted.

**Can I extract posts from multiple pages?** Yes. Run separate executions for different page IDs or integrate via API for bulk processing.

**Other Facebook scrapers that you may find useful:**

[Facebook Page Search Scraper](https://apify.com/patient_discovery/facebook-search-pages)

[Facebook Group Posts Scraper](https://apify.com/patient_discovery/facebook-group-posts)

[Facebook Search Events Scraper](https://apify.com/patient_discovery/facebook-search-events)

[Facebook Page Details Scraper](https://apify.com/patient_discovery/facebook-page-details)

[Facebook Marketplace Details Scraper](https://apify.com/patient_discovery/facebook-marketplace-details)

[Facebook Page Reviews Scraper](https://apify.com/patient_discovery/facebook-page-reviews)

[Facebook Page Posts Scraper](https://apify.com/patient_discovery/facebook-page-posts)

[Facebook Search People Scraper](https://apify.com/patient_discovery/facebook-search-people)

# Actor input Schema

## `pageId` (type: `string`):

Page ID of the Facebook page to fetch posts from

## `maxPages` (type: `integer`):

Maximum number of pages to fetch (pagination handled automatically)

## Actor input object example

```json
{
  "pageId": "100064860875397",
  "maxPages": 1
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("patient_discovery/facebook-page-posts").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("patient_discovery/facebook-page-posts").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 '{}' |
apify call patient_discovery/facebook-page-posts --silent --output-dataset

```

## MCP server setup

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

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/acPprdHruCgpobBiV/builds/6cPwT1JTQkHPR3ULg/openapi.json
