# Facebook Page Scraper — Likes, Talking-About & Metadata (`axery/facebook-page-stats-scraper`) Actor

Scrape public Facebook page metadata - page name, like count, 'talking about this' count, description and profile image. No login, no API key.

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

## Pricing

from $4.00 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Public Page Stats Scraper

Scrapes public Facebook page metadata — page name, like count, "talking about this" count, description and profile image. No login, no API key, no access token.

Useful for brand-size benchmarking, competitor tracking, and enriching a company database with social reach figures.

### What makes this different

**`talking_about_count` is the metric that actually moves.** Like counts are a lifetime total that barely changes week to week; "talking about this" is Facebook's own recent-engagement figure, and it's the one that separates a page with real current activity from a page with a big historical following and nothing happening. Both are returned as clean integers, parsed out of the description text where Facebook buries them.

**A clean description, plus the original.** Facebook prepends the page name and the stats sentence to `og:description` (`"NASA - ... . 28,711,768 likes · 124,772 talking about this. Explore..."`). Passing that straight through duplicates fields you already have. `description` is the page's own blurb with that prefix stripped; `raw_description` keeps the untouched original so nothing is lost.

**A page that isn't publicly viewable fails clearly.** Facebook returns HTTP 200 for a nonexistent page — the only tell is that the title becomes "Log in to Facebook" and the counts vanish. That's detected explicitly, so you get a stated failure instead of a row full of nulls that looks like a real page with no engagement.

### What's honestly out of scope

**No posts.** This Actor returns page-level stats only. A Facebook page served to a logged-out client contains no post feed at any depth — verified directly: zero occurrences of the feed's own data markers in the HTML, on both the desktop and mobile hosts. The legacy no-JS host now redirects to a login page outright. Anything claiming to return logged-out page posts is doing something this Actor does not do.

### Input

| Field | Type | Notes |
|---|---|---|
| `pages` | array | Page names (the part after `facebook.com/`) or full page URLs. |
| `proxyConfiguration` | object | Defaults to Residential. |

### Output

```json
{
  "page_id": "facebook.com:nasa",
  "name": "NASA - National Aeronautics and Space Administration",
  "like_count": 28711768,
  "talking_about_count": 124772,
  "description": "Explore the universe and discover our home planet. There's space for everybody.",
  "url": "https://www.facebook.com/nasa/"
}
```

`were_here_count` is present only for pages with a physical location. Each run also writes a `RUN_COVERAGE` record to the key-value store with what was requested, what came back, and any per-page failures.

### Local development

```bash
pip install -r requirements.txt
python test_local.py nasa cocacola netflix --out sample_output.json
python test_local.py https://www.facebook.com/nasa
```

`sample_output.json` is real output from a live run.

# Actor input Schema

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

Facebook page names (the part after facebook.com/) or full page URLs. Each is fetched independently into the same dataset.

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

Apify Proxy settings. Defaults to Residential - Facebook is aggressive about cloud IP ranges even on surfaces that are otherwise open to logged-out visitors.

## Actor input object example

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

# Actor output Schema

## `pages` (type: `string`):

One row per page: name, like count, talking-about count, description, profile image.

# 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": [
        "nasa"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axery/facebook-page-stats-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/blMqPtEX1RFW2Qk0E/builds/sLg7TJGpjPgkBofAV/openapi.json
