# Facebook Public Page (`xtracto/facebook-page`) Actor

Scrape public Facebook page metadata: name, category, about text, like count, follower count, and profile image.

- **URL**: https://apify.com/xtracto/facebook-page.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

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 Scraper

Extract structured public profile data from any Facebook page in bulk — page name, numeric ID, profile and cover images, verified status, category, follower and like counts — in a clean structured JSON output.

### Why use this actor

- **No account / no login required** — just give it a Facebook page handle or URL.
- **Flexible input** — accepts page usernames (`nasa`), numeric page IDs (`100044561550831`), or full page URLs (`https://www.facebook.com/nasa/`).
- **Rich detail** — display name, page ID, profile and cover photo URLs, verified flag, category, follower count, following count, and like count where Facebook exposes them.
- **Bulk input** — pass a list of pages in one run; one clean dataset row per page.
- **Automatic retries and graceful fallback** — if the primary path is blocked the actor falls back to a public-meta path so you still get core fields like name, about, and profile image.
- **Stable JSON output** suitable for pipelines, spreadsheets, and databases — every row carries `_input`, `_source`, `_scrapedAt` envelope fields so you can join results back to your input list.

### How it works

1. You provide a list of Facebook page handles (e.g. `nasa`) or full page URLs.
2. The actor fetches each page and reads the same public profile record that Facebook's web app shows when you open the page in a browser, then assembles a flat JSON record.
3. Pages that block the primary path automatically fall back to public meta-tag data so you still receive the core fields.
4. Results stream into your dataset, ready to download as JSON, CSV, or Excel.

You do not need to manage scrapers, browsers, or rotating IPs — all handled internally.

### Input

```json
{
  "pages": [
    "nasa",
    "microsoft"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
```

| Field | Type | Description |
|---|---|---|
| `pages` | array | List of Facebook page usernames, numeric page IDs, or full page URLs. All three formats are accepted and may be mixed in the same run. |
| `proxyConfiguration` | object | Apify Proxy settings. Datacenter proxy works for most pages; switch to Residential if you see frequent errors at scale. |

### Output

Input: `nasa`

```json
{
  "_input": "nasa",
  "_source": "S1-primary",
  "_scrapedAt": "2026-05-18T11:37:40.477347+00:00",
  "url": "https://www.facebook.com/NASA",
  "id": "100044561550831",
  "name": "NASA - National Aeronautics and Space Administration",
  "profileImageUrl": "https://scontent.fcgk12-2.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?...",
  "coverImageUrl": "https://scontent.fcgk12-2.fna.fbcdn.net/v/t39.30808-6/663298991_1496429661852405_5171518456419416626_n.jpg?...",
  "isVerified": null,
  "isProfile": true,
  "category": null,
  "followerCountText": "28M followers",
  "followerCount": 28000000,
  "followingCountText": "52 following",
  "followingCount": 52,
  "likeCountText": null,
  "likeCount": null
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The page handle or URL exactly as you supplied it. Use this to join results back to your input list. |
| `_source` | string | Internal tag for the path used to fetch the record. `S1-primary` means the fastest, richest path; values starting with `S2-` indicate a fallback was used and some fields may be unavailable. |
| `_scrapedAt` | string | ISO-8601 UTC timestamp when the record was scraped. |
| `url` | string | Canonical Facebook page URL. |
| `id` | string | Facebook's numeric page ID. Stable across name and handle changes. |
| `name` | string | Display name as shown at the top of the page. |
| `profileImageUrl` | string | URL of the page profile picture. |
| `coverImageUrl` | string | URL of the page cover photo. |
| `isVerified` | boolean | `true` if Facebook shows a verified badge on the page. May be `null` if the flag is not exposed publicly. |
| `isProfile` | boolean | `true` if the record represents a public profile/page entity. |
| `category` | string | Page category (e.g. `Internet company`, `Public Figure`). May be `null` if not shown. |
| `followerCountText` | string | Raw follower-count label as displayed by Facebook (e.g. `28M followers`). Useful when the page only shows a rounded value. |
| `followerCount` | integer | Parsed numeric follower count. `28M` becomes `28000000`. |
| `followingCountText` | string | Raw following-count label (e.g. `52 following`). |
| `followingCount` | integer | Parsed numeric following count. |
| `likeCountText` | string | Raw like-count label (e.g. `1.2M likes`). `null` if Facebook does not surface likes for this page. |
| `likeCount` | integer | Parsed numeric like count. `null` if not surfaced. |

#### Error envelope

Pages that are private, restricted, or fail to fetch return a structured error instead of crashing the run:

```json
{
  "_input": "some-private-page",
  "_error": "login_wall",
  "_errorDetail": "page requires login to view",
  "_scrapedAt": "2026-05-18T11:37:42.012345+00:00"
}
```

Filter on `_error` to triage failed rows. Common values:

- `login_wall` — the page is age-restricted, region-restricted, or has audience targeting and requires a logged-in viewer.
- `fetch_failed` — transient network error after retries; safe to re-run.

### Pricing

This actor is billed per result: **$6.00 per 1,000 results**. Each successful page = 1 result. Errors (private, restricted, not-found) are not billed.

### Other Sosmed Actors

| Platform | Actor | Best for |
|---|---|---|
| Facebook | [Facebook Page Posts Scraper](https://apify.com/xtracto/facebook-page-posts) | Pull recent posts from a public page |
| Facebook | [Facebook Post Detail Scraper](https://apify.com/xtracto/facebook-post-detail) | Full text, reactions, and metadata for a single post URL |
| Instagram | [Instagram Account Scraper](https://apify.com/xtracto/instagram-account-scraper) | Bio, followers, post count for any handle |
| Threads | [Threads Account Scraper](https://apify.com/xtracto/threads-account-scraper) | Profile data for a Threads handle |
| X / Twitter | [X Account Scraper](https://apify.com/xtracto/x-account-scraper) | Profile + tweet counts for any handle |
| Bluesky | [Bluesky Account Scraper](https://apify.com/xtracto/bluesky-account-scraper) | atproto profile + counters |
| Reddit | [Reddit User Profile Scraper](https://apify.com/xtracto/reddit-user-profile-scraper) | Karma, posts, trophies |

Browse the full catalog at [apify.com/xtracto](https://apify.com/xtracto).

### Notes

- `followerCount` is rounded by Facebook itself once a page passes ~1,000 followers (`28M`, `1.2K`). The actor exposes both the raw label (`followerCountText`) and the parsed integer (`followerCount`) so you can choose which to use.
- `category` and `isVerified` are surfaced for business and brand pages; personal-profile pages may return these as `null`.
- Custom vanity URLs are fully supported — `https://www.facebook.com/NASA/`, `https://www.facebook.com/100044561550831/`, and `nasa` all resolve to the same record.
- `likeCount` is only present for pages that still display a public like count; many modern pages show followers only, in which case `likeCount` and `likeCountText` are `null`.
- The numeric `id` is the most reliable identifier — page handles can change but the numeric ID does not.
- For large jobs (>500 pages), Apify Proxy rotation is enabled by default and is sufficient for most workloads.

### Recommendation summary (optional)

Set `includeReviews` to add the page's recommendation figures, read from its `/reviews/` tab:

| Field | Meaning |
|---|---|
| `reviewsEnabled` | Whether the page has reviews switched on at all |
| `recommendPercent` | e.g. `38.0` |
| `reviewCount` | e.g. `1828` |
| `reviewsSummaryText` | The sentence as Facebook writes it — `38% recommend (1,828 reviews)` |

It costs one extra request per page, which is why it is off by default.

**A page with reviews switched off returns 404 for that tab**, and that is a fact about the page
rather than a failure — those rows get `reviewsEnabled: false` and null figures. Starbucks and NASA
both behave this way; Sephora does not.

**The percentage appears to vary by where the run executes.** The same page returned
`38% recommend (1,828 reviews)` from one IP and `34% recommend (1,828 reviews)` from Apify's US
datacenter minutes apart — the count identical, the percentage not. Treat `recommendPercent` as
indicative and `reviewCount` as the stable figure.

**Individual reviews are not available anonymously.** The page's `ratings_list_feed_units` feed
comes back with a `field_exception` and a null cursor — the same rotated persisted-query id that
blocks public group feeds, and it cannot be refreshed without a browser session. So this is a
summary, not a review scraper, and it is named accordingly.

# Actor input Schema

## `pages` (type: `array`):

List of Facebook page usernames or full page URLs to scrape. Accepts either the page handle (e.g. `nasa`), the numeric page ID, or a full URL like `https://www.facebook.com/nasa/`.

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

Apify Proxy settings. Datacenter proxy works for most pages; switch to Residential if you see frequent errors at scale.

## `includeReviews` (type: `boolean`):

Fetch the page's /reviews/ tab for its recommendation percentage and review count ("38% recommend (1,828 reviews)"). Costs one extra request per page. Pages with reviews switched off return reviewsEnabled: false rather than an error. Individual reviews are not available anonymously.

## Actor input object example

```json
{
  "pages": [
    "zuck",
    "MetaAI"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "includeReviews": false
}
```

# 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 = {
    "pages": [
        "zuck",
        "MetaAI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/facebook-page").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 = { "pages": [
        "zuck",
        "MetaAI",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/facebook-page").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 '{
  "pages": [
    "zuck",
    "MetaAI"
  ]
}' |
apify call xtracto/facebook-page --silent --output-dataset

```

## MCP server setup

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

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/HDYOtVZm3UU6VKkin/builds/gQdCsZcI7RXzdhdwM/openapi.json
