# Facebook Pages Scraper: Emails, Phones & Leads (`pnda/facebook-pages-scraper`) Actor

Scrape Facebook business pages by URL or find them by keyword and city: name, category, followers, website, phone, address, rating and a verified email (SMTP-checked). No login. Pay per page.

- **URL**: https://apify.com/pnda/facebook-pages-scraper.md
- **Developed by:** [PNDA](https://apify.com/pnda) (community)
- **Categories:** Lead generation, Social media, Marketing
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.90 / 1,000 facebook pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Pages Scraper: Emails, Phones & Leads

**Scrape Facebook business pages and get their contacts.** Paste page URLs, or just type what the businesses do and a city ("pizzeria" + "Lyon", "plumber" + "Austin"): the Actor finds the Facebook pages and returns, for each one, the name, category, followers, website, phone, address, rating and a **verified email**.

No login, no cookies, no Facebook account needed. Public page data only.

### What does Facebook Pages Scraper do?

| You give | You get |
|---|---|
| A keyword ("restaurant", "yoga studio", "real estate agency") and optionally a city | Facebook business pages that match, found through Google |
| A list of Facebook page URLs or usernames | Each page, with its details and contacts |

For every page:

- **Page**: name, URL, page ID, username, category, followers, verified badge, logo, creation date, "running ads" flag, description and about text.
- **Contacts**: public email(s), phone(s), website, address, opening hours (when public), rating and review count.
- **Verified email**: the page's public email checked by SMTP, or an email found on the business's own website (home, contact and legal pages, then contact@ / info@ addresses), checked the same way. `email_status` tells you what you got: `found` (deliverable), `catch-all`, `unverified`, `not-found`, `no-website`.

### Why use it?

- **Local lead generation**: restaurants, shops, salons, trades and agencies in one city, with a phone and an email you can actually reach.
- **Sales prospecting and agencies**: enrich a list of Facebook pages before a campaign; export to CSV, Excel or Google Sheets.
- **Market research**: categories, follower counts, ratings and who is running ads in a niche.

### How to use it

1. Choose **Find pages by keyword and city**, type one or more keywords and a city. Or choose **Scrape my list** and paste page URLs.
2. Keep **Find and verify an email** on to get a deliverable email (billed only when one is confirmed).
3. Optional: **Only pages with an email**.
4. Run, then export the results.

Example input:

```json
{
  "mode": "search",
  "keywords": ["restaurant"],
  "location": "paris",
  "country": "fr",
  "language": "fr",
  "maxResultsPerKeyword": 20,
  "findEmail": true
}
```

Example output (shortened):

```json
{
  "pageUrl": "https://www.facebook.com/lepetitcambodge",
  "name": "Le Petit Cambodge",
  "category": "Cambodian restaurant",
  "followers": 12000,
  "email": "hello@lepetitcambodge.fr",
  "email_status": "found",
  "email_source": "facebook",
  "phone": "+33 1 42 45 80 88",
  "website": "http://www.lepetitcambodge.fr/",
  "rating": 90,
  "ratingCount": 708,
  "isRunningAds": true
}
```

### How much does it cost?

Pay per result, nothing else:

| Event | Price |
|---|---|
| Facebook page (with its details) | $6.90 / 1,000 |
| Verified email found (SMTP-confirmed) | $9 / 1,000 |
| Published email on a catch-all mail server | $4.50 / 1,000 |

Pages not found, private, removed or filtered out are **free**. Unverified emails, catch-all guesses and failed lookups are **free**. The Actor never spends more than the maximum cost per run you set.

### FAQ

**Is it legal?** The Actor only reads public business information. You are responsible for how you use the data (GDPR, CAN-SPAM and local rules on prospecting).

**Why is a page "not-found"?** It was removed, renamed, is age- or country-restricted, or is not a page (groups and events are not supported). You are not charged.

**Does it scrape posts?** No, page details and contacts only.

# Actor input Schema

## `mode` (type: `string`):

"Find pages": no URL needed, the Actor finds Facebook business pages by keyword and city (Google search of facebook.com). "Scrape my list": paste Facebook page URLs.

## `keywords` (type: `array`):

What the businesses do, one per line: "pizzeria", "plumber", "yoga studio", "wedding photographer". Each keyword is searched separately.

## `location` (type: `string`):

Narrows the search to pages that mention this place: "Lyon", "Brooklyn", "Austin TX".

## `maxResultsPerKeyword` (type: `integer`):

How many Facebook pages to deliver for each keyword.

## `country` (type: `string`):

Country of the Google search (2 letters): us, fr, gb, es, de, br… Set it to the businesses' country.

## `language` (type: `string`):

Google interface language (2 letters): en, fr, es, de, pt, it…

## `pageUrls` (type: `array`):

Page URLs or usernames, one per line: https://www.facebook.com/lepetitcambodge, facebook.com/profile.php?id=100064…, or just lepetitcambodge. Groups, events and posts are not pages. Duplicates are removed.

## `findEmail` (type: `boolean`):

Checks the page's public email by SMTP and, when the page has a website, looks for an email on the website (home, contact and legal pages, then contact@ / info@…). Billed as "Verified email found" only when an email is confirmed deliverable. Off: the page's public email is delivered as is, unverified.

## `requireEmail` (type: `boolean`):

Skip the pages without any email. Skipped pages are never charged.

## `simulateFreePlan` (type: `boolean`):

Owner test switch, ignored for everyone else.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "restaurant"
  ],
  "location": "paris",
  "maxResultsPerKeyword": 5,
  "country": "us",
  "language": "en",
  "pageUrls": [
    "https://www.facebook.com/lepetitcambodge"
  ],
  "findEmail": true,
  "requireEmail": false,
  "simulateFreePlan": false
}
```

# Actor output Schema

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

All pages (JSON, CSV, Excel).

# 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 = {
    "mode": "search",
    "keywords": [
        "restaurant"
    ],
    "location": "paris",
    "maxResultsPerKeyword": 5,
    "pageUrls": [
        "https://www.facebook.com/lepetitcambodge"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pnda/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 = {
    "mode": "search",
    "keywords": ["restaurant"],
    "location": "paris",
    "maxResultsPerKeyword": 5,
    "pageUrls": ["https://www.facebook.com/lepetitcambodge"],
}

# Run the Actor and wait for it to finish
run = client.actor("pnda/facebook-pages-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 '{
  "mode": "search",
  "keywords": [
    "restaurant"
  ],
  "location": "paris",
  "maxResultsPerKeyword": 5,
  "pageUrls": [
    "https://www.facebook.com/lepetitcambodge"
  ]
}' |
apify call pnda/facebook-pages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pnda/facebook-pages-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/JvQhtULkUCmNxgB54/builds/YLiWN32yfRwiEE21x/openapi.json
