# Google Maps B2B Leads Scraper (`automa-flow/google-maps-b2b-leads-scraper`) Actor

Find businesses by category and city on the first Google Maps results page. Get addresses, phones, websites and optional published company emails. Supports US/en and GB/en; pass known lead IDs to skip them without another charge.

- **URL**: https://apify.com/automa-flow/google-maps-b2b-leads-scraper.md
- **Developed by:** [Vadim Bezrukov](https://apify.com/automa-flow) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 business leads

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?

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

## Google Maps B2B Leads Scraper

Get unique business rows for a category and territory, one per Google Maps location: name, category, address, phone, website, and optional emails copied from public company pages with the URL where they were found.

For a later batch, pass previously collected `lead_id` values in
`excludeLeadIds` to skip those businesses without another charge. Each search
reports its outcome in `RUN_SUMMARY`, including empty results, blocked requests
and the first-page limit. Supported locales are **US/en** and **GB/en**.

The first published version is described in the [changelog](https://apify.com/automa-flow/google-maps-b2b-leads-scraper/changelog).

This is an independent tool, not Google Places API or a Google-licensed product.
Review the source-use limits below before collecting data.

### 30-second quickstart

1. Keep the default input (Austin plumbers, 10 places, Maps fields only).
2. Click Start.
3. Wait for the run to finish. Unique business rows land in the Dataset; totals and per-search status land in `RUN_SUMMARY`.

```json
{
  "searches": [
    {
      "query": "plumbers",
      "location": "Austin, Texas, United States",
      "countryCode": "US",
      "language": "en"
    }
  ],
  "maxPlacesPerSearch": 10,
  "maxResults": 10,
  "contactMode": "none",
  "maxPagesPerWebsite": 3,
  "excludeLeadIds": []
}
```

`contactMode` defaults to `none`, so a run is two Maps HTTP requests per search, not a website crawl. Set `contactMode` to `website` when you want published emails from company pages.

Supported locales in this version: **US/en** and **GB/en**. Both were checked against the live first page on 2026-09-16 (Austin, Texas and Manchester, United Kingdom): names, phones, websites and structured addresses (US city, state and ZIP; UK city and postcode) parse for both. Other country or language combinations are rejected by the input schema.

This version returns the **first Maps listing page** for each search (about 20 listings when the page is full), so `maxPlacesPerSearch` stops at 20. It does not invent a continuation cursor. When the page is full and your limit was not reached, the search is `PARTIAL` with `FIRST_PAGE_CAP` and the run is `PARTIAL`; the rows you received are still charged normally.

Service-area businesses that Maps lists without a street address are **not emitted** in this version. They are counted per search as `skipped_no_address` in `RUN_SUMMARY` so you can see how much of the page they were (in the Manchester check, 10 of 20 listings).

### Sample output (synthetic)

The following row is a **synthetic fixture**, not a live Maps response and not a real business.

```json
{
  "schema_version": 1,
  "record_type": "BUSINESS",
  "status": "SUCCESS",
  "lead_id": "gm:place:fixture-place-001",
  "source": "google_maps",
  "source_id": "fixture-place-001",
  "name": "Example Plumbing",
  "primary_email": "office@plumbing.example.test",
  "website_url": "https://plumbing.example.test/"
}
```

Two billable results exist:

- `business-lead` - one unique business row with valid Maps fields, no billable published email (or `contactMode=none`).
- `business-lead-with-email` - the same business row when at least one organisation or location email with provenance is present. This **replaces** `business-lead` for that row. The two events are never added together.

Searches, website HTTP, retries, extra emails, duplicate rows and excluded lead IDs are not charged. Prices (platform usage included): **$0.004** per `business-lead`, **$0.006** per `business-lead-with-email`. Prefill ten Maps-only rows is about **$0.04**. See the Apify **Pricing** tab for current charges.

### How emails are collected

When `contactMode=website`, the Actor fetches the website linked by the source, then a few contact/about/imprint pages on the same registrable domain. It copies `mailto:`, visible text and JSON-LD emails. It does not execute JavaScript, guess addresses from names, probe SMTP/MX, or scrape staff directories. Free-mailbox addresses (`gmail.com`, `outlook.com`, `yahoo.com` and similar) found on a company page are reported as `UNCONFIRMED`: they are not billed, not listed as `primary_email`, and the row carries the `unconfirmed_emails_excluded` warning.

`NOT_FOUND_ON_VISITED_PAGES` means no published email on the pages that were fetched. It does not mean the business has no email anywhere. `JS_REQUIRED`, `BLOCKED` and `FAILED` are different from a clean miss. A JS-only site stays incomplete; there is no Playwright fallback. When the run timeout is about to expire, the remaining businesses are still written as Maps rows with enrichment `SKIPPED` / `RUNTIME_LIMIT` (row status `PARTIAL`, charged as `business-lead`) instead of being dropped; the run ends `PARTIAL` with `RUNTIME_LIMIT`.

### Deduplication and later runs

The same Maps location found in two searches is one business row and one billing event. Two branches of a chain are two rows even when they share a domain or phone. Pass previous `lead_id` values in `excludeLeadIds` to skip them. This Actor does **not** remember other users' runs or your last run unless you pass those ids.

A Monday morning schedule that reuses last week's ids:

```json
{
  "cron": "0 8 * * 1",
  "timezone": "America/Chicago"
}
```

Webhook after a successful run (replace the URL):

```json
{
  "eventTypes": ["ACTOR.RUN.SUCCEEDED"],
  "requestUrl": "https://example.com/webhooks/maps-leads"
}
```

Schedules and webhooks are created in Console; this Actor does not create them by itself.

### API / n8n / Make

1. Start the Actor with the JSON input above.
2. Wait for a terminal run status.
3. Read `RUN_SUMMARY` in the default key-value store (`queries`, `emitted_rows`, `error_code`).
4. If the run succeeded, fetch Dataset items. `NO_RESULTS` means the search was checked and empty. `SOURCE_FAILED` / `SOURCE_BLOCKED` mean Maps could not be checked. `SOURCE_NOT_CONFIGURED` is reserved for a missing adapter, not an empty city.

Direct MCP entry (requires your own Apify authentication): <https://mcp.apify.com?tools=automa-flow/google-maps-b2b-leads-scraper>. Ask it to collect unique plumber locations in Austin, Texas, with optional website emails. MCP presence is not a tested authenticated agent run.

### Limits and source use

- This Actor is not affiliated with Google and has no Google licence.
- Google Maps End User Additional Terms restrict bulk feeds, resale and competing listings databases. This Actor stays on the first listing page and does not paginate, but limiting a search to one page does not remove those restrictions. Check that your intended use is permitted.
- Default Dataset contains only business rows. Query failures and `skipped_no_address` counts live in `RUN_SUMMARY`.
- `NO_RESULTS` is a verified empty search. `SOURCE_FAILED` / `SOURCE_BLOCKED` mean the source could not be checked.
- A 429 or HTML challenge is `SOURCE_BLOCKED`, not “no plumbers”.
- Public contact data is not consent to email marketing and is not a GDPR-compliance guarantee.
- Website crawls honour robots.txt of the company site, stay on-site, and block private/metadata IPs.

# Changelog

This Actor's version history is a separate document: https://apify.com/automa-flow/google-maps-b2b-leads-scraper/changelog.md

# Actor input Schema

## `searches` (type: `array`):

One category plus territory per row. Duplicates are dropped; cities and categories are not expanded into a cartesian product. US/en and GB/en only in this version; both were checked against the live first page (Austin, Manchester).

## `maxPlacesPerSearch` (type: `integer`):

Unique candidates taken from the first Maps listing page of one search, before excludeLeadIds. The source shows about 20 listings per page and this Actor does not fetch page two, so 20 is the ceiling. A full page is reported as FIRST\_PAGE\_CAP in RUN\_SUMMARY. Service-area listings without a street address are counted as skipped\_no\_address and not emitted.

## `maxResults` (type: `integer`):

Maximum unique business rows written on this run after exclusions.

## `contactMode` (type: `string`):

none (default) keeps the run to Maps HTTP only. website also visits a few public pages on the listed company site and copies published organisation emails; free-mailbox addresses (gmail.com, outlook.com and similar) are reported as unconfirmed and not billed. Emails are not verified mailboxes.

## `maxPagesPerWebsite` (type: `integer`):

Homepage plus a small number of contact/about/imprint pages. Does not crawl the whole site.

## `excludeLeadIds` (type: `array`):

Exact lead\_id values from a previous Dataset. Those locations are skipped before website checks and are not charged again on this run. There is no automatic history store.

## Actor input object example

```json
{
  "searches": [
    {
      "query": "plumbers",
      "location": "Austin, Texas, United States",
      "countryCode": "US",
      "language": "en"
    }
  ],
  "maxPlacesPerSearch": 10,
  "maxResults": 10,
  "contactMode": "none",
  "maxPagesPerWebsite": 3,
  "excludeLeadIds": []
}
```

# Actor output Schema

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

No description

## `withEmail` (type: `string`):

Column layout of the default Dataset focused on email fields. Rows are not filtered.

## `contactIncomplete` (type: `string`):

Column layout of the default Dataset focused on status and website. Rows are not filtered.

## `runSummary` (type: `string`):

Per-query status, emitted counts, billing events, stop reason and dataset id.

# 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 = {
    "searches": [
        {
            "query": "plumbers",
            "location": "Austin, Texas, United States",
            "countryCode": "US",
            "language": "en"
        }
    ],
    "maxPlacesPerSearch": 10,
    "maxResults": 10,
    "contactMode": "none",
    "maxPagesPerWebsite": 3,
    "excludeLeadIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("automa-flow/google-maps-b2b-leads-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 = {
    "searches": [{
            "query": "plumbers",
            "location": "Austin, Texas, United States",
            "countryCode": "US",
            "language": "en",
        }],
    "maxPlacesPerSearch": 10,
    "maxResults": 10,
    "contactMode": "none",
    "maxPagesPerWebsite": 3,
    "excludeLeadIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("automa-flow/google-maps-b2b-leads-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 '{
  "searches": [
    {
      "query": "plumbers",
      "location": "Austin, Texas, United States",
      "countryCode": "US",
      "language": "en"
    }
  ],
  "maxPlacesPerSearch": 10,
  "maxResults": 10,
  "contactMode": "none",
  "maxPagesPerWebsite": 3,
  "excludeLeadIds": []
}' |
apify call automa-flow/google-maps-b2b-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automa-flow/google-maps-b2b-leads-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/bVD96o3v95Sot9sAJ/builds/RQ7QiCaEJT69Rh6t8/openapi.json
