# Facebook Pages Scraper (`apify/facebook-pages-scraper`) Actor

Extract basic data from multiple Facebook Pages or Profiles. Extract Facebook page details, website, email, address, messenger, likes, followers, rating, ad running status, and other public data. Export scraped data, schedule scraper via API, integrate with other tools or AI workflows.

- **URL**: https://apify.com/apify/facebook-pages-scraper.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Social media, Lead generation
- **Stats:** 48,733 total users, 3,654 monthly users, 100.0% runs succeeded, 485 bookmarks
- **User rating**: 4.35 out of 5 stars

## Pricing

from $5.40 / 1,000 pages

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/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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

### What is Facebook Pages Scraper?

It's a simple but powerful data extraction tool that allows you to **scrape basic data from Facebook pages and profiles**. To get that data, just **insert page URLs and click "Save & Start" button**. With this web scraping tool, you can go beyond the limitations of the Facebook API:

🗂 Scrape a bunch of Facebook Pages **at once**

👥 Scrape **both Pages and Profiles** ([see the difference in data](https://apify.com/apify/facebook-pages-scraper?backlink=%252Fstore%252Fcategories%253Fsearch%253Dpages#is-there-a-difference-between-scraping-a-facebook-page-and-facebook-profile))

📇 Get **contact details, likes, followers**, ratings, and more

⚡ Get **500 pages for free** in less than 2 minutes

🔓 **No limitations** on requests or number of calls

💾 Export Facebook data in **JSON, CSV, Excel, or HTML**

🔗 Export via SDKs (Python & Node.js), use **API Endpoints**, webhooks, or integrate with apps & AI workflows

🔍 Explore 20+ **other [Facebook scraping tools](https://apify.com/apify/facebook-pages-scraper#what-is-the-best-facebook-scraper)**

### What Facebook pages data can I extract?

With this Facebook API, you will be able to extract the following data from Facebook pages or profiles:

<table>
<tr>
<td>📝 Page title</td>
<td>🔗 Page URL</td>
</tr>
<tr>
<td>📮 Address</td>
<td>📞 Contact details (phone number)</td>
</tr>
<tr>
<td>🌐 Website</td>
<td>💬 Messenger link (if available)</td>
</tr>
<tr>
<td>📝 Intro (bio/description)</td>
<td>📍 Number of check-ins and mentions</td>
</tr>
<tr>
<td>⭐ Rating and rating count </td>
<td>📅 Page creation date</td>
</tr>
<tr>
<td>📚 Page Ad Library ID</td>
<td>📢 Ad status</td>
</tr>
<tr>
<td>👥 Number of followers</td>
<td>👍 Number of likes</td>
</tr>
<tr>
<td>🎨 Categories</td>
<td>🌄 Profile and cover photo URL</td>
</tr>
</table>

### How do I use Facebook Pages Scraper?

Facebook Pages Scraper was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:

1.  [Create](https://console.apify.com/sign-up) a free Apify account using your email.
2.  Open [Facebook Pages Scraper](https://apify.com/apify/facebook-pages-scraper).
3.  Add one or more Facebook Page URLs to scrape its info.
4.  Click "Start" and wait for the data to be extracted.
5.  Download your data in JSON, XML, CSV, Excel, or HTML.

For a step-by-step guide on how to scrape Facebook Pages, follow our [Facebook Pages Scraper tutorial](https://blog.apify.com/how-to-scrape-facebook-pages-posts-comments-photos-and-more/) 📝.

### How much will scraping Facebook pages cost you?

Scraping data from Facebook pages costs $10 for every 1,000 pages, or $0.01 per page. If you're on Apify Free plan, you will be able to scrape **up to 500 pages** before needing to upgrade.

For more frequent or extensive data scraping, consider upgrading to the $29/month [Starter plan](https://apify.com/pricing), which can get you **up to 2,900 Facebook pages** per month. For scalable Facebook scraping, check out $199/month Scale or $999/month Business plan.

### ⬇️ Input

The input for Facebook Pages Scraper should be **Facebook Page URLs** such as `https://www.facebook.com/humansofnewyork/`. You can insert the page URLs one by one, paste a prepared list, or set the input via API.

<a href="https://console.apify.com/actors/4Hv5RhChiaDk6iwad">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/Facebook%20pages%20data%20input.png?raw=true" alt="Facebook page scraping input" style="width:70%;">
</a>

Click on the [input tab](https://apify.com/apify/facebook-pages-scraper/input-schema) for a full explanation of an input example in JSON.

### ⬆️ Output

The results will be wrapped into a dataset which you can find in the **Storage** tab. Here's an excerpt from the dataset you'd get if you apply the input parameters above:

<a href="https://console.apify.com/actors/4Hv5RhChiaDk6iwad">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/Facebook%20pages%20data%20output.png?raw=true" alt="Facebook page scraping output" style="width:90%;">
</a>

#### 📘 **Extracted Facebook pages sample**

```json
[
    {
        "facebookUrl": "https://www.facebook.com/ChrisBrecheensWritingAboutWriting",
        "categories": ["Page", "Interest"],
        "info": [
            "Writing About Writing. 1,148,094 likes",
            "68,836 talking about this. Macros, memes, quotes, puns and more as well as daily updates from the blog this page..."
        ],
        "likes": 1148094,
        "messenger": null,
        "title": "Writing About Writing",
        "pageId": "100077736131324",
        "pageName": "ChrisBrecheensWritingAboutWriting",
        "pageUrl": "https://www.facebook.com/ChrisBrecheensWritingAboutWriting",
        "intro": "Macros, memes, quotes, puns and more as well as daily updates from the blog this page promotes: chri",
        "websites": ["https://chrisbrecheen.blogspot.com/"],
        "email": "chris.brecheen@gmail.com",
        "website": "chrisbrecheen.blogspot.com",
        "followers": 1219522,
        "profilePictureUrl": "https://scontent.fios2-1.fna.fbcdn.net/v/t39.30808-1/471437612_609196481681551_4559415822805108518_n.jpg?stp=dst-jpg_s200x200_tt6&_nc_cat=1&ccb=1-7&_nc_sid=f907e8&_nc_ohc=2cjbJkLMnuYQ7kNvwHBHlxY&_nc_oc=AdlYruGJleJeuE-0HuI3Ye3EV9GUO6qXcNROJDf9a6712ZeYkHxRQYGy9KsmIKi7-Hg&_nc_zt=24&_nc_ht=scontent.fios2-1.fna&_nc_gid=_Gdmphc_JPSw5m9Ls42NEw&oh=00_AfFwiUKwT9RIgdnq17-dbzVkmud1yZrB9jPPShL5skg8Ng&oe=68158058",
        "coverPhotoUrl": "https://scontent.fios2-1.fna.fbcdn.net/v/t39.30808-6/482133942_9017224025053486_513526455002128649_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=106&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=aGKCwWHxQecQ7kNvwFnuJjo&_nc_oc=AdkcJCw3QB5Gqj1LcTMsMpjhw5BwK1JruvLLtw70Yul5o3pPcwWcc9Gi-tWgiK5MrDw&_nc_zt=23&_nc_ht=scontent.fios2-1.fna&_nc_gid=M5WWbBwQlIDAyFzjfVcNbw&oh=00_AfEWWO-US6Q5qweRTVWV6nkdt2HZWY5DCSE8r7mNEzxUkA&oe=68158386",
        "profilePhoto": "https://www.facebook.com/photo/?fbid=609196478348218&set=a.178389964762207",
        "creation_date": "October 7, 2012",
        "ad_status": "This Page is not currently running ads.",
        "about_me": {
            "text": "Memes, macros infographics, and quotes about writing, art, creativity, inspiration, motivation, process, craft, grammar, linguistics, books, reading, literature, and living life by one's own rules.  Wordplay riddles, sayings of famous authors, and a healthy love of puns.  Plus my personal pledge that I'll cross-post my blog only twice a day (three times if I'm running a poll), and I won't cry very much at all if you never actually visit it.",
            "urls": []
        },
        "facebookId": "100077736131324",
        "pageAdLibrary": {
            "is_business_page_active": false,
            "id": "290072384435404"
        }
    },
    {
        "facebookUrl": "https://www.facebook.com/nasaearth",
        "categories": ["Page", "Science Website"],
        "info": [
            "NASA Earth. 10,505,363 likes",
            "6,420 talking about this. Explore and learn more about our home planet. 🌎💚   Verification: http://nasa.gov/socialmedia"
        ],
        "likes": 10505363,
        "messenger": null,
        "title": "NASA Earth",
        "pageId": "100064975200317",
        "pageName": "nasaearth",
        "pageUrl": "https://www.facebook.com/nasaearth",
        "intro": "Explore and learn more about our home planet. 🌎💚   Verification: http://nasa.gov/socialmedia",
        "websites": ["https://science.nasa.gov/earth/"],
        "CONFIRMED_OWNER_LABEL": "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION",
        "website": "science.nasa.gov/earth",
        "followers": 10921894,
        "followings": 26,
        "profilePictureUrl": "https://scontent-lga3-2.xx.fbcdn.net/v/t39.30808-1/435065639_833099202199246_6261622852628963143_n.jpg?stp=dst-jpg_p200x200_tt6&_nc_cat=100&ccb=1-7&_nc_sid=f907e8&_nc_ohc=4MThx_noih4Q7kNvwGy6Dr2&_nc_oc=AdnsrNHgrm8-lm5dwjPUnXJgjtJTjA85aNQ7ZyfaTYfV-GjO4Qpwidc0HId253ef6EI&_nc_zt=24&_nc_ht=scontent-lga3-2.xx&_nc_gid=_Ao7aUXC8xLE8LUOa2cxXg&oh=00_AfHRVudkoaLeIPCVPQTpqVMYITkIpfwdbY2JPqmeG0RhUg&oe=6815797D",
        "coverPhotoUrl": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.30808-6/481916835_1055641396611691_1391211533881599614_n.jpg?_nc_cat=102&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=icgSMafrn0wQ7kNvwG2Rztn&_nc_oc=AdnR0AG46r2SGKjNiXEAjA3ZHa4dup4oeDQ-7PssEyGo8yV8RwM07svxnM7pth57sC4&_nc_zt=23&_nc_ht=scontent-lga3-1.xx&_nc_gid=GhxFphyL8skAFZ8DtB9MHg&oh=00_AfGhao-GleaCAux8RMCnOgPkeNnjjNvJaRQo2oncKm58JQ&oe=6815947C",
        "profilePhoto": "https://www.facebook.com/photo/?fbid=833099205532579&set=a.360010466174791",
        "creation_date": "December 29, 2008",
        "ad_status": "This Page is not currently running ads.",
        "confirmed_owner": "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION is responsible for this Page.",
        "facebookId": "100064975200317",
        "pageAdLibrary": {
            "is_business_page_active": false,
            "id": "57242657138"
        }
    },
    {
        "facebookUrl": "https://www.facebook.com/UNclimatechange",
        "categories": ["Page", "Organization"],
        "info": [
            "UN Climate Change, Bonn, Germany. 494,043 likes",
            "807 talking about this",
            "2,177 were here. The official Facebook page of the United Nations Framework..."
        ],
        "likes": 494043,
        "messenger": null,
        "title": "UN Climate Change | Bonn",
        "address": "Platz der Vereinten Nationen 1 , Bonn, Germany https://maps.google.com/maps?q=Platz+der+Vereinten+Nationen+1+%2C+Bonn%2C+Germany&hl=en",
        "pageId": "100067499490396",
        "pageName": "UNclimatechange",
        "pageUrl": "https://www.facebook.com/UNclimatechange",
        "intro": "The official Facebook page of the United Nations Framework Convention on Climate Change (UNFCCC).",
        "websites": [
            "https://maps.google.com/maps?q=Platz+der+Vereinten+Nationen+1+%2C+Bonn%2C+Germany&hl=en",
            "http://unfccc.int/"
        ],
        "CONFIRMED_OWNER_LABEL": "United Nations Framework Convention on Climate Change (UNFCCC)",
        "phone": "+49 228 8151000",
        "website": "unfccc.int",
        "rating": "94% recommend (839 Reviews)",
        "followers": 514363,
        "profilePictureUrl": "https://scontent.fsxb1-1.fna.fbcdn.net/v/t39.30808-1/346870311_587061183553860_709539914076514993_n.jpg?stp=dst-jpg_s200x200_tt6&_nc_cat=107&ccb=1-7&_nc_sid=f907e8&_nc_ohc=c1XouJLe7NUQ7kNvwG_r6hm&_nc_oc=Adk7XyB-E8Q3R22kkSE81A_CbkYM6i-XAft0R2td8j1pgBYLpynuOhDqwpr1t46IbqU&_nc_zt=24&_nc_ht=scontent.fsxb1-1.fna&_nc_gid=3QQYx0bSkxRsh_a_dsLSTA&oh=00_AfFf-XI2ZLbThKqfuhUTThapEW_c5z1DexGu4i9DMvjxAA&oe=681596AA",
        "coverPhotoUrl": "https://scontent.fsxb1-1.fna.fbcdn.net/v/t39.30808-6/258086905_10159533815620867_4631418575296415090_n.png?stp=dst-png_s960x960&_nc_cat=104&ccb=1-7&_nc_sid=cc71e4&_nc_ohc=xMKEqoYR7-0Q7kNvwGJikJo&_nc_oc=AdlZELbUbSanzkgp4c4AxgEybKzAmQQGm5_NtGSgasZ5WBHW3Y28PpPdMOs5YSUVkS4&_nc_zt=23&_nc_ht=scontent.fsxb1-1.fna&_nc_gid=VWCgAojNj_KRIub-2tiBEA&oh=00_AfGXTdaEMkIfOqMO8D3HFP-MSZMeUDgeO3QjzKG-ki_5Xg&oe=681583DB",
        "profilePhoto": "https://www.facebook.com/photo/?fbid=587061196887192&set=a.587061156887196",
        "ratingOverall": 94,
        "ratingCount": 839,
        "creation_date": "January 26, 2009",
        "ad_status": "This Page is not currently running ads.",
        "confirmed_owner": "United Nations Framework Convention on Climate Change (UNFCCC) is responsible for this Page.",
        "facebookId": "100067499490396",
        "pageAdLibrary": {
            "is_business_page_active": false,
            "id": "63044235866"
        }
    }
]
````

### What is the best Facebook scraper?

You can use any of the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it groups, reviews, comments or ads. Feel free to browse them:

<table>
<tr>
<td>🕵️‍♀️ <a href="https://apify.com/apify/facebook-search-scraper">Facebook Search Scraper</a></td>
<td>🗓 <a href="https://apify.com/apify/facebook-events-scraper">Facebook Events Scraper</a></td>
<td>👥 <a href="https://apify.com/apify/facebook-groups-scraper">Facebook Groups Scraper</a></td>
</tr>
<tr>
<td>🕹 <a href="https://apify.com/apify/facebook-games-scraper">Facebook Games Scraper</a></td>
<td>👀 <a href="https://apify.com/apify/facebook-marketplace-scraper">Facebook Marketplace Scraper</a></td>
<td>🎞 <a href="https://apify.com/apify/facebook-reels-scraper">Facebook Reels Scraper</a></td>
</tr>
<tr>
<td>🌟 <a href="https://apify.com/apify/facebook-reviews-scraper">Facebook Reviews Scraper</a></td>
<td>📝 <a href="https://apify.com/apify/facebook-posts-scraper">Facebook Posts Scraper</a></td>
<td>📹 <a href="https://apify.com/apify/facebook-video-search-scraper">Facebook Video Search Scraper</a></td>
</tr>
<tr>
<td>💬 <a href="https://apify.com/apify/facebook-comments-scraper">Facebook Comments Scraper</a></td>
<td>👍 <a href="https://apify.com/apify/facebook-likes-scraper">Facebook Likes and Reactions Scraper</a></td>
<td>ℹ️ <a href="https://apify.com/apify/facebook-page-contact-information">Facebook Page Contact Information</a></td>
</tr>
<tr>
<td>👥 <a href="https://apify.com/apify/facebook-groups-scraper">Facebook Groups Scraper</a></td>
<td>🏞 <a href="https://apify.com/apify/facebook-photos-scraper">Facebook Photos Scraper</a></td>
<td>🔮 <a href="https://apify.com/apify/brand-collaboration-scraper">Brand Collaboration Scraper</a></td>
</tr>
<tr>
<td>🛍️ <a href="https://apify.com/apify/facebook-ads-scraper">Facebook Ads Library Scraper</a></td>
<td>📱 <a href="https://apify.com/apify/facebook-page-contact-information">Facebook Pages Info Scraper</a></td>
</tr>
</table>

### ❓ FAQ

#### Is there a difference between scraping a Facebook page and Facebook profile?

Yes, there is. Facebook Pages are created for businesses, companies, non-profits, and other social causes. Those are the Facebook accounts that strive to provide "public-first" content and are often managed by a group of people. An easy way to distinguish between a Facebook profile and a Facebook page is that pages usually have a category of content and activity they would like to be associated with (news, software, hospitality, etc.) Facebook Pages that are particularly popular often include a blue verification badge. Facebook profiles are created for personal use.

Facebook Pages Scraper can extract information from both Facebook pages and Facebook profiles. However, the data provided by each differs. **Generally, Facebook profiles contain less data**. From Facebook profile, you can typically expect: `facebookUrl`, `pageName`, `pageId`, `pageUrl`, `title`, `facebookId`, `coverPhotoUrl`, and `personalProfile` (name, gender, profile photos: small, medium, large).

#### Why do I see less information for some Facebook pages?

Some Facebook pages have restrictions set either by Facebook or by the page owners, which can limit the information that's publicly available. Without logging into an account, access to certain details may be restricted. Logging into a Facebook account can help verify whether that's the case or whether there's an issue with the scraper itself.

#### Can I export Facebook Pages data using API?

Yes, you can access the extracted Facebook data through the Apify API. You’ll need an Apify account and your API token (available under Integrations settings in Console). Apify API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more. To access the API using Node.js, use the `apify-client` [NPM package](https://apify.com/apify/facebook-pages-scraper/api/javascript). To access the API using Python, use the `apify-client` [PyPI package](https://apify.com/apify/facebook-pages-scraper/api/python).

Click on the [API tab](https://apify.com/apify/facebook-pages-scraper/api) for code examples or check out the [Apify API reference docs](https://docs.apify.com/api/v2) for full detail.

#### Can I use Facebook Pages Scraper through an MCP Server?

With Apify API, you can use Facebook Pages Scraper within your AI workflows. You can connect to the MCP Server using clients like ClaudeDesktop and LibreChat or build your own. Here's you can se up 📘 Facebook Scraper via Model Context Protocol (MCP) server, you should:

1. Start a Server-Sent Events (SSE) session to receive a `sessionId`.
2. Send API messages using that `sessionId` to trigger the scraper.
3. The message starts the 📘 Facebook Pages Scraper with the provided input.
4. The response should be: `Accepted`.

#### Do I need proxies to scrape data from Facebook Pages?

You need proxies in general but you don't need to do anything extra to apply them if you run the scraper on the Apify platform. For successful Facebook scraping, we run [residential proxies](https://apify.com/proxy?pricing=residential-ip#pricing) in the background which are included in Apify's monthly Starter plan **($29)**.

#### Can I integrate data from Facebook Pages Scraper with other apps?

Yes. Facebook Pages Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). You can **integrate with Make, Zapier, ChatGPT, Slack, Airbyte, GitHub, Google Sheets, Asana, Google Drive, Keboola, MCP Servers**, and more.

You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Pages Scraper successfully finishes a run.

#### Is it legal to scrape Facebook Pages data?

Our [Facebook scrapers](https://apify.com/store/categories?search=facebook\&managedBy=APIFY) are ethical and **do not extract any private user data**. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.

If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) and [ethical scraping](https://blog.apify.com/what-is-ethical-web-scraping-and-how-do-you-do-it/).

#### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Pages Scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://apify.com/apify/facebook-pages-scraper/issues/open).

# Actor input Schema

## `startUrls` (type: `array`):

Provide urls of Facebook pages you want to get information from. Only works on facebook pages, not personal profiles (not even public ones).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/copperkettleyqr/"
    },
    {
      "url": "https://www.facebook.com/HiltonGardenInnMontrealAirport/"
    }
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped data

# 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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/copperkettleyqr/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/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 = { "startUrls": [{ "url": "https://www.facebook.com/copperkettleyqr/" }] }

# Run the Actor and wait for it to finish
run = client.actor("apify/facebook-pages-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/copperkettleyqr/"
    }
  ]
}' |
apify call apify/facebook-pages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apify/facebook-pages-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Pages Scraper",
        "description": "Extract basic data from multiple Facebook Pages or Profiles. Extract Facebook page details, website, email, address, messenger, likes, followers, rating, ad running status, and other public data. Export scraped data, schedule scraper via API, integrate with other tools or AI workflows.",
        "version": "0.0",
        "x-build-id": "2HklLYNSvw6Zqf3KF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apify~facebook-pages-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apify-facebook-pages-scraper",
                "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/apify~facebook-pages-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apify-facebook-pages-scraper",
                "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/apify~facebook-pages-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apify-facebook-pages-scraper",
                "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": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start urls",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Provide urls of Facebook pages you want to get information from. Only works on facebook pages, not personal profiles (not even public ones).",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
