# Facebook Scraper All in One (Posts, Pages, Photos & Media) (`doorma_10/facebook-posts-scraper`) Actor

The fastest, most cost-effective Facebook data extraction engine: scrape posts, rich page & profile details, photos tabs, video stream details, event cards, reaction breakdowns, and comments without login under 512MB RAM.

- **URL**: https://apify.com/doorma_10/facebook-posts-scraper.md
- **Developed by:** [Doorman Data Labs](https://apify.com/doorma_10) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.20 / 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 All-in-One Scraper (Posts, Pages, Profiles, Photos & Media)

> **The ultimate 4-in-1 Facebook data extraction engine on Apify.** Scrape timeline posts, complete page & profile details, high-resolution photo galleries, reels, event cards, and video transcripts without login or cookies. Powered by pure HTTP Relay GraphQL for unmatched speed under 512MB RAM.

***

### 💡 Why Choose This Scraper Over Official & Competing Actors?

| Feature / Metric | 🚀 This Scraper (All-in-One) | 🏢 Apify Official (`apify/facebook-...`) | 🐌 Generic Browser Scrapers |
| :--- | :--- | :--- | :--- |
| **Price per 1,000 Items** | **$2.60** (Down to **$2.20** on Gold+) | **$5.00 – $12.00+** | $3.00 – $6.00 + Heavy Compute Units |
| **Platform & Proxy Costs** | **Included ($0.00 extra)** | Included or Extra Proxy Costs | Billed separately (High proxy bills) |
| **Actor Start Fee** | **$0.002** | $0.001 per run | $0.005 per run |
| **Date Range Filter Cost** | **$0.00 (FREE)** | **+$0.002 / post extra** ($2.00/1k surcharge) | Inefficient (scrolls through years) |
| **4-in-1 Capabilities** | **Posts + Pages + Photos + Profiles in 1 tool** | Requires 3 separate paid scrapers | Single-purpose only |
| **RAM Footprint** | **~105 – 150 MB** (Runs on 512MB tier) | 1,024 – 2,048 MB | 2,048 – 4,096 MB (High OOM risk) |
| **Speed / Throughput** | **50+ items / second** (Pure HTTP) | 5 – 15 items / second | 0.5 – 2 items / second |
| **Session Requirements** | **100% Guest / Cookie-Free** | Guest or Cookie-based | Requires risky Facebook accounts |
| **Duplicate Prevention** | **Native Monitoring Mode (Incremental)** | Manual deduplication | None (Bills repeatedly for duplicates) |

***

### 🗂️ 4 Flexible Extraction Modes (`scrapeMode`)

Choose exactly what data you need with a single selector:

1. **`posts` (Default)**: Walk any public Page or Profile timeline. Each row contains the post body, 7-reaction breakdown, comments count, share count, permalinks, media CDN links, and **page follower & engagement metrics**.
2. **`photos`**: Walk the `/photos` tab directly to extract full galleries: direct high-res CDN images, dimensions (`width` x `height`), thumbnails, and Facebook AI OCR text.
3. **`details`**: Extract rich page & profile metadata (business categories, contact emails, phone numbers, websites, follower counts, check-ins, ratings, and Ad Library status).
4. **`all`**: **The All-in-One Powerhouse**. In a single run, extracts the page details, the recent timeline posts, and the photo gallery.

***

### 📦 What Data Can You Extract?

#### 1. Facebook Page & Profile Details (`scrapeMode: "details"` or `"all"`)

- **General Info**: Title, Page Name, Page ID, canonical URL, verification badge.
- **Categories & Classification**: Accurate detection of Pages (`["Page", "Science Website"]`) vs Personal Profiles (`["Profile"]`).
- **Metrics**: Total Likes, Followers, Talking About this, and Check-ins.
- **Contact Details**: Public email addresses, phone numbers, primary website, websites list, and direct Messenger link (`https://m.me/...`).
- **Visual Assets**: Full-resolution profile picture URL, cover photo URL, and direct profile photo permalink.
- **Meta Ads Library**: Active advertising status (`ad_status`) and business `pageAdLibrary` ID.
- **Ratings & History**: Star rating (`4.8 out of 5`) or recommendation percentage (`94% recommend`), review count, and page creation date.

#### 2. Timeline Posts, Reels & Media (`scrapeMode: "posts"` or `"all"`)

- **Core Post**: Post ID, canonical URL, text content, publication ISO timestamp, and author profile details.
- **Page Metrics on Every Post**: `pageFollowers`, `pageLikes`, and ready-made `engagementRate` on every row at no extra cost.
- **7 Reactions Breakdown**: Individual counts for `like`, `love`, `care`, `haha`, `wow`, `sad`, and `angry` alongside total `reactions` and `topReactionsCount`.
- **Media & Albums**: High-res CDN image URLs, albums, thumbnails, OCR text, and accessibility alt text.
- **Video Metadata**: Video view counts, play counts, video duration in seconds, and auto-generated transcripts (`captionText`).
- **Rich Attachments**: External link cards (`linkPreview`), event cards (`event`), and original shared post details on reshares (`sharedPost`).

#### 3. Photos Tab (`scrapeMode: "photos"` or `"all"`)

- **Gallery Image**: Photo ID, permalink, full-resolution image URL, preview thumbnail, dimensions (`width`, `height`), and Facebook OCR caption.

***

### 📘 Output Samples

#### Page Details Output

```json
{
  "facebookUrl": "https://www.facebook.com/cern",
  "title": "CERN",
  "pageId": "100064792144187",
  "pageName": "cern",
  "categories": ["Page", "Community Organization"],
  "likes": 900666,
  "followers": 900666,
  "talkingAbout": 14905,
  "checkins": 117579,
  "intro": "CERN is the European laboratory for particle physics, home to the LHC.",
  "messenger": "https://m.me/cern",
  "website": "home.cern",
  "websites": ["https://home.cern"],
  "ad_status": "This Page is not currently running ads.",
  "pageAdLibrary": {
    "is_business_page_active": false,
    "id": "100064792144187"
  },
  "profilePictureUrl": "https://scontent...fbcdn.net/...",
  "coverPhotoUrl": "https://scontent...fbcdn.net/...",
  "isProfile": false,
  "verified": true
}
```

#### Timeline Post Output

```json
{
  "facebookUrl": "https://www.facebook.com/cern",
  "postId": "1575191857983871",
  "url": "https://www.facebook.com/cern/posts/pfbid037XxDmTUVvwjTwL9qt1W1YdX2VArNbCJLjuQos1s2dD2DnXzrhgWskGxTiH18iwgHl",
  "time": "2026-11-11T13:06:17.000Z",
  "timestamp": 1794402377,
  "user": {
    "id": "100064792144187",
    "name": "CERN",
    "profileUrl": "https://www.facebook.com/cern",
    "profilePic": "https://scontent...fbcdn.net/..."
  },
  "pageFollowers": 900666,
  "pageLikes": 900666,
  "engagementRate": 0.0184,
  "text": "Art and science come together #AtCERN💫\n\nCERN is delighted to announce...",
  "likes": 53,
  "comments": 4,
  "shares": 2,
  "reactions": 53,
  "topReactionsCount": 53,
  "reactionLikeCount": 53,
  "reactionBreakdown": { "like": 53, "love": 0, "haha": 0, "wow": 0, "sad": 0, "angry": 0 },
  "media": [
    {
      "type": "album",
      "__typename": "Photo",
      "url": "https://scontent...fbcdn.net/...",
      "thumbnail": "https://scontent...fbcdn.net/...",
      "ocrText": "May be an image of text"
    }
  ],
  "link": "https://home.cern/...",
  "isVideo": false
}
```

***

### ⚙️ Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `startUrls` | `array` | *Required* | Facebook Page URLs, Profile URLs, direct post permalinks, reels, videos, or share links. |
| `scrapeMode` | `string` | `"posts"` | Extraction mode: `"posts"`, `"photos"`, `"details"`, or `"all"`. |
| `maxPosts` | `integer` | `100` | Maximum number of posts to extract per target. |
| `maxPhotos` | `integer` | `100` | Maximum number of photos to extract from the photos tab. |
| `onlyPostsNewerThan` | `string` | — | Scrape posts published on or after this date (`YYYY-MM-DD` or relative like `3 months`). Stops automatically when reached. |
| `onlyPostsOlderThan` | `string` | — | Scrape posts published on or before this date (`YYYY-MM-DD`). |
| `monitoringMode` | `boolean` | `false` | When enabled, skips posts delivered in earlier runs using Apify Key-Value store. Pay only for newly published posts! |
| `captionText` | `boolean` | `false` | Extract video captions / transcripts when available. |
| `scrapeComments` | `boolean` | `false` | Extract top public comments for each post. |
| `proxyConfiguration` | `object` | `RESIDENTIAL` | Integrated residential proxy support with automatic country rotation. |

***

### 💰 Transparent, All-Inclusive Pricing (Pay Per Event)

All platform compute and residential proxy costs are **included** — you never receive surprise proxy or compute bills.

| Apify Plan Tier | Price per 1,000 Results | Price per Result | Savings vs Apify Official ($5–$12/1k) |
| :--- | :---: | :---: | :---: |
| **Free / No Discount** | **$2.60** | $0.0026 | **48% – 78% cheaper** |
| **Bronze Discount** | **$2.40** | $0.0024 | **52% – 80% cheaper** |
| **Silver Discount** | **$2.30** | $0.0023 | **54% – 81% cheaper** |
| **Gold / Platinum / Diamond** | **$2.20** | $0.0022 | **56% – 82% cheaper** |

- **Actor Start (`apify-actor-start`):** **$0.002** per run.
- **Date Range Filtering:** **$0.00 (FREE)** — zero surcharge for `onlyPostsNewerThan` / `onlyPostsOlderThan`.
- **Free Trial Allowance:** Every Apify account receives **$5.00 USD/month in free platform credits**, allowing you to scrape **~1,920 results every month completely free**.
- **No Wasted Charges:** Restricted, empty, or failed pages produce zero dataset items and cost **$0.00** in result charges. Use `monitoringMode: true` on scheduled runs to skip previously delivered posts and pay only for new content.

***

### 🚀 Quickstart via API

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
    "startUrls": [{"url": "https://www.facebook.com/humansofnewyork/"}],
    "scrapeMode": "posts",
    "maxPosts": 50,
}

run = client.actor("doorma_10/facebook-posts-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["text"][:80], "| Likes:", item.get("likes"))
```

#### Node.js (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('doorma_10/facebook-posts-scraper').call({
  startUrls: [{ url: 'https://www.facebook.com/cern' }],
  scrapeMode: 'all',
  maxPosts: 25,
  maxPhotos: 25,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} items successfully!`);
```

***

### ❓ Frequently Asked Questions (FAQ)

##### Do I need to provide Facebook cookies or an account?

No. The scraper operates in 100% guest mode using Facebook's internal Relay GraphQL preloader protocol. You never risk your personal or business accounts.

##### How do I export to CSV, Excel, or Google Sheets?

Once your run finishes, go to the **Storage** tab in your Apify Console run. Click **Export** to download your data in JSON, CSV, Excel (XLSX), XML, or HTML.

##### Can I schedule this scraper to run automatically?

Yes. Use Apify's **Schedules** tab to run daily, weekly, or hourly. Turn on `monitoringMode: true` so each scheduled run only collects new posts since the last run.

# Actor input Schema

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

List of Facebook Page, Profile, or direct Post URLs to scrape (e.g. https://www.facebook.com/humansofnewyork/, https://www.facebook.com/zuck, or direct post permalinks, reels, videos, photos, and share links).

## `scrapeMode` (type: `string`):

Extraction mode: 'posts' (timeline feed with page metrics), 'photos' (photos tab), 'details' (rich page/profile info only), or 'all' (all-in-one: page details + posts + photos).

## `mode` (type: `string`):

Alias for scrapeMode ('posts', 'photos', 'details', 'all').

## `monitoringMode` (type: `boolean`):

When enabled, remembers previously seen post and photo IDs in an Apify Named Key-Value store (fb-posts-monitor-store) to prevent duplicates and only output newly published items on scheduled runs.

## `resultsLimit` (type: `integer`):

Maximum number of posts to extract per target page or profile. Alias for maxPosts.

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

Maximum number of posts to extract per target page or profile.

## `maxPhotos` (type: `integer`):

Maximum number of photos to extract from the photos tab when in 'photos' or 'all' scrape mode.

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

Scrape posts published ON or AFTER this date (ISO 8601 string or YYYY-MM-DD, e.g. 2024-01-01). Alias for sinceDate.

## `sinceDate` (type: `string`):

Scrape posts published ON or AFTER this date (ISO 8601 string or YYYY-MM-DD, e.g. 2025-01-01). Posts older than this will trigger early termination to conserve proxy bandwidth.

## `onlyPostsOlderThan` (type: `string`):

Scrape posts published ON or BEFORE this date (ISO 8601 string or YYYY-MM-DD, e.g. 2024-12-31). Alias for untilDate.

## `untilDate` (type: `string`):

Scrape posts published ON or BEFORE this date (ISO 8601 string or YYYY-MM-DD, e.g. 2026-02-01). Newer posts will be skipped.

## `captionText` (type: `boolean`):

When enabled, extracts auto-generated closed captions, transcripts, and subtitles for attached videos. Alias for scrapeVideoTranscripts.

## `scrapeVideoTranscripts` (type: `boolean`):

When enabled, extracts auto-generated closed captions, transcripts, and subtitles for attached videos.

## `scrapeComments` (type: `boolean`):

When enabled, extracts top comments for each post (author, text, creation time, likes).

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

Apify Proxy configuration. RESIDENTIAL proxies with automatic country rotation are strongly recommended for seamless Facebook guest extraction without rate-limiting.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/humansofnewyork/"
    }
  ],
  "scrapeMode": "posts",
  "monitoringMode": false,
  "resultsLimit": 100,
  "maxPosts": 100,
  "maxPhotos": 100,
  "captionText": false,
  "scrapeVideoTranscripts": false,
  "scrapeComments": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped posts, page/profile details, and photos in JSON, CSV, or Excel format.

## `runSummary` (type: `string`):

Execution summary including total items scraped, scrape mode, duration, throughput, and RAM usage.

# 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/humansofnewyork/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("doorma_10/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 = { "startUrls": [{ "url": "https://www.facebook.com/humansofnewyork/" }] }

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

```

## MCP server setup

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