# Facebook Email Scraper (`perfectscrape/facebook-email-scraper`) Actor

Extract emails from Facebook fast and effortlessly! Search by keywords, scrape unlimited Google pages, and filter by domains like Gmail, Yahoo, or custom options. Get precise email lists with Facebook links. Get emails from facebook groups, profile and posts. Try it today! 🚀

- **URL**: https://apify.com/perfectscrape/facebook-email-scraper.md
- **Developed by:** [Sadnan](https://apify.com/perfectscrape) (community)
- **Categories:** Lead generation, Social media
- **Stats:** 1,618 total users, 19 monthly users, 100.0% runs succeeded, 27 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Email Scraper

**Facebook Email Scraper** is a fast and efficient tool for extracting email addresses from Facebook profiles, posts, and groups via Google searches. Designed for precision, it allows users to target specific keywords, locations, and email domains to collect accurate and reliable email leads.

With lightning-fast performance, customizable filters, and proxy support, this scraper ensures you can gather high-quality data at scale without breaking a sweat. Whether you're looking to collect emails for outreach, build contact lists, or conduct targeted searches, this tool makes the process simple and effective.

***

### 🌟 Features

- **Blazing Speed**: Scrape multiple Google pages in minutes, extracting data quickly and reliably.
- **Keyword Targeting**: Focus your search with keywords to pinpoint relevant profiles and posts.
- **Custom Domain Filters**: Extract emails from popular domains like Gmail, Yahoo, and Outlook, or set your own custom domains.
- **Proxy Support**: Use proxy configurations to avoid blocks and ensure smooth operation.
- **Precise Data Collection**: Gather emails along with links to the corresponding Facebook content for full context.

***

### 🛠️ How to Use

1. **Set Filters**: Define keywords, email domains, and the number of Google pages to scrape.
2. **Configure Proxies**: Add proxy settings for uninterrupted scraping.
3. **Run the Scraper**: Start the tool and watch it extract emails, Facebook links, and metadata.
4. **Export Data**: Download results in CSV or JSON format for further use.

***

### 📝 Input Fields

| **Input Field**        | **Description**                               | **Type**       |
| ---------------------- | --------------------------------------------- | -------------- |
| **keyword**            | List of keywords to search for on Facebook.   | Array (string) |
| **pagesToScrape**      | Number of Google pages to scrape (max 200).   | Integer        |
| **scrapeGmail**        | Include @gmail.com emails in the results.     | Boolean        |
| **scrapeYahoo**        | Include @yahoo.com emails in the results.     | Boolean        |
| **scrapeOutlook**      | Include @outlook.com emails in the results.   | Boolean        |
| **scrapeCustom**       | Custom email domains to scrape (without `@`). | Array (string) |
| **proxyConfiguration** | Proxy settings for smooth operation.          | Object         |

#### 📥 Input Example (JSON)

```json
{
    "keyword": ["marketing manager"],
    "pagesToScrape": 10,
    "scrapeGmail": true,
    "scrapeYahoo": false,
    "scrapeOutlook": false,
    "scrapeCustom": ["businessdomain.com"]
}
```

### 📤 Output Fields

| **Field**   | **Description**                                            | **Example**                                                 |
| ----------- | ---------------------------------------------------------- | ----------------------------------------------------------- |
| **emails**  | List of extracted email addresses.                         | `["dempseyspecialist08@gmail.com"]`                         |
| **link**    | URL of the corresponding Facebook profile, post, or group. | `https://www.facebook.com/groups/266318674655211/posts/...` |
| **keyword** | Keyword used in the search that generated this result.     | `"marketing manager"`                                       |

##### 📥 Example Output:

```json
{
    "emails": ["kallie.ankeny@gmail.com"],
    "link": "https://www.facebook.com/profile/129347128478",
    "keyword": "marketing manager"
}
```

***

### 🚀 Why Use Facebook Email Scraper?

- **Speed and Efficiency**: Collect large amounts of data in a fraction of the time it would take manually.
- **Customizable Searches**: Tailor your search parameters to get exactly the data you need.
- **Accurate Results**: Extract precise data tied to Facebook profiles and posts for actionable insights.
- **Seamless Integration**: Export data in compatible formats for easy use with other tools or platforms.

***

### 🛡️ Bugs, Fixes, and Updates

We continuously improve this scraper to ensure it performs seamlessly. If you encounter any issues, have feature requests, or want to report a bug, please [create an issue here](https://console.apify.com/actors/i4B662uq8aosylSDD/issues). Regular updates focus on adding features, improving accuracy, and enhancing speed.

***

Get started with **Facebook Email Scraper** today and take control of your data collection process!

# Actor input Schema

## `keyword` (type: `string`):

Keyword to search for in the Pinterest profile/posts. It can be a Location, job title, company name, etc or combined.

## `pagesToScrape` (type: `integer`):

The number of emails to scrape. The scraper will stop after scraping this amount of emails.

## `scrapeGmail` (type: `boolean`):

Whether to scrape emails with @gmail.com domain

## `scrapeYahoo` (type: `boolean`):

Whether to scrape emails with @yahoo.com domain

## `scrapeOutlook` (type: `boolean`):

Whether to scrape emails with @outlook.com domain

## `scrapeCustom` (type: `array`):

Custom email domains to scrape. Without the '@' symbol

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

Proxy settings for the scraper

## Actor input object example

```json
{
  "keyword": "marketing",
  "pagesToScrape": 20,
  "scrapeGmail": true,
  "scrapeYahoo": true,
  "scrapeOutlook": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("perfectscrape/facebook-email-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("perfectscrape/facebook-email-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 '{}' |
apify call perfectscrape/facebook-email-scraper --silent --output-dataset

```

## MCP server setup

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