# Brownbook Email Scraper (`neuro-scraper/brownbook-email-scraper`) Actor

Brownbook Email Scraper SD - Brownbook Email Scraper is a lead generation tool that extracts leads with public contact emails, account names and profile URLs from Brownbook results by keyword, location and email domain - Brownbook email extractor.

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

## Pricing

from $2.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?

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

### Brownbook Email Scraper

The Brownbook Email Scraper extracts publicly indexed business emails from Brownbook, a crowd-sourced global business directory covering markets that most US-centric directories never reach. It is one of the strongest performers in this family.

In our measured Google run the Brownbook Email Scraper parsed 9 result blocks, named a business in all 9, resolved a profile URL for all 9, and produced 9 unique emails. Clean identity, clean links, clean contacts.

That combination makes it a genuine primary source rather than a supplement, especially if your target market sits outside North America.

#### What the Brownbook Email Scraper does

The Brownbook Email Scraper builds Google queries with the `site:` operator against `brownbook.net`. It parses each result block structurally, locating the `<h3>` title and the smallest surrounding block.

A domain-filtered regex then extracts emails from the block text. Matches are normalised, deduplicated globally and pushed to your Apify dataset immediately.

The Brownbook Email Scraper never logs into Brownbook, never uses a Brownbook API and never opens the Brownbook website. There is no browser, no JavaScript rendering, no authentication and no cookies.

#### Why the Brownbook Email Scraper suits international prospecting

Brownbook listings are added by business owners and community contributors worldwide. That crowd-sourced model produces coverage in cities where commercial directories never invested.

For an exporter, a payments provider or a B2B SaaS company entering a new region, the Brownbook Email Scraper is often the cheapest way to see who actually trades there. The `description` field usually carries a self-written summary in the local business's own words.

Market researchers mapping a territory get the same benefit. A city-scoped run is a fast proxy for how dense a given trade is in that market.

#### Features of the Brownbook Email Scraper

Everything in this table ships in the Brownbook Email Scraper today.

| Feature | What it means in practice |
|---|---|
| Google `site:` search over `brownbook.net` | Targets indexed Brownbook listings worldwide |
| Query expansion | Base, quoted and `intitle:` variants plus one query per modifier; base queries run first |
| Domain filtering | Only emails ending in your `customDomains` values are kept |
| Global deduplication | Each email is emitted once per run across every query and page |
| Email normalisation | Handles `name [at] domain [dot] com`, `name (at) domain`, `name @ domain.com`, `domain .com`, zero-width characters and the full-width `＠` |
| Junk filter | Rejects `email@`, `yourname@`, `test@`, `xxx@` and single-character locals |
| Boundary-correct matching | `@gmail.com` does not match inside `@gmail.company` or `@gmail.com.br` |
| Soft-wrap repair | Drops a hit that is only the tail of another email in the same block |
| Structural block parsing | Works from the `<h3>` title, never from Google's CSS class names |
| Whole-page fallback parser | A markup change degrades to "emails without account details", not "no emails" |
| Concurrency control | `asyncio` worker pool with a shared stop signal on `maxEmails` |
| Retries and block detection | Up to 3 attempts per page, exponential backoff, fresh proxy session per request, CAPTCHA and consent pages detected and retried |
| Failed-query requeue | Blocked or failed queries are retried once at the end of the run |
| Resumable state | Key-value store state keyed by an input hash, saved on `PERSIST_STATE`, `MIGRATING` and `ABORTING` |
| Run summary logging | Pages fetched, blocked pages, retries and emails per page |

#### How the Brownbook Email Scraper works

A run of the Brownbook Email Scraper follows six steps from input to dataset.

1. Read your input: keywords, location, email domains and limits.
2. Build queries such as `site:brownbook.net freight forwarder "@gmail.com" "Dubai"`.
3. Fetch Google result pages through the Apify GOOGLE_SERP proxy using async `aiohttp`.
4. Parse each result block structurally to isolate title, business label and snippet.
5. Extract and normalise emails with a domain-filtered regex.
6. Deduplicate globally and push each lead to the dataset immediately.

The Brownbook Email Scraper streams rows as it finds them, so an aborted run keeps everything collected so far.

#### Input fields for the Brownbook Email Scraper

These are the exact inputs the Brownbook Email Scraper accepts, with shipped defaults.

| Field | Type | Default | Meaning |
|---|---|---|---|
| `keywords` | array (required) | `["local business", "services"]` | Search terms describing the businesses you want |
| `location` | string | `""` | Optional location phrase added to every query |
| `customDomains` | array | `["@gmail.com", "@yahoo.com"]` | Only emails on these domains are kept; `@` 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", "enquiries", "owner", "get a quote"]` | 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 |

#### Example input for the Brownbook Email Scraper

```json
{
  "keywords": ["freight forwarder", "customs broker", "logistics company"],
  "location": "Dubai",
  "customDomains": ["@gmail.com", "@yahoo.com", "@hotmail.com", "@outlook.com"],
  "maxEmails": 500,
  "countryCode": "AE",
  "expandQueries": true,
  "queryModifiers": ["email", "contact", "enquiries"],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

#### Location: the highest-leverage input in the Brownbook Email Scraper

Brownbook is genuinely global, so `location` is where the Brownbook Email Scraper earns most of its value. Name the city the way a local would write it on their own listing.

Strong candidates include `"Dubai"`, `"Sharjah"`, `"Nairobi"`, `"Lagos"`, `"Manchester"`, `"Birmingham"`, `"Mumbai"`, `"Karachi"`, `"Sydney"` and `"Auckland"`.

Pair `location` with a matching `countryCode` - `AE`, `KE`, `NG`, `GB`, `IN`, `PK`, `AU`, `NZ` - so the Brownbook Email Scraper searches from a regional vantage point.

Google caps a single query at roughly 300 results, so one city per run beats one country per run every time. Queue several cities and merge the datasets afterwards.

For webmail domains, adjust to the market. `@yahoo.co.uk` and `@hotmail.co.uk` matter in Britain; `@yahoo.com` and `@rediffmail.com` behave differently in South Asia.

#### Output fields from the Brownbook Email Scraper

Every dataset item written by the Brownbook Email Scraper carries all fourteen fields below.

| 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 |
| `fullName` | Display name parsed from a profile-style title; empty for post captions |
| `username` | URL-safe handle when the platform 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 snippet, cleaned of labels and engagement counters |
| `email` | Lower-cased email address |
| `emailDomain` | The matched domain |
| `possiblyTruncated` | `true` when Google's snippet ellipsis touched the email |
| `foundAt` | ISO 8601 UTC timestamp |

#### Example output from the Brownbook Email Scraper

```json
[
  {
    "network": "Brownbook",
    "keyword": "freight forwarder",
    "query": "site:brownbook.net freight forwarder \"@gmail.com\" \"Dubai\"",
    "title": "Al Rayan Cargo & Freight LLC - Dubai - Brownbook.net",
    "accountName": "Al Rayan Cargo & Freight LLC",
    "fullName": "Al Rayan Cargo & Freight LLC",
    "username": "al-rayan-cargo-freight-llc",
    "profileUrl": "https://www.brownbook.net/business/al-rayan-cargo-freight-llc/",
    "url": "https://www.brownbook.net/business/al-rayan-cargo-freight-llc/",
    "description": "Sea and air freight forwarding from Jebel Ali. Rate requests to alrayancargo.dxb@gmail.com",
    "email": "alrayancargo.dxb@gmail.com",
    "emailDomain": "@gmail.com",
    "possiblyTruncated": false,
    "foundAt": "2026-08-31T16:22:14.507Z"
  },
  {
    "network": "Brownbook",
    "keyword": "customs broker",
    "query": "site:brownbook.net customs broker \"@yahoo.com\" \"Dubai\"",
    "title": "Gulf Line Clearing Services - Brownbook.net",
    "accountName": "Gulf Line Clearing Services",
    "fullName": "Gulf Line Clearing Services",
    "username": "gulf-line-clearing-services",
    "profileUrl": "https://www.brownbook.net/business/gulf-line-clearing-services/",
    "url": "https://www.brownbook.net/business/gulf-line-clearing-services/",
    "description": "Import and export customs clearance, documentation and duty advisory. gulflineclearing@yahoo.com",
    "email": "gulflineclearing@yahoo.com",
    "emailDomain": "@yahoo.com",
    "possiblyTruncated": false,
    "foundAt": "2026-08-31T16:23:41.980Z"
  }
]
```

#### Use cases for the Brownbook Email Scraper

The Brownbook Email Scraper is the right tool when your territory crosses borders.

| Use case | Who runs it | Typical setup |
|---|---|---|
| New-market entry research | International B2B SaaS | `["accounting firm"]`, `location: "Nairobi"`, `countryCode: "KE"` |
| Export partner sourcing | Manufacturer or exporter | `["freight forwarder", "customs broker"]`, `location: "Dubai"` |
| Payments and fintech prospecting | Fintech vendor | `["retail shop", "restaurant"]`, `location: "Lagos"` |
| UK local agency outreach | Marketing agency | `["plumber", "electrician"]`, `location: "Manchester"`, `countryCode: "GB"` |
| Supplier discovery in APAC | Procurement team | `["packaging supplier"]`, `location: "Mumbai"`, `countryCode: "IN"` |
| Territory density mapping | Market researcher | One keyword across 15 cities, compare unique counts |
| Franchise feasibility study | Franchise development | `["gym", "fitness studio"]`, several metro runs |
| Multi-source list build | RevOps team | Merge with Cylex, Fyple and Infobel datasets |

#### Tuning the Brownbook Email Scraper for better yield

Use the vocabulary local businesses actually use. `"clearing agent"`, `"cargo services"` and `"logistics company"` all reach different Brownbook listings.

Widen `customDomains` to match the market, not the defaults. In many emerging markets `@gmail.com` and `@yahoo.com` dominate business contact details far more than they do in the US.

Leave `expandQueries` on so the Brownbook Email Scraper routes around Google's per-query ceiling. Base queries run first, so the highest-signal results arrive early.

Keep `maxConcurrency` near 5. Higher parallelism increases blocked pages that need retrying without materially raising throughput.

Run the Brownbook Email Scraper city by city and stack the datasets; the Brownbook Email Scraper deduplicates within a run, so dedupe across runs in your warehouse.

#### What to expect from a Brownbook Email Scraper run

Our measured Google run of the Brownbook Email Scraper returned 9 parsed blocks, 9 identified businesses, 9 resolved profile URLs and 9 unique emails. That is close to a perfect conversion from block to lead.

Handle resolution this consistent is unusual in this family. It means you can rely on `profileUrl` for verification and enrichment, not just `accountName`.

Volume still varies with keyword, domain list and location, and no volume is guaranteed. Broad trades in large cities return far more than narrow niches in small towns.

#### Responsible use, GDPR and CAN-SPAM

The Brownbook Email Scraper collects only addresses businesses have published on a public listing. Sending obligations remain yours, and this section is guidance rather than legal advice.

GDPR and UK GDPR are directly relevant given Brownbook's European coverage: you need a lawful basis, a clear privacy notice and a route to erasure. CAN-SPAM applies to US recipients and requires accurate headers, an honest subject line, a physical postal address and a working opt-out.

Other markets have their own rules - PECR in the UK, PIPEDA and CASL in Canada, the UAE and Kenyan data protection acts. Suppress opt-outs, record provenance, and do not resell the raw dataset.

#### Limitations of the Brownbook Email Scraper

Strong as it is, the Brownbook Email Scraper has real constraints worth reading before you plan a campaign.

- Only finds businesses whose email is publicly visible in Google's index. Listings that hide contact details will not appear.
- Google caps a single query at roughly 300 results, which is why query expansion exists.
- `possiblyTruncated: true` means Google's snippet ellipsis touched the address - verify before sending.
- `username` and `profileUrl` are populated only when Google's result exposes a handle. Resolution was 9 of 9 in our measured run, but it is not guaranteed on every row. This is a Google limitation, not a bug.
- Requires the Apify GOOGLE_SERP proxy; the Brownbook Email Scraper cannot run without Apify proxy credentials.
- Free Apify plans are capped at 100 emails per run; paid plans are uncapped.
- Results vary with keywords, domains and location, and no volume is guaranteed.
- Listings are crowd-sourced, so some records are stale. Verify before a high-value outreach sequence.

#### Brownbook Email Scraper FAQ

#### How many results should I expect from the Brownbook Email Scraper?

Our measured run parsed 9 blocks, identified 9 businesses, resolved 9 profile URLs and produced 9 unique emails. Totals scale with the number of cities and trades you queue.

#### Which countries does it cover?

Brownbook is global. The Brownbook Email Scraper has returned useful results across the Gulf, Africa, the UK, South Asia and Australasia - set `location` and `countryCode` to match your target.

#### Does it log into Brownbook?

No. The Brownbook Email Scraper never logs in, never uses a Brownbook API and never opens the Brownbook website. All data comes from publicly indexed Google results.

#### Why do some rows have `username: null`?

Google occasionally prints a business name without an attributable handle. Those rows have an empty `profileUrl` but still carry `accountName`, `fullName` and the email.

#### How fresh is the data?

Brownbook is crowd-sourced, so freshness varies by listing. Treat `description` as a snapshot and verify high-value contacts.

#### Can I target country-specific webmail domains?

Yes. Put values such as `@yahoo.co.uk`, `@hotmail.co.uk` or `@rediffmail.com` in `customDomains`, with or without the leading `@`.

#### What does `possiblyTruncated` mean?

Google's snippet ellipsis touched the email, so the address may be cut short. Verify or exclude those rows before an outbound send.

#### Do I need Apify proxy credentials?

Yes. The Brownbook Email Scraper runs on the Apify GOOGLE_SERP proxy and cannot operate without it.

#### How do I build a full-country list?

Run the Brownbook Email Scraper one city at a time and merge datasets. That beats Google's per-query cap far more effectively than one national query.

#### Is the free plan enough?

For evaluation, yes - the free plan caps a run at 100 emails. Paid plans remove the cap.

#### Which sibling Actors pair best with this one?

The [Cylex Email Scraper](https://apify.com/neuro-scraper/cylex-email-scraper) for the US, UK, Canada and Germany, the [Fyple Email Scraper](https://apify.com/neuro-scraper/fyple-email-scraper) for consistently strong local yields, and the [Infobel Email Scraper](https://apify.com/neuro-scraper/infobel-email-scraper) for worldwide directory coverage.

### Related Actors

| Actor | What it collects |
|---|---|
| [Brownbook Email and Phone Number Scraper](https://apify.com/neuro-scraper/brownbook-email-and-phone-number-scraper) | Emails and phone numbers from Brownbook |
| [Brownbook Phone Number Scraper](https://apify.com/neuro-scraper/brownbook-phone-number-scraper) | Public phone numbers from Brownbook |
| [Angi Email Scraper](https://apify.com/leads-scraper/angi-email-scraper) | Public contact emails from Angi |
| [Bark Email Scraper](https://apify.com/leads-scraper/bark-email-scraper) | Public contact emails from Bark |
| [Better Business Bureau Email Scraper](https://apify.com/leads-scraper/better-business-bureau-email-scraper) | Public contact emails from Better Business Bureau |
| [Bizapedia Email Scraper](https://apify.com/neuro-scraper/bizapedia-email-scraper) | Public contact emails from Bizapedia |
| [Callupcontact Email Scraper](https://apify.com/neuro-scraper/callupcontact-email-scraper) | Public contact emails from CallUpContact |
| [Capterra Email Scraper](https://apify.com/leads-scraper/capterra-email-scraper) | Public contact emails from Capterra |
| [Clutch Email Scraper](https://apify.com/leads-scraper/clutch-email-scraper) | Public contact emails from Clutch |
| [Crunchbase Email Scraper](https://apify.com/leads-scraper/crunchbase-email-scraper) | Public contact emails from Crunchbase |
| [Cybo Email Scraper](https://apify.com/neuro-scraper/cybo-email-scraper) | Public contact emails from Cybo |
| [Cylex Email Scraper](https://apify.com/neuro-scraper/cylex-email-scraper) | Public contact emails from Cylex |
| [EC21 Email Scraper](https://apify.com/neuro-scraper/ec21-email-scraper) | Public contact emails from EC21 |
| [Europages Email Scraper](https://apify.com/leads-scraper/europages-email-scraper) | Public contact emails from Europages |
| [ExportHub Email Scraper](https://apify.com/neuro-scraper/exporthub-email-scraper) | Public contact emails from ExportHub |
| [FindUsLocal Email Scraper](https://apify.com/neuro-scraper/finduslocal-email-scraper) | Public contact emails from FindUsLocal |
| [Foursquare Email Scraper](https://apify.com/neuro-scraper/foursquare-email-scraper) | Public contact emails from Foursquare |
| [Fyple Email Scraper](https://apify.com/neuro-scraper/fyple-email-scraper) | Public contact emails from Fyple |
| [G2 Email Scraper](https://apify.com/neuro-scraper/g2-email-scraper) | Public contact emails from G2 |
| [Hotfrog Email Scraper](https://apify.com/leads-scraper/hotfrog-email-scraper) | Public contact emails from Hotfrog |
| [Houzz Email Scraper](https://apify.com/leads-scraper/houzz-email-scraper) | Public contact emails from Houzz |
| [Infobel Email Scraper](https://apify.com/neuro-scraper/infobel-email-scraper) | Public contact emails from Infobel |
| [Kompass Email Scraper](https://apify.com/leads-scraper/kompass-email-scraper) | Public contact emails from Kompass |
| [Lacartes Email Scraper](https://apify.com/neuro-scraper/lacartes-email-scraper) | Public contact emails from Lacartes |
| [Manta Email Scraper](https://apify.com/leads-scraper/manta-email-scraper) | Public contact emails from Manta |
| [MapQuest Email Scraper](https://apify.com/neuro-scraper/mapquest-email-scraper) | Public contact emails from MapQuest |
| [N49 Email Scraper](https://apify.com/neuro-scraper/n49-email-scraper) | Public contact emails from N49 |
| [Porch Email Scraper](https://apify.com/neuro-scraper/porch-email-scraper) | Public contact emails from Porch |
| [Scoot Email Scraper](https://apify.com/neuro-scraper/scoot-email-scraper) | Public contact emails from Scoot |
| [Thomasnet Email Scraper](https://apify.com/leads-scraper/thomasnet-email-scraper) | Public contact emails from Thomasnet |
| [Thumbtack Email Scraper](https://apify.com/leads-scraper/thumbtack-email-scraper) | Public contact emails from Thumbtack |
| [Touch Local Email Scraper](https://apify.com/leads-scraper/touch-local-email-scraper) | Public contact emails from Touch Local |
| [TradeIndia Email Scraper](https://apify.com/leads-scraper/tradeindia-email-scraper) | Public contact emails from TradeIndia |
| [Trustpilot Email Scraper](https://apify.com/leads-scraper/trustpilot-email-scraper) | Public contact emails from Trustpilot |
| [Tupalo Email Scraper](https://apify.com/leads-scraper/tupalo-email-scraper) | Public contact emails from Tupalo |
| [Yalwa Email Scraper](https://apify.com/leads-scraper/yalwa-email-scraper) | Public contact emails from Yalwa |
| [Yellow Pages Email Scraper](https://apify.com/leads-scraper/yellow-pages-email-scraper) | Public contact emails from Yellow Pages |
| [Angi Email and Phone Number Scraper](https://apify.com/neuro-scraper/angi-email-and-phone-number-scraper) | Emails and phone numbers from Angi |
| [Bark Email and Phone Number Scraper](https://apify.com/neuro-scraper/bark-email-and-phone-number-scraper) | Emails and phone numbers from Bark |
| [Better Business Bureau Email and Phone Number Scraper](https://apify.com/leads-scraper/better-business-bureau-email-and-phone-number-scraper) | Emails and phone numbers from Better Business Bureau |
| [Bizapedia Email and Phone Number Scraper](https://apify.com/neuro-scraper/bizapedia-email-and-phone-number-scraper) | Emails and phone numbers from Bizapedia |
| [CallUpContact Email and Phone Number Scraper](https://apify.com/neuro-scraper/callupcontact-email-and-phone-number-scraper) | Emails and phone numbers from CallUpContact |

### Leave a review

If the Brownbook Email Scraper saved you time, please leave a star rating and a short review on
the Actor page.

Reviews are how other buyers judge whether a tool works, and they tell us which features to
build next.

If something did not work, email <neurodata.apify@gmail.com>
instead - bugs get fixed faster than they get complained about.

# Actor input Schema

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

Search terms describing the Brownbook 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 @. Each domain is searched separately, so more domains means more results but a longer run - remove some for a faster, narrower search, or add your own (e.g. @company.com).

## `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 Brownbook.

## `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": [
    "local business",
    "services"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "maxEmails": 20,
  "countryCode": "",
  "expandQueries": true,
  "queryModifiers": [
    "email",
    "contact",
    "enquiries",
    "owner",
    "get a quote"
  ],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

Records produced by Brownbook 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": [
        "local business",
        "services"
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com"
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "enquiries",
        "owner",
        "get a quote"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/brownbook-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": [
        "local business",
        "services",
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com",
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "enquiries",
        "owner",
        "get a quote",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/brownbook-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": [
    "local business",
    "services"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "countryCode": "",
  "queryModifiers": [
    "email",
    "contact",
    "enquiries",
    "owner",
    "get a quote"
  ]
}' |
apify call neuro-scraper/brownbook-email-scraper --silent --output-dataset

```

## MCP server setup

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