# 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# 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.

# 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.

## Actor input object example

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

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=xtracto/facebook-page",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Public Page",
        "description": "Scrape public Facebook page metadata: name, category, about text, like count, follower count, and profile image.",
        "version": "0.1",
        "x-build-id": "gsQcZvaghzgppOW2F"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~facebook-page/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-facebook-page",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/xtracto~facebook-page/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-facebook-page",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/xtracto~facebook-page/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-facebook-page",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "pages"
                ],
                "properties": {
                    "pages": {
                        "title": "Facebook pages",
                        "type": "array",
                        "description": "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/`.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy settings. Datacenter proxy works for most pages; switch to Residential if you see frequent errors at scale.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
