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

Facebook Email Scraper SD - Facebook Email Scraper is a powerful tool that extracts public business emails, Page names, handles and profile URLs from Facebook results by keyword, industry, location and email domain - Facebook email extractor for local business lead generation.

- **URL**: https://apify.com/neuro-data/facebook-email-scraper.md
- **Developed by:** [Neuro Data](https://apify.com/neuro-data) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.99 / 1,000 results

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?

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

### Facebook Email Scraper - Public Contact Emails from Facebook Pages and Profiles

The **Facebook Email Scraper** is an Apify Actor that collects publicly indexed contact emails belonging to Facebook Pages, profiles and community pages. Give it keywords, get a structured dataset of leads.

The Facebook Email Scraper works by running `site:facebook.com` searches through the Apify GOOGLE\_SERP proxy and parsing addresses out of the result blocks. That is the whole mechanism, stated plainly.

The Facebook Email Scraper does **not** log into Facebook, does **not** use Meta's Graph API and does **not** open facebook.com. No browser, no JavaScript rendering, no authentication, no cookies.

Everything the Facebook Email Scraper returns already exists in Google's public index: titles, snippets and site labels. If a contractor published `quotes@gmail.com` on a Page that Google crawled, this Actor can surface it.

That makes it a **Facebook email extractor** for keyword-driven contact discovery and local lead generation. You do not need a list of Page URLs - you start from an industry, a job title or a city.

***

### Key Features

| Feature | What it does |
|---|---|
| Keyword-driven search | Start the Facebook Email Scraper from an industry or job title, not from a list of Page URLs |
| Query expansion | Each keyword x domain pair runs as base, quoted, `intitle:` and one variant per modifier |
| Domain filtering | Only emails on the domains you list (`@gmail.com`, `@yahoo.com`, ...) are kept |
| Obfuscation handling | Understands `name [at] domain [dot] com`, `name (at) domain`, `name @ domain.com`, `domain .com`, zero-width characters and the full-width at sign |
| Junk filter | Rejects placeholders such as `email@`, `yourname@`, `test@`, `xxx@` and single-character locals |
| Boundary-correct matching | `@gmail.com` never matches inside `@gmail.company` or `@gmail.com.br` |
| Global deduplication | One row per unique email across every query and every page |
| Concurrency | An `asyncio` worker pool runs several queries in parallel with a shared stop signal |
| Retry logic | Up to 3 attempts per page, exponential backoff, a fresh proxy session per request |
| Block detection | CAPTCHA, "unusual traffic" and consent pages are detected and retried, never counted as empty |
| Resumable state | Progress lives in the key-value store, keyed by a hash of your input |
| Fallback parser | If Google's markup changes, a run degrades to "emails without account details", not "no emails" |
| Live dataset writes | Each lead reaches the Apify dataset the moment it is found |
| Location targeting | An optional location phrase is appended to every query |

The Facebook Email Scraper parser locates each `<h3>` title, then the smallest surrounding block. It does **not** depend on Google's CSS class names, which is why the Facebook Email Scraper tolerates most SERP layout changes.

***

### How the Facebook Email Scraper Works

The Facebook Email Scraper pipeline is short, deterministic and fully auditable from the `query` field it stores on every row.

1. **Read input.** Keywords, location, email domains and limits are validated.
2. **Build queries.** The Facebook Email Scraper composes `site:facebook.com` queries, e.g. `site:facebook.com roofing contractor "@gmail.com" "Austin"`.
3. **Expand queries.** Base queries run first, then quoted, `intitle:` and one variant per query modifier.
4. **Fetch search results.** Pages are retrieved asynchronously with `aiohttp` through the Apify GOOGLE\_SERP proxy.
5. **Parse structurally.** Each result block is isolated around its `<h3>` heading.
6. **Extract emails.** A domain-filtered regex pulls addresses from the block text after normalisation.
7. **Deduplicate and push.** Every new lead is written straight to the dataset as structured data.

Pagination per query is capped by `maxPagesPerQuery`. A query stops early once several consecutive pages yield no new email, so the crawler does not burn proxy calls on an exhausted result set.

Blocked or failed queries are re-queued once at the end of the run. The Facebook Email Scraper then logs a summary: pages fetched, blocked pages, retries and emails per page.

***

### What Data Does It Extract?

Every Facebook Email Scraper dataset item pairs an email with whatever account metadata Google exposed, plus provenance so you can trace each address back to its query.

Facebook is a mixed-surface platform, and that shows in the output. Business Pages usually expose a vanity path such as `facebook.com/austinroofingco`, which the Facebook Email Scraper turns into a `username` and a canonical `profileUrl`.

Group, event and numeric `profile.php` results do not expose a usable handle. Those rows carry `accountName` and `fullName` with `username: null` and an empty `profileUrl` - a Google limitation, not a bug.

***

### Input Schema for the Facebook Email Scraper

| Field | Type | Default | Meaning |
|---|---|---|---|
| `keywords` | array (required) | `["founder", "small business"]` | Search terms describing the accounts you want (niche, job title, industry) |
| `location` | string | `""` | Optional location phrase added to every query |
| `customDomains` | array | `["@gmail.com", "@yahoo.com"]` | Only emails on these domains are kept; the leading `@` is optional |
| `maxEmails` | integer 1-10000 | `20` | Stop after this many unique emails |
| `countryCode` | string | `""` | Two-letter country for the search proxy (US, GB, DE...) |
| `expandQueries` | boolean | `true` | Search each keyword x domain pair in several phrasings |
| `queryModifiers` | array | `["email", "contact", "business inquiries", "collab", "booking", "dm"]` | Extra words combined with each keyword when expansion is on |
| `maxPagesPerQuery` | integer 1-50 | `30` | Page cap per query |
| `maxConcurrency` | integer 1-20 | `5` | Parallel queries |

The defaults are tuned for Facebook's small-business population. `contact`, `booking` and `business inquiries` are the phrases Page owners type beside an address, which is why the Facebook Email Scraper ships with them.

#### JSON input example

```json
{
  "keywords": ["roofing contractor", "wedding venue", "auto detailing"],
  "location": "Austin",
  "customDomains": ["@gmail.com", "@yahoo.com", "@hotmail.com"],
  "maxEmails": 500,
  "countryCode": "US",
  "expandQueries": true,
  "queryModifiers": ["contact", "email", "booking", "business inquiries"],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

***

### Output Schema and Structured Data Fields

Every item the Facebook Email Scraper writes carries all 14 fields below, so a CSV, XLSX or JSON export always has identical columns.

| Field | Meaning |
|---|---|
| `network` | Platform name |
| `keyword` | The keyword that produced the lead |
| `query` | The exact Google query used |
| `title` | Raw result title |
| `accountName` | Account label Google prints (Page handle or display name) |
| `fullName` | Display name parsed from a profile-style title; empty for post captions |
| `username` | URL-safe handle when Facebook exposes one; otherwise `null` |
| `profileUrl` | Canonical account URL when a handle is known; otherwise empty |
| `url` | Direct platform link when exposed, else the profile URL |
| `description` | Bio or post snippet, cleaned of labels and engagement counters |
| `email` | Lower-cased email address |
| `emailDomain` | The matched domain (e.g. `@gmail.com`) |
| `possiblyTruncated` | `true` when Google's snippet ellipsis touched the email - verify before sending |
| `foundAt` | ISO 8601 UTC timestamp |

#### JSON output example

```json
[
  {
    "network": "Facebook",
    "keyword": "roofing contractor",
    "query": "site:facebook.com roofing contractor \"contact\" \"@gmail.com\" \"Austin\"",
    "title": "Lone Star Roofing Co - Home | Facebook",
    "accountName": "lonestarroofingco",
    "fullName": "Lone Star Roofing Co",
    "username": "lonestarroofingco",
    "profileUrl": "https://www.facebook.com/lonestarroofingco",
    "url": "https://www.facebook.com/lonestarroofingco",
    "description": "Residential roofing in Austin, TX. Free inspections. Contact: lonestarroofing.tx@gmail.com",
    "email": "lonestarroofing.tx@gmail.com",
    "emailDomain": "@gmail.com",
    "possiblyTruncated": false,
    "foundAt": "2026-04-22T15:08:31Z"
  },
  {
    "network": "Facebook",
    "keyword": "wedding venue",
    "query": "site:facebook.com wedding venue \"booking\" \"@yahoo.com\"",
    "title": "Hill Country Wedding Vendors | Facebook",
    "accountName": "Hill Country Wedding Vendors",
    "fullName": "",
    "username": null,
    "profileUrl": "",
    "url": "https://www.facebook.com/groups/1184920371",
    "description": "Booking enquiries to hillcountryvenue@yahoo.com ...",
    "email": "hillcountryvenue@yahoo.com",
    "emailDomain": "@yahoo.com",
    "possiblyTruncated": true,
    "foundAt": "2026-04-22T15:09:12Z"
  }
]
```

The second row is the honest case. Google served a group page, so there is no vanity handle to build a `profileUrl` from, and the snippet ellipsis touched the address.

***

### How to Use the Facebook Email Scraper in Five Steps

1. **Open the Actor** and confirm your account has Apify proxy access. The GOOGLE\_SERP proxy is required.
2. **Enter 3-10 keywords.** Trade names beat categories: `HVAC repair` outperforms `home services`.
3. **Choose email domains.** Facebook's SMB population skews older, so keep `@yahoo.com` and add `@hotmail.com` and `@aol.com`.
4. **Set `maxEmails`.** Start at 20 to check quality, then raise it.
5. **Run, then export.** Download the dataset as CSV, JSON or XLSX, or pull it via the Apify API into your CRM.

Add a `location` when you are prospecting a city with the Facebook Email Scraper. Local businesses are the densest source of published addresses on this network.

***

### Facebook Email Scraper Use Cases

| Use case | Who it is for | How the Facebook Email Scraper helps |
|---|---|---|
| Local business lead generation | Agencies and SMMAs | Combine a trade keyword with a `location` for citywide prospect lists |
| Home services outreach | Franchise and SaaS sales | Reach roofers, plumbers, landscapers who publish a Page email |
| Community and group outreach | Event organisers, nonprofits | Find admins who list a contact address on public group pages |
| Event and venue sales | Hospitality suppliers | Collect venue and caterer emails per metro area |
| Real estate prospecting | Brokerages, proptech | Target agent Pages by city |
| Recruitment sourcing | Staffing firms | Search job titles that appear on public profiles |
| Market research | Analysts | Sample how a local trade presents itself and who publishes contact details |
| CRM enrichment | RevOps teams | Feed structured data straight into an existing pipeline |

For multi-channel campaigns, run the same keywords through the [Instagram Email Scraper](https://apify.com/neuro-data/instagram-email-scraper) - almost every Facebook Page for a local business has an Instagram twin. B2B lists pair well with the [LinkedIn Email Scraper](https://apify.com/neuro-data/linkedin-email-scraper).

***

### Why Use This Actor for Facebook Contact Discovery

Most Facebook lead scrapers are browser extensions that require you to be logged in and scrolling. The Facebook Email Scraper takes the opposite route: no session, no extension, no account risk on your side.

Because the Facebook Email Scraper never touches facebook.com, there is no login, no Graph API quota and nothing to maintain. Its only dependency is Apify's search proxy.

The extraction layer is where the value sits. Normalisation, obfuscation handling, the junk filter, boundary-correct domain matching and soft-wrap repair remove most of the noise naive regex email scraping produces.

Facebook Page descriptions are full of phone numbers, addresses and hours. The Facebook Email Scraper cleans labels and engagement counters out of `description` so the snippet you export is readable.

***

### Limitations

Read this before planning a campaign around the Facebook Email Scraper.

- **Public index only.** It finds accounts whose email is publicly visible in Google's index. Addresses behind login walls, in the Page "About" tab Google never crawled, or rendered in images are out of reach.
- **Google's ~300-result cap.** A single query returns roughly 300 results at most. Query expansion exists to work around that ceiling, so keep `expandQueries` on for volume.
- **`possiblyTruncated`.** When Google's snippet ellipsis touched an address, the row is flagged. Verify those rows before sending.
- **Handle availability.** `username` and `profileUrl` are populated only when Google's result exposes a vanity handle. Group, event and `profile.php` results return `accountName` and `fullName` instead.
- **Apify proxy required.** The Facebook Email Scraper cannot run without Apify GOOGLE\_SERP proxy credentials.
- **Free-plan cap.** Free Apify plans are capped at 100 emails per run. Paid plans are uncapped.
- **No volume guarantee.** Results vary with keywords, domains, location and what Google has indexed. Nothing is guaranteed, verified or real-time.

The Facebook Email Scraper is not affiliated with, endorsed by or officially supported by Facebook or Meta. Use the output in line with GDPR, CAN-SPAM and local marketing law.

***

### Related Actors

The Facebook Email Scraper shares its engine and output schema with every Actor below, all part of the Social, Creator & Community family.

| Actor | What it collects |
|---|---|
| [Instagram Email Scraper](https://apify.com/neuro-data/instagram-email-scraper) | Creator and brand emails from Instagram bios in Google's index |
| [TikTok Email Scraper](https://apify.com/neuro-data/tiktok-email-scraper) | Creator collab and booking emails from TikTok results |
| [YouTube Email Scraper](https://apify.com/neuro-data/youtube-email-scraper) | Business-inquiry emails from YouTube channel pages |
| [X Email Scraper](https://apify.com/neuro-data/x-email-scraper) | Founder and freelancer emails from X and Twitter profiles |
| [LinkedIn Email Scraper](https://apify.com/neuro-data/linkedin-email-scraper) | Professional contact emails from public LinkedIn profiles |
| [Pinterest Email Scraper](https://apify.com/neuro-data/pinterest-email-scraper) | Emails from Pinterest creator and brand profiles |
| [Snapchat Email Scraper](https://apify.com/neuro-data/snapchat-email-scraper) | Public emails from Snapchat public profile pages |
| [Reddit Email Scraper](https://apify.com/neuro-data/reddit-email-scraper) | Emails posted publicly in Reddit threads and subreddits |
| [Threads Email Scraper](https://apify.com/neuro-data/threads-email-scraper) | Contact emails from Threads profiles and posts |
| [Tumblr Email Scraper](https://apify.com/neuro-data/tumblr-email-scraper) | Emails from Tumblr blogs and about pages |
| [Telegram Email Scraper](https://apify.com/neuro-data/telegram-email-scraper) | Emails from public Telegram channels and groups |
| [Discord Email Scraper](https://apify.com/neuro-data/discord-email-scraper) | Emails from public Discord server listings |
| [Twitch Email Scraper](https://apify.com/neuro-data/twitch-email-scraper) | Business emails from Twitch streamer pages |
| [Vimeo Email Scraper](https://apify.com/neuro-data/vimeo-email-scraper) | Contact emails from Vimeo creator and studio pages |
| [Dailymotion Email Scraper](https://apify.com/neuro-data/dailymotion-email-scraper) | Emails from Dailymotion channel pages |
| [Likee Email Scraper](https://apify.com/neuro-data/likee-email-scraper) | Emails from Likee short-video creator profiles |
| [Rumble Email Scraper](https://apify.com/neuro-data/rumble-email-scraper) | Emails from Rumble channel pages |
| [Kick Email Scraper](https://apify.com/neuro-data/kick-email-scraper) | Streamer contact emails from Kick profiles |
| [Quora Email Scraper](https://apify.com/neuro-data/quora-email-scraper) | Emails from Quora answers and profile bios |
| [Medium Email Scraper](https://apify.com/neuro-data/medium-email-scraper) | Writer contact emails from Medium profiles and posts |
| [Substack Email Scraper](https://apify.com/neuro-data/substack-email-scraper) | Newsletter author emails from Substack publications |
| [Patreon Email Scraper](https://apify.com/neuro-data/patreon-email-scraper) | Creator contact emails from Patreon pages |
| [Behance Email Scraper](https://apify.com/neuro-data/behance-email-scraper) | Designer emails from Behance portfolios |
| [Dribbble Email Scraper](https://apify.com/neuro-data/dribbble-email-scraper) | Designer and studio emails from Dribbble profiles |
| [DeviantArt Email Scraper](https://apify.com/neuro-data/deviantart-email-scraper) | Artist commission emails from DeviantArt profiles |
| [SoundCloud Email Scraper](https://apify.com/neuro-data/soundcloud-email-scraper) | Artist and label emails from SoundCloud profiles |
| [Mixcloud Email Scraper](https://apify.com/neuro-data/mixcloud-email-scraper) | DJ and podcaster emails from Mixcloud profiles |
| [Goodreads Email Scraper](https://apify.com/neuro-data/goodreads-email-scraper) | Author contact emails from Goodreads profiles |
| [Clubhouse Email Scraper](https://apify.com/neuro-data/clubhouse-email-scraper) | Emails from Clubhouse profile bios |
| [Mastodon Email Scraper](https://apify.com/neuro-data/mastodon-email-scraper) | Emails from Mastodon instance profiles |
| [Bluesky Email Scraper](https://apify.com/neuro-data/bluesky-email-scraper) | Emails from Bluesky profile descriptions |
| [Zhihu Email Scraper](https://apify.com/neuro-data/zhihu-email-scraper) | Emails from Zhihu answers and profiles |
| [VK Email Scraper](https://apify.com/neuro-data/vk-email-scraper) | Emails from VK public pages and profiles |
| [Weibo Email Scraper](https://apify.com/neuro-data/weibo-email-scraper) | Emails from Weibo public profiles and posts |
| [LINE Email Scraper](https://apify.com/neuro-data/line-email-scraper) | Emails from public LINE account pages |
| [KakaoTalk Email Scraper](https://apify.com/neuro-data/kakaotalk-email-scraper) | Emails from public KakaoTalk channel pages |
| [WeChat Email Scraper](https://apify.com/neuro-data/wechat-email-scraper) | Emails from public WeChat account pages |
| [Bigo Live Email Scraper](https://apify.com/neuro-data/bigo-live-email-scraper) | Host contact emails from Bigo Live profiles |
| [Lemon8 Email Scraper](https://apify.com/neuro-data/lemon8-email-scraper) | Creator emails from Lemon8 profiles and posts |
| [Tinder Email Scraper](https://apify.com/neuro-data/tinder-email-scraper) | Public emails indexed from Tinder web pages |
| [Bumble Email Scraper](https://apify.com/neuro-data/bumble-email-scraper) | Public emails indexed from Bumble web pages |
| [Hinge Email Scraper](https://apify.com/neuro-data/hinge-email-scraper) | Public emails indexed from Hinge web pages |

***

### Example: Building a Home-Services Prospect List

Here is a realistic Facebook Email Scraper run. You sell scheduling software to trades and want 400 contractor leads in Texas.

Set `keywords` to `["roofing contractor", "HVAC repair", "landscaping company"]`, `location` to `Texas`, `customDomains` to `["@gmail.com", "@yahoo.com", "@hotmail.com"]` and `maxEmails` to `400`.

The Facebook Email Scraper builds base, quoted, `intitle:` and modifier variants per keyword, then paginates the search results with five parallel workers. Rows stream into the dataset live, so you can watch quality before committing the full run.

Sort the Facebook Email Scraper dataset by `possiblyTruncated`, verify the flagged rows manually, then load the rest into your sequencer. Run the same keywords through the [Instagram Email Scraper](https://apify.com/neuro-data/instagram-email-scraper) to catch the businesses that publish contact details there instead.

***

### Facebook Email Scraper FAQ

**Does the Facebook Email Scraper log into Facebook?**
No. It never authenticates, never opens facebook.com and never uses Meta's Graph API. Every field comes from Google's public search results.

**Where do the Facebook Email Scraper emails actually come from?**
From titles, snippets and site labels Google already publishes for indexed Facebook pages - usually Page descriptions and public posts where the owner wrote the address themselves.

**Can it extract emails from private Facebook groups?**
No. If the content is not in Google's public index, the Facebook Email Scraper cannot see it. Only publicly indexed pages are in scope.

**Why do some rows have no `username` or `profileUrl`?**
Because Google's result exposed no vanity handle - typically group, event or numeric `profile.php` URLs. Those rows still include `accountName`, the email and the snippet.

**What does `possiblyTruncated: true` mean?**
Google's snippet ellipsis touched the address, so it may be cut short. Treat those as leads to verify rather than send-ready contacts.

**How many emails can one Facebook Email Scraper run return?**
Free Apify plans stop at 100 emails per run. Paid plans are uncapped and bounded only by `maxEmails` and what Google has indexed.

**Why does a single query not return thousands of results?**
Google caps one query at roughly 300 results. Query expansion multiplies keyword x domain x phrasing so the Facebook Email Scraper reaches past that ceiling.

**Do I need a proxy to run the Facebook Email Scraper?**
Yes. It requires the Apify GOOGLE\_SERP proxy and will not run without Apify proxy credentials.

**Can I target a city, state or country?**
Yes. Use `location` for a phrase appended to every query, and `countryCode` for the search proxy's country.

**Which email domains work best on Facebook?**
Facebook's small-business base leans on legacy providers, so `@gmail.com`, `@yahoo.com`, `@hotmail.com` and `@aol.com` all pay off.

**Can I resume an interrupted run?**
Yes. Progress is saved in the key-value store, keyed by a hash of your input, and persists on Apify's `PERSIST_STATE`, `MIGRATING` and `ABORTING` events.

**Is scraping Facebook emails legal?**
The Actor collects only publicly indexed information, but how you use it is your responsibility. Follow GDPR, CAN-SPAM and local rules on unsolicited outreach.

**How do I get more leads from one niche?**
Add query modifiers, widen `customDomains`, raise `maxPagesPerQuery` and run neighbouring trade keywords rather than one broad category.

***

### Support

Questions about the Facebook Email Scraper, bug reports or a custom build? Email **neurodata.apify@gmail.com**.

# Actor input Schema

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

Search terms describing the Facebook accounts you want (niche, job title, industry).

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

Optional location phrase added to every query (e.g. "New York").

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

Only emails ending with one of these domains are collected. With or without the leading @.

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

Stop once this many unique emails have been collected.

## `countryCode` (type: `string`):

Two-letter country code for the search proxy (e.g. US, GB, DE). Empty for any.

## `expandQueries` (type: `boolean`):

Search each keyword x domain pair with several phrasings. Recommended - Google caps a single query at ~300 results.

## `queryModifiers` (type: `array`):

Extra words combined with each keyword when Expand queries is on. Tuned for Facebook.

## `maxPagesPerQuery` (type: `integer`):

Google rarely returns more than ~30 pages for one query.

## `maxConcurrency` (type: `integer`):

How many queries run in parallel.

## Actor input object example

```json
{
  "keywords": [
    "founder",
    "small business"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "maxEmails": 20,
  "countryCode": "",
  "expandQueries": true,
  "queryModifiers": [
    "email",
    "contact",
    "business inquiries",
    "collab",
    "booking",
    "dm"
  ],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

Records produced by Facebook Email Scraper, stored in the run's default dataset.

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "keywords": [
        "founder",
        "small business"
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com"
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "business inquiries",
        "collab",
        "booking",
        "dm"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-data/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": [
        "founder",
        "small business",
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com",
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "business inquiries",
        "collab",
        "booking",
        "dm",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-data/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": [
    "founder",
    "small business"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "countryCode": "",
  "queryModifiers": [
    "email",
    "contact",
    "business inquiries",
    "collab",
    "booking",
    "dm"
  ]
}' |
apify call neuro-data/facebook-email-scraper --silent --output-dataset

```

## MCP server setup

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