# Facebook Page Scraper (`scrapers-hub/facebook-page-scraper`) Actor

Facebook Page Scraper extracts public page data - name, category, likes, followers, rating, phone, email, website, address, price range, services and profile picture. 📘 Built for local lead generation and brand monitoring.

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

## Pricing

from $1.99 / 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.

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 Page Scraper – Extract Page Info, Contacts, Likes & Ratings

The **Facebook Page Scraper** extracts complete public profile data from any Facebook page or profile URL you give it — page name, category, intro, follower and like counts, address, phone number, email, website, ratings and business details — and returns it as a clean structured dataset. Paste a list of Facebook page URLs, press Start, and you get a row per page instead of forty browser tabs and a half-finished spreadsheet.

This Facebook page scraper is aimed at people who need Facebook business data at scale: lead-generation teams building local-business contact lists, agencies auditing client and competitor pages, market researchers mapping a category across a city, and analysts tracking follower growth and review sentiment. It reads only what a logged-out visitor can see on a public Facebook page, and it needs no cookies, session tokens or Facebook login of any kind.

***

### 📊 What Data Can You Extract with This Facebook Page Scraper?

Each dataset item is one Facebook page. The fields fall into seven groups:

| Category | Fields | What it tells you |
|---|---|---|
| 🆔 Page identity | `pageId`, `pageName`, `title`, `facebookId`, `pageUrl`, `facebookUrl` | The numeric page ID, the URL handle, the display name and the canonical page links |
| 📝 Description & classification | `intro`, `categories`, `category`, `info`, `creation_date` | The page's own intro blurb, its Facebook category labels, assorted info strings and the page creation date |
| 📈 Audience metrics | `likes`, `followers`, `followings`, `talkingAbout`, `wereHere` | Like count, follower count, accounts followed, current engagement volume and physical check-in count |
| ☎️ Contact details | `phone`, `email`, `website`, `websites`, `messenger`, `address`, `addressUrl` | The public contact block a business publishes on its page, including the mapped address link |
| ⭐ Reputation | `rating`, `ratings`, `ratingOverall`, `ratingCount` | Recommendation percentage, aggregate rating values and how many ratings back them |
| 🏪 Business attributes | `priceRange`, `services`, `business_hours`, `business_price`, `business_services` | Price band, listed services and opening hours as published on the page |
| 🖼️ Media & cross-channel | `profilePictureUrl`, `coverPhotoUrl`, `profilePhoto`, `instagram`, `alternativeSocialMedia`, `pageAdLibrary`, `ad_status` | Profile and cover imagery, linked Instagram and other social profiles, and Facebook Ad Library references |

The field that makes this scraper unusually valuable for lead generation is `email`. Facebook pages for local businesses very often publish a contact email that appears nowhere on the business's own website, and it is returned here alongside `phone`, `address` and `website` in a single record — a complete contact row with no enrichment step required.

***

### 🌟 Key Features of the Facebook Page Scraper

| Feature | Description |
|---|---|
| 🔗 Bulk URL input | Supply as many Facebook page or profile URLs as you want in one run through the `profileUrls` list |
| 🌍 Domain flexibility | Accepts `facebook.com` and `web.facebook.com` URLs, so links copied from any device or region work without editing |
| 📧 Contact extraction | Pulls `email`, `phone`, `website` and `address` from the page's public contact block in one pass |
| ⭐ Ratings capture | Returns `rating`, `ratingOverall` and `ratingCount`, giving you both the headline recommendation figure and the sample size behind it |
| 📊 Engagement metrics | `likes`, `followers`, `talkingAbout` and `wereHere` provide a four-dimensional read on page activity, not just a vanity follower number |
| 🏪 Business profile fields | Opening hours, price range and listed services are extracted where a page publishes them |
| 🔄 Automatic proxy rotation | Requests are routed through rotating proxies handled automatically by the actor — there is no proxy configuration to manage |
| ⚡ No browser required | Built on HTTP requests and `parsel` HTML parsing rather than a headless browser, keeping runs lightweight |
| 🔓 No login needed | Works entirely on public page data; no Facebook account, cookie or access token is involved |

***

### 🚀 Why Choose This Facebook Page Scraper?

**Contact data and audience data in one record.** Most tools give you either the follower counts or the contact block. This Facebook page scraper returns `email`, `phone`, `address` and `website` in the same row as `followers`, `likes` and `ratingCount`, so a single export is already a qualified lead list rather than raw metrics.

**Genuine bulk processing.** The `profileUrls` input is a list, not a single URL. Feed it fifty pages or five hundred and the run processes them in sequence, producing one clean dataset instead of dozens of separate exports to stitch together.

**No login, no cookies, no session management.** Approaches that require you to paste a Facebook session cookie break the moment that session expires and put your own account at risk. This actor reads public pages only, so there is nothing to refresh and nothing tied to your identity.

**Rich local-business detail.** For brick-and-mortar pages the scraper captures `address`, `addressUrl`, `business_hours`, `priceRange` and `wereHere` — the exact fields that make Facebook data useful for local SEO, footfall research and location intelligence.

***

### 📥 Input

The Facebook page scraper takes one required field: a list of page URLs.

```json
{
  "profileUrls": [
    "https://www.facebook.com/LeonardoDiCaprio",
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/cristiano",
    "https://web.facebook.com/leomessi"
  ]
}
```

#### 🔧 Facebook Page Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `profileUrls` | array of strings | ✅ Yes | — | List of Facebook profile/page URLs to scrape |

#### 💡 Input Examples

**Single page lookup** — audit one business page:

```json
{
  "profileUrls": [
    "https://www.facebook.com/copperkettleyqr/"
  ]
}
```

**Local-business lead batch** — several restaurant pages in one run:

```json
{
  "profileUrls": [
    "https://www.facebook.com/copperkettleyqr/",
    "https://www.facebook.com/examplebistro",
    "https://www.facebook.com/examplecafe",
    "https://web.facebook.com/exampletrattoria"
  ]
}
```

**Mixed page and public-figure profiles** — both URL styles are accepted:

```json
{
  "profileUrls": [
    "https://www.facebook.com/zuck",
    "https://web.facebook.com/leomessi"
  ]
}
```

***

### 📤 Output

One dataset item per Facebook page. This is a real record from an actual run of the Facebook page scraper, trimmed to the most-used keys:

```json
{
  "facebookUrl": "https://www.facebook.com/copperkettleyqr/",
  "categories": ["Page", "Pizza place"],
  "likes": 3258,
  "priceRange": "$$",
  "title": "The Copper Kettle Restaurant",
  "address": "1953 Scarth Street, Regina, SK, Canada, Saskatchewan",
  "pageId": "100064027242849",
  "pageName": "copperkettleyqr",
  "pageUrl": "https://www.facebook.com/copperkettleyqr/",
  "intro": "Longstanding local restaurant. Mediterranean specialties, signature gourmet pizzas (Best of YQR for",
  "phone": "+1 306-525-3545",
  "email": "copperkettle.events@gmail.com",
  "alternativeSocialMedia": "https://www.instagram.com/copperkettleyqr",
  "website": "http://www.thecopperkettle.online/",
  "services": "Outdoor seating",
  "rating": "94% recommend (201 Reviews)",
  "followers": 3258,
  "followings": 377
}
```

#### 🧾 Facebook Page Output Fields — Identity, Description & Metrics

| Field | Type | Description |
|---|---|---|
| `facebookUrl` | string | null | URL of the item's Facebook page |
| `pageUrl` | string | null | URL of the page |
| `pageId` | string | null | Identifier of the page |
| `pageName` | string | null | Name of the page (the URL handle) |
| `facebookId` | string | null | Identifier of the Facebook entity |
| `title` | string | null | Display title of the page |
| `intro` | string | null | Intro text published on the page |
| `info` | array | null | Info values collected for the page |
| `categories` | array | null | Categories the page belongs to |
| `category` | string | null | Category of the page |
| `creation_date` | string | null | Date the page was created |
| `likes` | integer | null | Number of likes |
| `followers` | integer | null | Number of followers |
| `followings` | integer | null | Number of accounts the page follows |
| `talkingAbout` | integer | null | Talking-about count |
| `wereHere` | integer | null | Number of people who checked in |

#### 🧾 Facebook Page Output Fields — Contact, Reputation, Business & Media

| Field | Type | Description |
|---|---|---|
| `phone` | string | null | Phone number found for the page |
| `email` | string | null | Email address found for the page |
| `website` | string | null | Website address |
| `websites` | array | null | Website values collected for the page |
| `messenger` | string | null | Messenger link for the page |
| `address` | string | null | Postal address |
| `addressUrl` | string | null | URL of the page's address |
| `rating` | string | null | Average rating score as displayed |
| `ratings` | string | null | Ratings of the page |
| `ratingOverall` | integer | null | Overall rating value |
| `ratingCount` | integer | null | Number of ratings received |
| `priceRange` | string | null | Price range of the business |
| `services` | string | null | Services listed on the page |
| `business_hours` | string | null | Business hours |
| `business_price` | string | null | Business price information |
| `business_services` | string | null | Business services |
| `profilePictureUrl` | string | null | URL of the profile picture |
| `profilePhoto` | string | null | Profile photo of the page |
| `coverPhotoUrl` | string | null | URL of the cover photo |
| `instagram` | array | null | Instagram values collected for the page |
| `alternativeSocialMedia` | string | null | Alternative social media profile link |
| `pageAdLibrary` | object | null | Page Ad Library information |
| `ad_status` | string | null | Ad status of the page |

Almost every field is nullable, because Facebook pages publish wildly different amounts of information. A celebrity profile will have `followers` and `intro` but no `priceRange` or `business_hours`; a small restaurant page will have all four. Write your downstream code to expect missing keys rather than assuming a complete record.

***

### 💻 How to Use the Facebook Page Scraper (Step by Step)

#### Step 1: Collect the Facebook Page URLs You Want to Scrape

Start by assembling your list of target pages. These can come from a Facebook search, a directory export, an existing CRM, or a competitor list you maintain manually. What matters is that each URL points at a page or profile root — `https://www.facebook.com/pagename` — rather than a specific post, photo or tab. Both `www.facebook.com` and `web.facebook.com` hosts are accepted, so links copied from mobile or from a regional Facebook mirror will work unchanged.

#### Step 2: Paste the URLs into the `profileUrls` Field

Open the actor's input tab and add your URLs to the `profileUrls` list, one per line. The field is prefilled with a few example pages so you can see the expected format; clear those before adding your own. There is no upper limit imposed by the input schema, but a first run of five to ten pages is the sensible way to confirm you get the fields you expect.

#### Step 3: Start the Facebook Scraper Run

Press **Start**. The actor processes each URL in turn, requesting the public page and parsing the structured data embedded in it. Proxy rotation happens automatically in the background, so there is nothing to configure. The log reports each page as it completes, which makes it easy to spot a URL that failed to resolve.

#### Step 4: Review the Dataset in Table View

Once the run finishes, open the **Dataset** tab and switch to table view. Check the columns that matter most for your use case — for lead generation that means `email`, `phone` and `website`; for competitive analysis it means `followers`, `likes` and `talkingAbout`. Blank cells are normal and tell you the page simply does not publish that detail.

#### Step 5: Filter and Clean the Facebook Page Data

Not every scraped page will be useful. Filter out records where the fields you need are null, and de-duplicate on `pageId` if your input list might contain the same page under two URL spellings. `pageId` is the stable identifier here — `pageName` handles can change, but the numeric ID does not.

#### Step 6: Export or Push the Data Downstream

Export as CSV or Excel for manual work, or read the dataset through the Apify API to push it into a CRM, a data warehouse or a Google Sheet. Because `email`, `phone`, `address` and `website` arrive in the same row, the export is usually import-ready without an intermediate transformation step.

#### Step 7: Schedule Recurring Runs to Track Page Changes

Follower counts, ratings and opening hours all change. Schedule the same `profileUrls` list to run weekly or monthly and keep each dataset. Joining runs on `pageId` gives you a time series for `followers`, `likes`, `ratingCount` and `rating` — which is how you spot a competitor's growth spurt or a client's review problem while it is still small.

***

### 🔌 API Access & Integrations

Trigger the Facebook page scraper from your own application. The synchronous endpoint starts a run and returns dataset items in one request:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~facebook-page-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "profileUrls": [
      "https://www.facebook.com/copperkettleyqr/",
      "https://www.facebook.com/zuck"
    ]
  }'
```

Using the official Python client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "profileUrls": [
        "https://www.facebook.com/copperkettleyqr/",
        "https://web.facebook.com/leomessi",
    ]
}

run = client.actor("scrapers-hub/facebook-page-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("email"), item.get("followers"))
```

The actor works with Apify's standard integrations for Zapier, Make, Google Sheets, Slack and generic webhooks, so a finished Facebook scraping run can drop new leads straight into your CRM or a channel.

***

### 💡 Best Use Cases for Facebook Page Data

#### 🎯 Local Business Lead Generation

Build contact lists for outbound sales by scraping Facebook pages in a target category and city. `email`, `phone`, `website` and `address` give you a complete contact row, while `likes` and `followers` let you qualify by business size before anyone picks up the phone.

#### 🔍 Competitor Monitoring and Benchmarking

Track a set of competitor pages over time using `followers`, `likes`, `talkingAbout` and `ratingCount`. The `talkingAbout` figure is particularly telling — it reflects current engagement rather than accumulated audience, so a spike there usually means a campaign has launched or something has gone viral.

#### ⭐ Review and Reputation Analysis

`rating`, `ratingOverall` and `ratingCount` give you the recommendation percentage together with its sample size. Comparing these across a category shows which businesses have genuine reputation strength versus a high score based on a handful of reviews.

#### 📍 Location Intelligence and Market Mapping

For physical businesses, `address`, `addressUrl` and `wereHere` support geographic analysis. Plotting check-in counts against location reveals which venues in a district actually draw footfall, which is valuable for site selection and franchise planning.

#### 🏪 Business Listing Audits

Agencies managing many client pages can scrape them all in one run and check `business_hours`, `phone`, `website` and `priceRange` for accuracy. Stale opening hours and dead website links are among the most common and most damaging local-listing errors, and this turns a manual audit into a filter on a spreadsheet column.

#### 📣 Advertising and Cross-Channel Research

`pageAdLibrary` and `ad_status` indicate a page's connection to Facebook's Ad Library, while `instagram` and `alternativeSocialMedia` reveal which other channels a brand runs. Together they show you which competitors are actively advertising and where else they are investing attention.

#### 📊 Market Sizing by Category

Scrape a wide set of pages in one vertical and aggregate `categories`, `followers` and `likes`. The resulting distribution tells you how concentrated a market is — whether a handful of pages hold most of the audience, or whether attention is spread thin across many small players.

***

### ⚙️ Tips for Better Facebook Page Scraping Results

- **Use page-root URLs only.** Links to a specific post, photo, video or the `/about` tab may not resolve to the page profile. Trim the URL back to `facebook.com/pagename` before adding it to `profileUrls`.
- **Batch in moderate sizes.** Very large URL lists work, but splitting them into batches of a few hundred makes failures easier to isolate and lets you re-run only the portion that needs it.
- **Treat `pageId` as the primary key.** Handles in `pageName` can be changed by the page owner; the numeric `pageId` is stable and is the correct field for de-duplication and joins across runs.
- **Do not assume `email` will be populated.** Only a minority of pages publish a contact email. Filter for non-null `email` when building a mailing list rather than expecting full coverage.
- **Check `ratingCount` before trusting `rating`.** A 100% recommendation rate on four reviews is noise. Set a minimum review threshold before using ratings comparatively.
- **Verify the page is public.** Private profiles, region-restricted pages and pages that have been removed will not return full data. If a record comes back mostly empty, open the URL in a logged-out browser to confirm what is actually visible.

***

### 🛠️ Troubleshooting

**Most fields came back null for one of my pages.**
The page probably restricts what it shows to logged-out visitors, or it is a personal profile rather than a business page. Open the URL in a private browser window with no Facebook session — whatever you cannot see there is what the scraper cannot collect.

**The `email` field is empty for nearly every page.**
That is normal. Facebook does not require pages to publish an email, and many businesses deliberately route contact through Messenger instead. The scraper returns the field when the page publishes it and null when it does not.

**One URL in my list produced no record at all.**
Check the URL resolves. Deleted pages, renamed handles, pages restricted to certain countries and URLs pointing at a post rather than a page will all fail. The run log names the URL that failed so you can correct and re-run just that one.

**`followers` and `likes` show the same number.**
On many pages Facebook reports these identically, because historically a like implied a follow. It is not a scraping error — it reflects what the page displays.

**A large run seems slow.**
Each URL is a separate request against Facebook and the actor paces requests to stay reliable. For large lists, use an Apify schedule to run overnight rather than waiting on an interactive run.

***

### ❓ Frequently Asked Questions About Facebook Page Scraping

**What does the Facebook Page Scraper do?**
It takes a list of public Facebook page or profile URLs and returns structured data for each one — name, category, intro, follower and like counts, contact details, ratings, business hours, price range and imagery links.

**Do I need a Facebook account or login to use this Facebook scraper?**
No. It reads only publicly visible page data. There is no login, no cookie and no access token required, so nothing is tied to your personal Facebook account.

**Can I scrape multiple Facebook pages in one run?**
Yes. `profileUrls` is a list — add as many page URLs as you need and the run processes them all into one dataset.

**Does the Facebook page scraper extract email addresses?**
It returns the `email` field when the page publishes a contact email in its public info section. Many pages do not, so expect partial coverage rather than an email for every record.

**Can it scrape posts, comments or reviews?**
No. The output fields cover the page profile itself — identity, metrics, contact details, ratings and business attributes. Individual posts, comment threads and review text are not among the returned fields.

**What is the difference between `likes`, `followers` and `talkingAbout`?**
`likes` is the cumulative like count, `followers` is the number of accounts following the page, and `talkingAbout` reflects recent engagement volume. The first two accumulate over time; the third moves with current activity.

**Does it work with `web.facebook.com` URLs?**
Yes. Both `www.facebook.com` and `web.facebook.com` URLs are accepted, so links copied from mobile or regional mirrors work without editing.

**Do I need to set up proxies?**
No. Proxy rotation is handled automatically by the actor and is not user-configurable.

**Can I scrape personal Facebook profiles?**
The input accepts profile URLs, and public figure profiles typically return data. Private personal profiles show almost nothing to logged-out visitors, so those records will be largely empty.

**How do I track a page's follower growth over time?**
Schedule the same `profileUrls` list on a recurring basis and store each dataset. Join runs on `pageId` and you have a follower and rating time series.

**What export formats are available for the Facebook data?**
Apify datasets export to JSON, CSV, Excel, XML, RSS and HTML, and are also readable through the Apify API and official clients.

**Why do some records have `business_hours` and others do not?**
Opening hours only appear for pages that have configured them, which is generally local businesses rather than public figures or media pages. The field is null when the page has none.

**Does this Facebook scraper use a headless browser?**
No. It uses direct HTTP requests with HTML parsing, which keeps runs lightweight and quick to start.

**Is scraping public Facebook pages legal?**
The actor accesses only publicly visible page content. How you use that data is your responsibility, including compliance with Facebook's terms of service and applicable privacy law. Read the disclaimer below before building a contact list.

**Can I connect the Facebook page scraper to my CRM?**
Yes. Use the Apify API directly, or one of the standard integrations for Zapier, Make, Google Sheets, Slack or webhooks to push each finished run into your systems.

***

### 🆘 Support & Feedback

Hitting a problem, or seeing a field that should be populated but is not? Open a ticket on the **Issues** tab of this actor. Including the exact page URL and the run ID lets the behaviour be reproduced quickly, which is usually the difference between a same-week fix and a long back-and-forth.

Need something bespoke — additional Facebook fields, a different output shape, or a scraper for another social platform? Email **scraperhubapi@gmail.com** with a description of what you are trying to build.

If the Facebook Page Scraper is doing useful work for you, please leave a review on the actor page. Honest ratings help other teams find the tool and directly influence which improvements get prioritised.

***

### ⚖️ Disclaimer

The Facebook Page Scraper collects only publicly available information from Facebook pages and profiles — the same content any visitor can see without logging in. It does not use your Facebook account, does not require cookies or session tokens, and does not access private profiles, friends-only content or anything behind authentication.

You are responsible for how you use the data this Facebook scraper produces. Facebook page data frequently contains personal data — names, email addresses, phone numbers and physical addresses — and processing it brings you within scope of GDPR, UK GDPR, CCPA and equivalent privacy regimes. You must establish a lawful basis for processing, respect data-subject rights including access and erasure, and comply with anti-spam rules such as PECR and CAN-SPAM before using scraped contact details for outreach.

Use of the collected data must also comply with Meta's and Facebook's terms of service and platform policies, and with any applicable copyright in page imagery and text. Page content is published by third parties and may be inaccurate or out of date; verify anything commercially critical at source.

If you believe data collected by this actor relates to you and should be removed, contact **scraperhubapi@gmail.com** with the details and the request will be actioned.

# Actor input Schema

## `profileUrls` (type: `array`):

List of Facebook profile/page URLs to scrape.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.facebook.com/LeonardoDiCaprio",
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/cristiano",
    "https://web.facebook.com/leomessi"
  ]
}
```

# Actor output Schema

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

Records scraped by Facebook Page Scraper, stored in the run's default dataset.

# 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 = {
    "profileUrls": [
        "https://www.facebook.com/LeonardoDiCaprio",
        "https://www.facebook.com/zuck",
        "https://www.facebook.com/cristiano",
        "https://web.facebook.com/leomessi"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/facebook-page-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 = { "profileUrls": [
        "https://www.facebook.com/LeonardoDiCaprio",
        "https://www.facebook.com/zuck",
        "https://www.facebook.com/cristiano",
        "https://web.facebook.com/leomessi",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/facebook-page-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 '{
  "profileUrls": [
    "https://www.facebook.com/LeonardoDiCaprio",
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/cristiano",
    "https://web.facebook.com/leomessi"
  ]
}' |
apify call scrapers-hub/facebook-page-scraper --silent --output-dataset

```

## MCP server setup

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