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

Facebook Email Scraper extracts publicly indexed Facebook email addresses using targeted keywords, locations, and email domains. Find relevant leads, business contacts, and prospect data with automated Google search, duplicate filtering, and structured Apify dataset output.

- **URL**: https://apify.com/email\_scraper/facebook-email-scraper.md
- **Developed by:** [Email Scraper](https://apify.com/email_scraper) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Facebook Email Scraper Overview

**Facebook Email Scraper** is an Apify Actor designed to extract publicly visible email addresses associated with Facebook search results. It searches Google for Facebook pages and profiles using your keywords, optional location, and selected email-domain suffixes, then returns structured lead data in an Apify dataset.

The **Facebook Email Scraper** is useful for lead generation, prospect research, market research, contact discovery, and building targeted lists from publicly indexed Facebook content. You can combine multiple keywords, locations, and email domains to broaden or refine your search.

The scraper does not access private Facebook information. It works with information available through Google search results for publicly indexed Facebook pages and profiles.

### Facebook Email Scraper Features

The **Facebook Email Scraper** provides a keyword-driven workflow for discovering publicly indexed Facebook contact information.

Key capabilities include:

- **Keyword-based Facebook email extraction** using Google search queries.
- **Multiple keywords** in a single Actor run.
- **Multiple email domains**, such as `@gmail.com`, `@yahoo.com`, or custom domains.
- **Optional geographic targeting** using a country, state, or city.
- **Exclude-word filtering** for removing unwanted search-result snippets.
- **Per keyword + domain email targets** controlled by `maxEmails`.
- **Duplicate email detection** across the entire run.
- **Google SERP proxy usage** through Apify's `GOOGLE_SERP` proxy group.
- **Pagination through Google search results** to discover additional indexed pages.
- **Incremental dataset output** as emails are discovered.
- **Persistent progress tracking** for improved recovery after interruptions.
- **Structured lead information** including keyword, title, description, URL, and email.

These features make the **Facebook Email Scraper** suitable for users who need a practical Facebook data extractor without manually searching individual pages.

### How to Use the Facebook Email Scraper

Using the **Facebook Email Scraper** is straightforward:

1. Enter one or more relevant keywords.
2. Optionally enter a country, state, or city in the location field.
3. Add the email-domain suffixes you want to search for.
4. Set the maximum email target.
5. Optionally add words or phrases to exclude.
6. Start the Actor.
7. Review the discovered leads in the Apify dataset.

For better coverage, use several specific keywords instead of one broad term.

For example, rather than searching only for:

```text
fitness
```

you can use:

```text
fitness coach
fitness trainer
fitness influencer
online fitness coach
personal trainer
```

Each keyword is processed against each configured email domain.

The **Facebook Email Scraper** constructs Google searches using the following general pattern:

```text
site:facebook.com <keyword> "<email-domain>"
```

When a location is supplied, the location is added to the search query as well.

### Facebook Email Scraper Data Extraction

The **Facebook Email Scraper** parses Google organic search results and examines the result descriptions for email addresses matching your configured domain suffixes.

For example, when `@gmail.com` is selected, the scraper searches result descriptions for email addresses ending in that domain.

The extracted lead contains the original search keyword, result title, description, Facebook-related URL returned by the search result, and discovered email address.

This makes the resulting dataset useful for downstream lead research and data analysis.

The scraper also maintains a set of previously discovered email addresses. When the same email appears again during the run, it is not pushed as another unique result.

#### What the Facebook Email Scraper Searches

The search process is based on Google SERP results containing:

- Facebook URLs
- User-provided keywords
- Selected email-domain suffixes
- Optional location terms

The Actor does not directly crawl private Facebook profiles or require Facebook login credentials.

### Facebook Email Scraper Use Cases

The **Facebook Email Scraper** can support several legitimate business and research workflows.

#### Lead Generation

Sales and marketing teams can search for publicly indexed Facebook contacts related to specific industries, professions, products, or services.

For example, keywords such as `real estate agent`, `photographer`, `fitness coach`, or `restaurant owner` can help discover relevant search results.

#### Market Research

Researchers can collect publicly indexed contact information associated with specific market segments and compare results across keywords or geographic areas.

#### Prospect Research

Businesses can use targeted search terms to identify potential prospects whose publicly indexed Facebook information includes an email address.

#### Competitor and Industry Research

The extracted title, description, URL, and email fields can provide additional context for researching businesses, creators, organizations, and other publicly indexed Facebook entities.

#### Data Analysis

Because results are pushed as structured dataset records, users can analyze discovered contacts according to keyword, domain, description, or source URL.

#### Contact Discovery

The **Facebook Email Scraper** can help discover publicly listed email addresses that may otherwise require substantial manual Google searching.

Always ensure that your use of collected contact information complies with applicable privacy, data-protection, anti-spam, and platform rules.

### Facebook Email Scraper Input

The following inputs are available in the Actor configuration.

| Input           | Type             | Required | Default                     | Description                                                                          |
| --------------- | ---------------- | -------- | --------------------------- | ------------------------------------------------------------------------------------ |
| `keywords`      | Array of strings | Yes      | `["skincare", "cosmetics"]` | Keywords or search queries used to find relevant Facebook results.                   |
| `location`      | String           | No       | `""`                        | Optional country, state, or city used to narrow Google searches.                     |
| `customDomains` | Array of strings | No       | `["@gmail.com"]`            | Email-domain suffixes to search for.                                                 |
| `maxEmails`     | Integer          | No       | `10`                        | Maximum email target for each keyword + domain combination. Valid range is 1–10,000. |
| `excludeWords`  | Array of strings | No       | `[]`                        | Words or phrases that cause matching search-result snippets to be skipped.           |

#### Keywords

`keywords` accepts multiple search terms.

Specific keywords generally provide more targeted search queries than extremely broad terms. You can therefore provide several related variations to expand search coverage.

Example:

```json
{
  "keywords": [
    "skincare",
    "skincare brand",
    "beauty influencer",
    "cosmetics store"
  ]
}
```

#### Location

`location` is optional.

For example:

```json
{
  "location": "New York"
}
```

The location is added to the Google search query to narrow results geographically. It is a search-query filter rather than a post-scrape verification of the profile's actual physical location.

Leave it empty when you want to search without a geographic term.

#### Custom Email Domains

`customDomains` controls which email suffixes the scraper looks for.

Example:

```json
{
  "customDomains": [
    "@gmail.com",
    "@yahoo.com",
    "@outlook.com"
  ]
}
```

Custom domains can also be supplied when you want to search for specific business-domain addresses.

#### Maximum Emails

`maxEmails` defines the target for each keyword + domain combination.

For example, with:

- 3 keywords
- 2 email domains
- `maxEmails = 20`

the Actor processes six keyword/domain combinations, with a target of up to 20 newly discovered addresses for each combination.

The configured value can be between **1 and 10,000**.

For free users, the implementation applies a maximum overall run limit of **100 unique emails**.

#### Exclude Words

`excludeWords` allows you to skip unwanted search-result descriptions.

Example:

```json
{
  "excludeWords": [
    "crypto",
    "onlyfans"
  ]
}
```

Single-word exclusions use case-insensitive whole-word matching. Phrases use case-insensitive substring matching.

If a result description matches an exclusion, the entire snippet is skipped and no email is extracted from that result.

### Facebook Email Scraper Output Data

The **Facebook Email Scraper** pushes structured records to the Apify dataset.

| Field         | Type   | Description                                                                |
| ------------- | ------ | -------------------------------------------------------------------------- |
| `network`     | String | Source network identifier. The implementation sets this to `Facebook.com`. |
| `keyword`     | String | Keyword responsible for the search result.                                 |
| `title`       | String | Title extracted from the Google organic result.                            |
| `description` | String | Description/snippet associated with the search result.                     |
| `url`         | String | URL extracted from the Google search result.                               |
| `email`       | String | Unique email address extracted from the result description.                |

The most important field for contact discovery is `email`. The `keyword` field shows which search term produced the result, while `title`, `description`, and `url` provide contextual information about the corresponding search result.

The `network` field identifies the intended source as Facebook.

The dataset view configured in `actor.json` displays `keyword`, `title`, `description`, `url`, and `email` in its primary table. The underlying records pushed by `main.py` also contain the `network` field.

### Example Input

The following is a valid example using the Actor's supported input structure:

```json
{
  "keywords": [
    "fitness coach",
    "personal trainer",
    "online fitness coach"
  ],
  "location": "New York",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "maxEmails": 20,
  "excludeWords": [
    "crypto",
    "onlyfans"
  ]
}
```

### Example Output

A resulting dataset record follows the structure produced by `main.py`:

```json
{
  "network": "Facebook.com",
  "keyword": "fitness coach",
  "title": "Example Fitness Coach | Facebook",
  "description": "Fitness coach ... contact example@gmail.com ...",
  "url": "https://www.facebook.com/example",
  "email": "example@gmail.com"
}
```

Actual titles, descriptions, URLs, and emails depend on the Google search results available for your selected keywords, domains, and location.

### Facebook Email Scraper Search and Pagination

The **Facebook Email Scraper** processes each keyword and email-domain combination separately.

For every combination, it creates a Google search query and retrieves search-result pages. Pagination can continue through a large number of pages when useful results remain available.

The implementation has several stopping conditions designed to avoid continuing indefinitely when searches stop producing useful new email addresses.

The collector can stop when the configured target is reached, when multiple consecutive pages produce no new emails, when later pages become inefficient, when empty result pages persist, or when repeated request failures trigger an abort for the current pair.

This means the Actor does not blindly process every possible page when the search is no longer producing useful results.

### Facebook Email Scraper Duplicate Handling

The **Facebook Email Scraper** maintains a set of emails already discovered during the run.

When an email address appears again in another search result, the Actor checks whether it has already been registered. Existing addresses are skipped instead of being pushed again.

This helps keep the resulting dataset focused on unique email addresses.

Duplicate handling applies across the run rather than only to an individual Google result page.

### Facebook Email Scraper Proxy and Request Handling

The **Facebook Email Scraper** uses Apify's `GOOGLE_SERP` proxy group when initializing its Google search infrastructure.

The proxy manager can rotate the proxy URL when a request fails.

Google SERP requests also use retry behavior. If repeated page requests fail, the scraper records the failures and can stop processing the current keyword/domain combination after the configured failure threshold is reached.

This behavior is intended to make Google search retrieval more resilient while preventing a repeatedly failing search pair from continuing indefinitely.

### Facebook Email Scraper Progress and Resume Behavior

The implementation persists scraping progress in an Apify key-value store.

The stored state includes:

- Previously discovered email addresses
- Current keyword position
- Current domain position

Progress is saved as results are processed and when keyword/domain combinations advance.

This allows the Actor to retain run state if execution is interrupted and provides a mechanism for continuing from the stored processing position rather than treating every execution step as completely new.

### Facebook Email Scraper Result Limits

The `maxEmails` setting has a **per keyword + domain combination** target in the implementation.

For example:

```text
Keywords: 2
Domains: 3
maxEmails: 10
```

creates six keyword/domain combinations, with each combination having its own target of up to 10 newly discovered emails.

The actual number returned can be lower because the scraper can only extract email addresses that are present in the retrieved search-result descriptions.

For free users, the code applies a maximum of **100 unique emails** per run. Paid users are not subjected to that code-level free-tier ceiling.

### Improving Facebook Email Scraper Results

If the **Facebook Email Scraper** returns fewer addresses than expected, consider broadening the search strategy.

Useful approaches include:

- Add related keyword variations.
- Replace extremely narrow phrases with broader terms.
- Add additional email domains.
- Remove the location filter when geographic targeting is unnecessary.
- Use several job titles or industry-specific terms.
- Review whether `excludeWords` is filtering too aggressively.

For example, instead of using only `marketing`, consider:

```text
marketing agency
digital marketing
marketing consultant
social media marketing
marketing manager
```

Using multiple relevant search terms can provide broader search coverage than relying on one keyword.

### Facebook Email Scraper Search Intent

The **Facebook Email Scraper** is designed around search intent such as finding publicly indexed Facebook contact information, discovering email addresses associated with relevant Facebook results, researching businesses and professionals, and building structured contact datasets.

Common tasks include:

- Finding Facebook contacts by industry
- Discovering business-related email addresses
- Searching Facebook results by keyword
- Narrowing search results by location
- Searching specific email providers
- Extracting structured contact information
- Building datasets for research and analysis

The combination of keyword, location, and email-domain filters lets users create focused searches instead of relying on a single generic Facebook query.

### Frequently Asked Questions

#### What is the Facebook Email Scraper?

The **Facebook Email Scraper** is an Apify Actor that searches Google for publicly indexed Facebook results and extracts email addresses matching the configured email-domain suffixes.

#### How does the Facebook Email Scraper find emails?

The **Facebook Email Scraper** builds Google queries using `site:facebook.com`, your keyword, and the selected email-domain suffix. It then extracts matching email addresses from Google result descriptions.

#### Can I search multiple Facebook keywords?

Yes. The `keywords` input accepts an array of strings, allowing multiple searches within one Actor run.

#### Can I use a location with the Facebook Email Scraper?

Yes. The optional `location` input accepts a country, state, city, or other geographic search term. It is added to the Google query to narrow search results.

#### Can I search multiple email domains?

Yes. The **Facebook Email Scraper** supports multiple values in `customDomains`, such as `@gmail.com`, `@yahoo.com`, and `@outlook.com`.

#### What does maxEmails mean?

`maxEmails` is the target for each keyword + domain combination. It is not simply one shared target across all configured keyword/domain combinations.

#### Does the Facebook Email Scraper remove duplicates?

Yes. The implementation maintains a set of previously discovered email addresses and skips emails that have already been collected during the run.

#### Can I exclude unwanted results?

Yes. Use `excludeWords` to skip search-result descriptions containing specified words or phrases.

#### Does the scraper access private Facebook profiles?

No. The implementation searches Google for publicly indexed Facebook results and extracts information available in those search-result descriptions. It does not log into Facebook or claim access to private profile information.

#### What data does the Facebook Email Scraper return?

Each pushed record contains `network`, `keyword`, `title`, `description`, `url`, and `email`.

#### Does the Facebook Email Scraper guarantee the requested number of emails?

No. `maxEmails` is a target/cap, not a guarantee. Results depend on what publicly indexed Google results contain for the selected search terms, domains, and location.

#### Why did my run return fewer emails?

A search may contain few relevant results, no matching email addresses, duplicate addresses, excluded snippets, or insufficient publicly indexed information. Broader keywords and additional domains can improve coverage.

#### Is the output structured?

Yes. The **Facebook Email Scraper** pushes structured records into the Apify dataset, making the collected lead information easier to review and process.

### Why Use This Actor

The **Facebook Email Scraper** combines targeted search inputs with automated extraction so users do not have to manually inspect large numbers of Google results.

Its practical advantages include:

- **Automated discovery** instead of manual searching.
- **Keyword targeting** for specific industries and audiences.
- **Location targeting** when geographic search terms are useful.
- **Domain targeting** for selected email providers or domains.
- **Duplicate prevention** for cleaner results.
- **Exclude filtering** for unwanted search-result snippets.
- **Structured dataset records** for easier analysis.
- **Incremental output** as results are discovered.
- **Progress persistence** for improved recovery after interruptions.
- **Proxy rotation and retry handling** for Google SERP requests.

The result is a focused workflow for turning relevant search queries into structured Facebook contact data.

### API and Automation

The **Facebook Email Scraper** runs as an Apify Actor and stores extracted records in its Apify dataset.

Users can configure the Actor's supported input fields and execute it through the Apify platform or compatible Apify automation workflows. Dataset records can then be processed using Apify's available dataset and Actor tooling.

The Actor itself does not define additional third-party integrations or custom API endpoints beyond the functionality provided by its Apify runtime.

### Best Practices for Facebook Email Scraper

For stronger results, start with focused but sufficiently broad keywords.

A useful strategy is to combine:

- Industry terms
- Job titles
- Service categories
- Audience descriptions
- Product categories
- Geographic terms when necessary

For example:

```text
Keyword 1: skincare
Keyword 2: skincare brand
Keyword 3: beauty store
Keyword 4: cosmetics business
```

You can then combine those searches with multiple email-domain suffixes.

Avoid making searches unnecessarily restrictive. A highly specific keyword, narrow location, single domain, and aggressive exclusion list can significantly reduce the number of matching public results.

### Facebook Email Scraper Limitations

The **Facebook Email Scraper** depends on publicly indexed Google search results, so it cannot extract information that Google does not expose in the retrieved result pages.

Important considerations include:

- A Facebook page or profile may not be indexed by Google.
- A result may not contain an email address.
- An email may be present but use a domain you did not configure.
- Location filtering is based on the Google search query and is not a verified physical-location check.
- `maxEmails` does not guarantee that the requested number exists.
- Exclusion rules can intentionally remove otherwise matching results.
- Repeated request failures can stop processing for a keyword/domain pair.
- Search-result availability can vary over time.

These limitations are inherent to a search-result-based extraction approach.

### Getting Better Value From the Facebook Email Scraper

The best results usually come from combining several relevant search dimensions rather than relying on one broad keyword.

Start with a small number of targeted terms, review the returned data, and then expand with related keywords or email domains.

If results are sparse, consider removing the location filter or broadening your keywords. If results are too broad, use more specific terms or exclusion words to focus the dataset.

This approach makes the **Facebook Email Scraper** useful for both targeted contact discovery and broader market research workflows.

### Support

If you encounter an issue with the **Facebook Email Scraper**, first review your keywords, email-domain settings, location, exclusion terms, and `maxEmails` configuration.

For Actor-specific assistance, customization requests, or bespoke scraper development, use the support contact provided in the Actor configuration:

**<alphascraper69@gmail.com>**

When reporting an issue, include the relevant input configuration and a description of the unexpected behavior so it can be investigated efficiently.

# Actor input Schema

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

A list of keywords or queries to search for.

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

Optional country, state or city used to narrow the search. Leave it empty to search without a geographic filter.

## `customDomains` (type: `array`):

List of custom email domains

## `maxEmails` (type: `integer`):

How many addresses each search keyword + domain suffix combination may collect before the finder moves on to the next one. This is a per-combination target, not a run-wide total: with 3 keyword and 2 Domains and a limit of 20, the run works through all 6 combinations and aims for up to 20 addresses in each, so up to 120 overall. Lower values finish sooner and cost less; higher values dig deeper but never guarantee a fuller result, since the run can only find what is publicly listed.

## `excludeWords` (type: `array`):

Words or phrases you do not want to see.

## Actor input object example

```json
{
  "keywords": [
    "skincare",
    "cosmetics"
  ],
  "location": "New york",
  "customDomains": [
    "@gmail.com"
  ],
  "maxEmails": 10,
  "excludeWords": []
}
```

# Actor output Schema

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

No description

# 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 = {
    "keywords": [
        "skincare",
        "cosmetics"
    ],
    "location": "New york",
    "customDomains": [
        "@gmail.com"
    ],
    "excludeWords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("email_scraper/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 = {
    "keywords": [
        "skincare",
        "cosmetics",
    ],
    "location": "New york",
    "customDomains": ["@gmail.com"],
    "excludeWords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("email_scraper/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 '{
  "keywords": [
    "skincare",
    "cosmetics"
  ],
  "location": "New york",
  "customDomains": [
    "@gmail.com"
  ],
  "excludeWords": []
}' |
apify call email_scraper/facebook-email-scraper --silent --output-dataset

```

## MCP server setup

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