# Bark Email Scraper (`leads-scraper/bark-email-scraper`) Actor

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

- **URL**: https://apify.com/leads-scraper/bark-email-scraper.md
- **Developed by:** [Leads Scraper](https://apify.com/leads-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

### Bark Email Scraper

The Bark Email Scraper extracts publicly indexed service-professional contacts from Bark using Google search.
Bark is the UK-first marketplace where customers post a job and local tradespeople, tutors, cleaners and event suppliers respond.
This Actor turns keywords, an optional location and a list of email domains into a clean dataset of pro leads.

Each row carries the business name, the Bark handle, the company profile URL and a listing snippet alongside the address.
Both identity resolution and email yield are excellent here.
In this whole directory category, Bark measured as one of the three strongest sources.

The Bark Email Scraper does not log in, does not use a Bark API and never opens bark.com.
Every record comes from publicly available Google search results: titles, snippets and site labels.
There is no browser, no JavaScript rendering, no authentication and no cookies.

In a measured live run, the Bark Email Scraper returned 10 result blocks, 10 identity matches, 10 profile URLs and 10 unique emails.
That is a perfect conversion across all four measures, matched only by CallUpContact and Crunchbase.
Yield still depends on your keywords, domains and location, so treat it as a reference point rather than a promise.

#### Who the Bark Email Scraper is for

Bark professionals are independent tradespeople and small service businesses: builders, gardeners, electricians, cleaners, photographers and tutors.
Their suppliers are the natural audience, from tool and materials merchants to insurance brokers and trade-credit providers.
Lead-generation software vendors, franchise recruiters and van finance providers sell into the same list.

The default modifiers are `email`, `contact`, `enquiries`, `owner` and `get a quote`.
Those mirror the language a service pro uses when inviting a customer to make contact.
Change them and you change which slice of the marketplace you reach.

### Key features of the Bark Email Scraper

Everything below is behaviour the Bark Email Scraper actually implements, shared with every Actor in this family.

| Feature | What it does |
|---|---|
| Google `site:` targeting | Restricts every query to `bark.com`, so results stay on company listings |
| Query expansion | Base, quoted and `intitle:` variants plus one variant per query modifier |
| Trade-intent modifiers | Defaults of `email`, `contact`, `enquiries`, `owner` and `get a quote` |
| Domain filtering | Keeps only emails ending in the domains you list |
| Global deduplication | One row per unique email across every query and every page |
| Email normalisation | Understands `name [at] domain [dot] com`, `name (at) domain`, `name @ domain.com`, `domain .com`, zero-width characters and the full-width `＠` sign |
| 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 | Locates the `<h3>` title and the smallest surrounding block instead of relying on CSS class names |
| Whole-page fallback parser | A Google markup change degrades to emails without account details, not to zero results |
| Concurrency | `asyncio` worker pool with a shared stop signal once `maxEmails` is reached |
| Retries and block detection | Three attempts per page with exponential backoff; CAPTCHA and consent pages are retried, not counted as empty |
| Re-queue pass | 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` |
| Immediate dataset writes | Each lead is pushed as soon as it is found |
| Run summary | Logs pages fetched, blocked pages, retries and emails per page |

### How the Bark Email Scraper works

The Bark Email Scraper reads your input, builds Google queries, fetches result pages and parses each block structurally.
Emails are extracted from block text with a domain-filtered regex, normalised, junk-filtered and deduplicated globally.
Each surviving lead is pushed to the Apify dataset immediately, so a partial run is still usable.

A query looks like `site:bark.com electrician "@gmail.com" "Birmingham"`.
Pages are fetched through the Apify GOOGLE_SERP proxy over async HTTP with a fresh proxy session per request.
Structural parsing means a Google layout change degrades the run rather than breaking it.

#### Query expansion in the Bark Email Scraper

Google caps a single query at roughly 300 results, and Bark lists pros across thousands of categories and every UK town.
Query expansion multiplies each keyword by each email domain and by several phrasings, with base queries running first.
On a high-yield source like this one, expansion translates almost directly into extra rows.

#### Location is the strongest lever in the Bark Email Scraper

`location` matters more on Bark than on any of the non-local Actors in this category.
Pros are matched to customers by service area, so every listing is written with a town, city or region in it.
Run the same keyword set once per city and merge the datasets afterwards rather than attempting one national sweep.

#### Choosing trade keywords for the Bark Email Scraper

Bark's own service categories are the highest-yield keywords because they match the platform taxonomy.
`electrician`, `plumber`, `gardener`, `house cleaner`, `photographer`, `personal trainer` and `driving instructor` all map to real categories.
Six to ten category keywords per city is a sensible working range.

### Input reference for the Bark Email Scraper

The Bark Email Scraper takes nine inputs and only `keywords` is required.

| Field | Type | Default | Meaning |
|---|---|---|---|
| `keywords` | array (required) | `["tradesman", "local service"]` | Search terms describing the pros 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 code 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

```json
{
  "keywords": ["electrician", "plumber", "gardener", "house cleaner"],
  "location": "Birmingham",
  "customDomains": ["@gmail.com", "@yahoo.co.uk", "@outlook.com", "@hotmail.co.uk"],
  "maxEmails": 500,
  "countryCode": "GB",
  "expandQueries": true,
  "queryModifiers": ["email", "contact", "enquiries", "owner", "get a quote"],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

#### Tuning the Bark Email Scraper

Trade plus city is the winning combination.
`gardener` with `location` set to `Bristol` will out-produce `local service` with no location by a wide margin.
Three to eight category keywords per city keeps runs manageable.

UK sole traders use British free-mail domains heavily.
Keep `@gmail.com`, `@yahoo.co.uk`, `@outlook.com`, `@hotmail.co.uk` and `@btinternet.com` in `customDomains`.
Every extra domain multiplies the query count, so raise `maxEmails` alongside it.

### Output reference for the Bark Email Scraper

Every dataset item produced by the Bark 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 non-profile results |
| `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` | Listing snippet, cleaned of labels and 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

```json
[
  {
    "network": "Bark",
    "keyword": "electrician",
    "query": "site:bark.com electrician \"@gmail.com\" \"Birmingham\"",
    "title": "Brindley Electrical Services - Birmingham | Bark.com",
    "accountName": "Brindley Electrical Services",
    "fullName": "Brindley Electrical Services",
    "username": "brindley-electrical-services",
    "profileUrl": "https://www.bark.com/en/gb/company/brindley-electrical-services/",
    "url": "https://www.bark.com/en/gb/company/brindley-electrical-services/",
    "description": "Domestic rewires, fuse board upgrades and EICR testing across the West Midlands. Get a quote: brindleyelectrical@gmail.com",
    "email": "brindleyelectrical@gmail.com",
    "emailDomain": "@gmail.com",
    "possiblyTruncated": false,
    "foundAt": "2025-11-04T20:07:16Z"
  },
  {
    "network": "Bark",
    "keyword": "house cleaner",
    "query": "site:bark.com house cleaner enquiries \"@yahoo.co.uk\" \"Birmingham\"",
    "title": "Sparkle & Shine Cleaning - Birmingham | Bark.com",
    "accountName": "Sparkle & Shine Cleaning",
    "fullName": "Sparkle & Shine Cleaning",
    "username": "sparkle-and-shine-cleaning",
    "profileUrl": "https://www.bark.com/en/gb/company/sparkle-and-shine-cleaning/",
    "url": "https://www.bark.com/en/gb/company/sparkle-and-shine-cleaning/",
    "description": "Weekly domestic cleaning and end of tenancy deep cleans. Enquiries: sparkleandshineclean@yahoo.co.uk",
    "email": "sparkleandshineclean@yahoo.co.uk",
    "emailDomain": "@yahoo.co.uk",
    "possiblyTruncated": true,
    "foundAt": "2025-11-04T20:08:41Z"
  }
]
```

The Apify dataset view shows email, account, name, username, profile, keyword, snippet and the truncation flag.
Export as CSV, JSON or XLSX, or read the dataset through the Apify API.
Because handles resolve reliably here, the profile column is genuinely useful for manual verification.

### Use cases for the Bark Email Scraper

The Bark Email Scraper is built for suppliers and service providers selling into UK trades and local services.

| Use case | Suggested keywords | Suggested location |
|---|---|---|
| Selling tools and materials to trades | `electrician`, `plumber` | one city per run |
| Trade insurance and public liability cover | `builder`, `roofer` | city or county |
| Lead-generation and booking software sales | `house cleaner`, `gardener` | city area |
| Franchise and territory recruitment | `oven cleaning`, `window cleaner` | target territory |
| Van, tool and equipment finance | `removals`, `handyman` | city area |
| Uniform, print and branding suppliers | `photographer`, `personal trainer` | city area |
| Market research on local service pricing | `tradesman`, `local service` | leave empty |

#### Selling into UK trades with the Bark Email Scraper

Suppliers get the most out of this Actor because Bark pros are their end customers.
Use Bark's own category names, one city at a time, and keep the British free-mail domains wide.
The `description` field states the trade and service area, which is enough to segment a list quickly.

#### Beyond the building trades with the Bark Email Scraper

Bark covers far more than construction: tutors, event photographers, personal trainers, wedding suppliers and pet services all list there.
That makes the Bark Email Scraper useful to anyone selling booking software, insurance or marketing services to solo professionals.
Swap the trade keywords for service keywords and the same configuration works unchanged.

### Practical recipes for the Bark Email Scraper

A UK trades sweep might use `electrician`, `plumber`, `builder` and `gardener` with `location` set to `Birmingham` and `countryCode` to `GB`.
A national campaign might repeat the same keyword set for `London`, `Manchester`, `Leeds`, `Bristol` and `Glasgow` as separate runs.
Keep `expandQueries` on throughout, because one query cannot reach past Google's result cap.

For breadth, drop `location`, keep `maxPagesPerQuery` at 30 and raise `maxEmails` to several hundred.
For precision, name one city, use three or four category keywords and set `maxEmails` lower.
Both modes run identical code; only query volume differs.

### How many results the Bark Email Scraper returns

A measured live run of the Bark Email Scraper produced 10 blocks, 10 identity matches, 10 profile URLs and 10 unique emails.
Every block resolved to a named company with a handle, and every one of those carried a usable address.
That is the strongest measured result in this category, level with CallUpContact and Crunchbase.

Your own numbers will vary with trade, city, domain list and how much of Bark Google currently indexes.
Free Apify plans stop at 100 emails per run and paid plans are uncapped.
No specific volume is guaranteed by the Bark Email Scraper or by any Actor in this family.

### Limitations of the Bark Email Scraper

- The Bark Email Scraper only finds pros whose email is publicly visible in Google's index. Bark routes many enquiries through its own lead system, so some pros publish no address.
- Google caps a single query at roughly 300 results. Query expansion exists to work around that cap, and disabling it reduces yield sharply.
- `possiblyTruncated: true` means Google's snippet ellipsis touched the email, so the address may be incomplete. Verify those rows before sending.
- `username` and `profileUrl` are populated only when Google exposes a handle. City and category landing pages can leave those blank while keeping `accountName` and `fullName`; that is a Google limitation, not a bug.
- The Bark Email Scraper requires the Apify GOOGLE_SERP proxy and cannot run without Apify proxy credentials.
- Free Apify plans are capped at 100 emails per run; paid plans have no cap.
- Results vary with keywords, domains and location, and no volume is guaranteed.

The Bark Email Scraper is not affiliated with, endorsed by or officially supported by Bark.
It reads public search results only and does not access private or gated data.

### Responsible use, GDPR and CAN-SPAM

Most Bark pros are sole traders, so a free-mail address is often personal data in practice as well as in law.
For UK and EU recipients, GDPR and the UK rules expect a lawful basis, a clear sender identity, a genuine business reason and an easy way to object.
For US recipients, CAN-SPAM expects accurate headers, a valid postal address and a working unsubscribe path.

Keep the `query`, `profileUrl` and `foundAt` provenance that every row carries.
Honour opt-outs immediately and suppress them in later runs of the Bark Email Scraper.
This is general information about common obligations rather than legal advice, so check the rules that apply to you.

### FAQ about the Bark Email Scraper

#### How many results should I expect?

A measured live run returned 10 blocks, 10 identity matches, 10 profile URLs and 10 unique emails, the strongest result in this category. Your numbers depend on trade, city, domains and index coverage, and no volume is guaranteed.

#### Does the Bark Email Scraper log into Bark?

No. It never logs in, never uses a Bark API and never opens bark.com. All data comes from publicly indexed Google results.

#### Is the Bark Email Scraper UK only?

Bark is UK-first and the profile URLs follow the UK path shape, but the Actor searches the whole `bark.com` domain. Set `countryCode` to steer the search proxy toward the market you want.

#### How important is the location field in the Bark Email Scraper?

Very. Pros are matched by service area, so one run per city will beat a single national run every time.

#### Which keywords work best in the Bark Email Scraper?

Bark's own category names, such as `electrician`, `plumber`, `gardener`, `house cleaner` and `photographer`.

#### Why do some pros have no email?

Bark routes many customer enquiries through its own lead system, so not every pro publishes an address. The Bark Email Scraper can only surface the ones that do.

#### Why are some `username` and `profileUrl` values empty?

The Bark Email Scraper fills those only when Google exposes a handle. City and category landing pages sometimes show a title without one, so the row keeps `accountName` and leaves the handle blank.

#### What does `possiblyTruncated` mean?

Google's snippet ellipsis touched the email, so the address may be cut short. Verify those rows before sending.

#### Does it need the Apify proxy?

Yes. The Bark Email Scraper runs on the Apify GOOGLE_SERP proxy and cannot operate without Apify proxy credentials.

#### Can I run it on the free plan?

Yes, capped at 100 emails per run. Paid plans remove the cap, and on this source that cap is easy to reach.

#### Are the emails verified?

No. The Bark Email Scraper extracts and normalises what Google shows. Run your own verification before any campaign.

#### What should I run for US trades instead?

The [Angi Email Scraper](https://apify.com/leads-scraper/angi-email-scraper), [Porch Email Scraper](https://apify.com/neuro-scraper/porch-email-scraper) and [Thumbtack Email Scraper](https://apify.com/leads-scraper/thumbtack-email-scraper) cover the US home-services market.

### Related Actors

Thirty-six sibling Actors cover the rest of the Business and Professional Directories category that the Bark Email Scraper belongs to.
They share the same input schema, output schema and behaviour, so anything you learn here transfers directly.
For UK directory coverage try the [Scoot Email Scraper](https://apify.com/neuro-scraper/scoot-email-scraper) or [Touch Local Email Scraper](https://apify.com/leads-scraper/touch-local-email-scraper), and for design-led remodelling the [Houzz Email Scraper](https://apify.com/leads-scraper/houzz-email-scraper).

| Actor | What it collects |
|---|---|
| [Bark Email and Phone Number Scraper](https://apify.com/neuro-scraper/bark-email-and-phone-number-scraper) | Emails and phone numbers from Bark |
| [Bark Phone Number Scraper](https://apify.com/neuro-scraper/bark-phone-number-scraper) | Public phone numbers from Bark |
| [Angi Email Scraper](https://apify.com/leads-scraper/angi-email-scraper) | Public contact emails from Angi |
| [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 |
| [Brownbook Email Scraper](https://apify.com/neuro-scraper/brownbook-email-scraper) | Public contact emails from Brownbook |
| [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 |
| [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 |
| [Brownbook Email and Phone Number Scraper](https://apify.com/neuro-scraper/brownbook-email-and-phone-number-scraper) | Emails and phone numbers from Brownbook |
| [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 Bark 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.

### Support

Questions, bug reports or a custom build request for the Bark Email Scraper: contact neurodata.apify@gmail.com.

# Actor input Schema

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

Search terms describing the Bark 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 Bark.

## `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": [
    "tradesman",
    "local service"
  ],
  "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 Bark 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": [
        "tradesman",
        "local service"
    ],
    "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("leads-scraper/bark-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": [
        "tradesman",
        "local service",
    ],
    "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("leads-scraper/bark-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": [
    "tradesman",
    "local service"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "countryCode": "",
  "queryModifiers": [
    "email",
    "contact",
    "enquiries",
    "owner",
    "get a quote"
  ]
}' |
apify call leads-scraper/bark-email-scraper --silent --output-dataset

```

## MCP server setup

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