# Facebook Pages Scraper: Posts, Pages & Comments (`subimpact/facebook-pages-scraper`) Actor

Public Facebook Pages without login: page info with exact follower counts, the latest posts with text, reactions, comments, shares and media, and single post pages with visible comments. No cookies, no browser. $1.00 per 1,000 posts.

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

## Pricing

from $1.00 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Pages Scraper: Page Info, Posts & Comments

Scrape public Facebook Pages without logging in. Give it a page and it returns the page details plus the
posts that the page shows to a logged out visitor (about 20 per page). Give it a single post link and it
also returns the comments that the post page shows.

No login, no cookies, no API key, no browser. Plain HTTP requests to facebook.com.

### What you get

- **Page rows:** page name, page id, page URL, category, verified flag, followers, talking about, were
  here, description text, profile picture URL and how many posts the page carried.
- **Post rows:** post id, permalink, text, creation time, reactions, comments, shares, video views, media
  type, image URLs, and the page it came from.
- **Comment rows:** author name, text, creation time, reactions and the post they belong to (from single
  post links).

### Input

The default run reads NASA and BBC News:

```json
{
  "pageUrls": ["https://www.facebook.com/NASA", "https://www.facebook.com/bbcnews"],
  "maxPostsPerPage": 20,
  "maxItems": 200,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

`pageUrls` accepts a page name (`NASA` or `@NASA`), a page link (`https://www.facebook.com/NASA`) or a
numeric page link (`https://www.facebook.com/profile.php?id=100044561550831`).

`postUrls` takes single post, video or photo links:

```json
{
  "pageUrls": [],
  "postUrls": ["https://www.facebook.com/NASA/posts/pfbid09brqCCTZ2tMaqk582QcQo83AgQoc3s9xE5H82qkMQBsNokX3knkXckksXddVNhxfl"],
  "includeComments": true,
  "maxCommentsPerPost": 20
}
```

| Field | Default | What it does |
| --- | --- | --- |
| `pageUrls` | none (prefill NASA + bbcnews) | Public pages to read. One page row plus its latest posts each. |
| `postUrls` | none | Single post, video or photo links. One post row plus its visible comments each. |
| `maxPostsPerPage` | 20 | Posts to keep per page, 0 to 50. 0 gives the page row only. |
| `includeComments` | true | Deliver the visible comments of `postUrls`. |
| `maxCommentsPerPost` | 20 | Comments to keep per post link, 0 to 100. |
| `maxItems` | 200 | Hard cap on charged rows in one run. |
| `proxyConfiguration` | Apify datacenter proxy | Proxy for the requests. Direct requests also work. |

Give `pageUrls`, `postUrls`, or both. A run with `{}` reads `https://www.facebook.com/NASA`.

### Output

One page row, then one row per post, then one row per comment. Every row carries `rowType`, `status`,
`error` and `scrapedAt`.

Example page row (NASA, values from a real run):

```json
{
  "rowType": "page",
  "pageName": "NASA - National Aeronautics and Space Administration",
  "pageId": "100044561550831",
  "pageUrl": "https://www.facebook.com/NASA",
  "category": "Government organization",
  "verified": true,
  "followers": 28737151,
  "talkingAbout": 69720,
  "wereHere": null,
  "about": "Explore the universe and discover our home planet. \nThere's space for everybody. ✨",
  "profilePictureUrl": "https://lookaside.fbsbx.com/lookaside/crawler/media/?media_id=100044561550831",
  "postsInPage": 20,
  "status": "ok",
  "error": null,
  "inputValue": "https://www.facebook.com/NASA",
  "scrapedAt": "2026-10-30T12:00:00.000Z"
}
```

Example post row:

```json
{
  "rowType": "post",
  "postId": "1670768087751894",
  "postUrl": "https://www.facebook.com/NASA/videos/4075684206061398/",
  "pageName": "NASA - National Aeronautics and Space Administration",
  "pageId": "100044561550831",
  "text": "NASA astronaut Anil Menon and Canadian Space Agency astronaut Joshua Kutryk are getting ready to head out of the International Space Station!",
  "createdAt": "2026-10-29T11:49:38.000Z",
  "reactions": 479,
  "comments": 47,
  "shares": 57,
  "videoViews": 7303,
  "mediaType": "video",
  "imageUrls": ["https://lookaside.fbsbx.com/lookaside/crawler/media/?media_id=4075684206061398&get_thumbnail=1"],
  "videoUrl": null,
  "linkUrl": null,
  "sourcePage": "https://www.facebook.com/NASA",
  "sourcePostUrl": null,
  "status": "ok",
  "error": null,
  "scrapedAt": "2026-10-30T12:00:00.000Z"
}
```

Example comment row (from a single post link):

```json
{
  "rowType": "comment",
  "commentId": "Y29tbWVudDoxNjcwMTc3NzExMTQ0MjY1XzExMTUwODQwODQyMjcyNTY=",
  "postId": "1670177711144265",
  "postUrl": "https://www.facebook.com/NASA/posts/pfbid09brqCCTZ2tMaqk582QcQo83AgQoc3s9xE5H82qkMQBsNokX3knkXckksXddVNhxfl",
  "authorName": "AI Explorer - Future Creators",
  "text": "Hearing a crew describe a year in a Mars simulation makes the daily teamwork and problem-solving side of space exploration feel real for young learners.",
  "createdAt": "2026-10-29T04:49:01.000Z",
  "reactions": 2,
  "status": "ok",
  "error": null,
  "scrapedAt": "2026-10-30T12:00:00.000Z"
}
```

Counts (`reactions`, `comments`, `shares`, `videoViews`, `followers`) are the numbers the page shows to a
logged out visitor. `comments` is the count the post page reports and can be higher than the number of
comment rows, because facebook.com only renders a subset of comments.

### Pricing

Pay per result, charged after the row is in your dataset:

- **Page:** $2.00 per 1,000 pages ($0.002 each).
- **Post:** $1.00 per 1,000 posts ($0.001 each).
- **Comment:** $0.50 per 1,000 comments ($0.0005 each).

No start fee. Rows with `status: "not_found_or_login_wall"` or `"error"` are free. The default run (2 pages,
20 posts each) costs about $0.044 plus Apify platform usage. The buyer pays platform usage.

### How this compares

Free plan list prices checked on 2026-10-30. Their platform usage: see listing.

| Actor | Price | Users in 30 days |
| --- | --- | --- |
| apify/facebook-posts-scraper | $5.00 per 1,000 posts | 18,091 |
| apify/facebook-pages-scraper | $12.00 per 1,000 pages | 8,406 |
| apify/facebook-comments-scraper | $2.50 per 1,000 comments | 4,999 |
| this actor | $1.00 per 1,000 posts, $2.00 per 1,000 pages, $0.50 per 1,000 comments | new, no start fee |

### Limits

- About 20 latest posts per page. facebook.com serves no deeper pagination to logged out requests, so older
  posts are not available.
- Public Pages only. No personal profiles, no groups, no Marketplace listings.
- Login gated, age restricted or region restricted pages come back as `not_found_or_login_wall` and are not
  charged.
- Only the comments the post page renders are available, and only for single post links. There are no
  further comment pages.
- `videoUrl` is null: facebook.com does not serve a direct video file to logged out requests. Video posts
  still carry their poster frame in `imageUrls` and their view count in `videoViews`.
- `followers`, `talkingAbout` and `wereHere` are parsed from the page description in English. If the page is
  served in another language those counts stay null instead of guessing.

### Responsible use

This actor reads public Pages only, with no login and no cookies. You are responsible for complying with
Meta's terms and with privacy law that applies to you. Do not use it to build profiles of private
individuals or to republish content you have no right to use.

# Actor input Schema

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

Public Facebook Pages to read. Any of these forms works: NASA, @NASA, https://www.facebook.com/NASA, https://www.facebook.com/profile.php?id=100044561550831. Each page gives one page row plus its latest posts. Give pageUrls, postUrls, or both.

## `postUrls` (type: `array`):

Facebook post, video or photo permalinks such as https://www.facebook.com/NASA/posts/<id>, https://www.facebook.com/NASA/videos/<id> or https://www.facebook.com/photo/?fbid=<id>. Each link gives that post plus, when Include comments is on, the comments the page shows. Leave empty to scrape only the pages above.

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

How many of a page's latest posts to deliver (0 to 50). 0 delivers the page row only. facebook.com serves about 20 posts per page with no deeper pagination, so asking for more does not fetch older posts.

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

For each single post link, also deliver the comments that the post page shows. Comments are charged as comment rows. Only the comments facebook.com renders are available; there are no further comment pages.

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

How many visible comments to keep for each single post link (0 to 100). 0 turns comments off without changing Include comments.

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

Hard cap on charged rows in one run: page rows plus post and comment rows (1 to 10000). The run stops cleanly when the cap is reached.

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

Apify datacenter proxy is the default and works for these pages. Direct requests (turn the proxy off) also returned data when this actor was built. A proxy failure fails the request and never falls back to a direct request.

## Actor input object example

```json
{
  "pageUrls": [
    "NASA",
    "https://www.facebook.com/PavilionKL"
  ],
  "postUrls": [
    "https://www.facebook.com/NASA/posts/pfbid09brqCCTZ2tMaqk582QcQo83AgQoc3s9xE5H82qkMQBsNokX3knkXckksXddVNhxfl"
  ],
  "maxPostsPerPage": 20,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `rowType` (type: `string`):

page for a page row, post for a post row, comment for a visible comment row

## `pageName` (type: `string`):

Page display name, e.g. NASA - National Aeronautics and Space Administration (page and post rows)

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

Numeric Facebook page id, e.g. 100044561550831 (page and post rows)

## `pageUrl` (type: `string`):

https://www.facebook.com/NASA (page rows)

## `category` (type: `string`):

Page category as facebook.com lists it, e.g. Government organization (page rows)

## `verified` (type: `string`):

True when the page carries the verified badge (page rows)

## `followers` (type: `string`):

Follower count from the page description (page rows)

## `talkingAbout` (type: `string`):

People talking about this count from the page description (page rows)

## `wereHere` (type: `string`):

Were here count from the page description, null when the page does not publish one (page rows)

## `about` (type: `string`):

The page description text after the counts, line breaks kept (page rows)

## `profilePictureUrl` (type: `string`):

Profile picture facebook.com serves to crawlers (page rows)

## `postsInPage` (type: `string`):

How many unique posts the page carried before maxPostsPerPage was applied (page rows)

## `postId` (type: `string`):

Facebook post id, e.g. 1670177711144265 (post rows)

## `postUrl` (type: `string`):

Permalink of the post, e.g. https://www.facebook.com/NASA/posts/pfbid... or /videos/<id>/ (post and comment rows)

## `commentId` (type: `string`):

Facebook comment id as the page encodes it (comment rows)

## `authorName` (type: `string`):

Display name of the comment author (comment rows)

## `text` (type: `string`):

Post or comment text as plain text, line breaks and emoji kept (post and comment rows)

## `createdAt` (type: `string`):

Publication time built from creation_time, ISO 8601 UTC (post and comment rows)

## `reactions` (type: `string`):

Reaction count the page shows (post and comment rows)

## `comments` (type: `string`):

Comment count the post page shows, which can be higher than the comments delivered (post rows)

## `shares` (type: `string`):

Share count the page shows (post rows)

## `videoViews` (type: `string`):

Video view count, null when the post is not a video or the page does not publish one (post rows)

## `mediaType` (type: `string`):

photo, video, link or text (post rows)

## `imageUrls` (type: `string`):

One URL per photo, or the video poster frame, empty when the post has no image (post rows)

## `videoUrl` (type: `string`):

Direct video file URL, null when facebook.com serves none to logged out requests (post rows)

## `linkUrl` (type: `string`):

Destination of the post link preview, null when the post has none (post rows)

## `sourcePage` (type: `string`):

Page URL whose page produced this row (post rows)

## `sourcePostUrl` (type: `string`):

Post URL the input asked for, for rows from postUrls (post rows)

## `status` (type: `string`):

ok, not_found_or_login_wall, error or skipped. Only ok rows are charged

## `error` (type: `string`):

Why the row carries no data, null on ok rows

## `inputValue` (type: `string`):

The page or link the buyer supplied for this row (page rows, and post rows for an unreadable input entry)

## `scrapedAt` (type: `string`):

When this row was scraped, ISO 8601 UTC

# 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",
        "https://www.facebook.com/bbcnews"
    ],
    "maxPostsPerPage": 20,
    "includeComments": true,
    "maxCommentsPerPost": 20,
    "maxItems": 200,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("subimpact/facebook-pages-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 = {
    "pageUrls": [
        "https://www.facebook.com/NASA",
        "https://www.facebook.com/bbcnews",
    ],
    "maxPostsPerPage": 20,
    "includeComments": True,
    "maxCommentsPerPost": 20,
    "maxItems": 200,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("subimpact/facebook-pages-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 '{
  "pageUrls": [
    "https://www.facebook.com/NASA",
    "https://www.facebook.com/bbcnews"
  ],
  "maxPostsPerPage": 20,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call subimpact/facebook-pages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,subimpact/facebook-pages-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/9xe51G8J0RlmcqhnQ/builds/4OeYmNOYhaqSQKuNm/openapi.json
