# Google Maps Leads + Contact Enrichment (`scrapyx/google-maps-leads-scraper`) Actor

Turns any Google Maps search into a local lead list: name, phone, website, full address, coordinates, rating, review count, categories, opening hours and place/CID ids. Optionally visits each business's own website to pull the email addresses and social profiles Google never exposes.

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

## Pricing

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

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

## What's an Apify Actor?

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

## How to integrate an Actor?

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

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

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

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

# README

## Google Maps Leads + Contact Enrichment

Turns any Google Maps search into a local B2B lead list — and, optionally,
finds the **email addresses Google Maps itself never exposes** by visiting each
business's own website.

### What you get

One row per business (`recordType: PLACE`):

| Group | Fields |
|---|---|
| Identity | `name`, `placeId`, `cid`, `featureId`, `knowledgeGraphId`, `mapsUrl`, `cidUrl` |
| Contact | `phone`, `phoneE164`, `website`, `websiteDomain` |
| **Enriched contact** | `emails`, `socialProfiles` (facebook / instagram / twitter / linkedin / youtube / tiktok / pinterest / whatsapp), `enrichedFrom`, `enrichmentStatus` |
| Location | `fullAddress`, `streetAddress`, `addressLines`, `addressParts`, `neighbourhood`, `cityRegion`, `countryCode`, `latitude`, `longitude`, `timezone` |
| Reputation | `rating`, `reviewCount`, `reviewsUrl` |
| Operations | `openingHours`, `openStatus`, `attributes` (accessibility, service options, …), `categories`, `primaryCategory` |

Plus one `SEARCH_SUMMARY` row per query (what was asked, what came back, which
honesty flags fired) and an `ERROR` row for any query that fails — so **every
input maps to at least one row**.

### Example input

```json
{
  "searchQueries": ["dentist Austin TX", "plumber Manchester UK"],
  "enrichContacts": true,
  "maxPlacesPerQuery": 100
}
```

### Known limits — read these before you buy

- **~200 results per query.** Google's own ceiling for a single query and
  viewport, measured by walking offsets 0→200: pages stay full to offset 160,
  offset 180 returns a short page, offset 200 returns nothing. It ends
  honestly — no clamp back to page 1. To go wider, split the area: several
  narrow queries, or explicit `latitude`/`longitude` per district. The
  `perQueryCeilingReached` flag on the summary row tells you when you hit it.
- **`reviewCount` is best-effort.** Google alternates between two response
  variants for the identical request: one carries the review count, one does
  not. It is not a cookie, not the request shape, and not a clean function of
  time — all three were tested. The actor re-issues any thin page once, then
  reports the truth in `reviewCountsAvailable` and `placesWithReviewCount`
  rather than emitting a silent null. **Ratings are unaffected** — they are
  present in both variants.
- **`openingHours` may be today-only.** The same two variants: the rich one
  carries all seven days, the thin one carries today. The field reflects
  whichever arrived; it never pads a partial week into a full-looking one.
- **No `totalMatches`.** Google publishes no match count for a local search,
  so this actor does not invent one — `upstreamTotalAvailable` is always
  `false`.
- **The viewport is not a geocode.** Without explicit `latitude`/`longitude`,
  the map centre comes back as the country centroid for your `countryCode`,
  and the query text does the geographic work. `viewportSource` says which
  applied. `"dentist Austin TX"` returns Austin businesses over a nationwide
  viewport — verified 30/30.
- **Enrichment is bounded and polite.** Up to 3 pages per site (homepage,
  then `/contact`, `/contact-us`, `/about`, `/about-us`, `/impressum`),
  stopping as soon as both an email and a social profile are found. Every
  third-party host's `robots.txt` is fetched and honoured first; a disallowed
  site is reported as `enrichmentStatus: robots_disallowed`, not scraped
  anyway. Roughly 60% of businesses yield an email in practice — the rest
  have no site, a JS-only contact form, or no address published.

### How it works

No API key, no login, no browser.

1. `GET /maps/search/<query>` — the Maps shell, for the `ei` session token.
2. `GET /search?tbm=map&tch=1&pb=<protobuf>` — the results endpoint, paged by
   offset, 100 places per request.

`tch=1` is load-bearing: without it the same request answers **200 with no
results array at all** — a silent empty rather than an error. 5.4 KB and zero
places without it, 315 KB and a full page with it.

The `pb` protobuf is deliberately minimal. A 90-token capture of the real web
client's `pb` was tried first and returned nothing, because hand-editing it
desynchronised the `m<N>` sub-message counts. Bisecting down, only the
viewport block, the `!7i`/`!8i` pagination pair and the `!22m6` session block
actually matter.

### WAF and TLS

**None observed.** `chrome124`, `chrome131`, `chrome136`, `firefox133`,
`safari18_0` and `chrome99_android` all returned identical 200s on both
surfaces, with no challenge markers and no cookie warmup needed. The profile
pool exists for transport flakiness, not for a bypass. Default `chrome124`.

Google rate limits by **exit IP**, and answers a hot address with a 302 to
`/sorry/index` (a reCAPTCHA interstitial) rather than an HTTP error — detected
on the redirect target, since the followed body looks like a normal 200. The
actor rotates the exit IP on that signal. Residential proxy is the default on
the platform for the same reason. Raise `minRequestInterval` if you see the
warning.

### Policy

`www.google.com/robots.txt` carries **no** blanket `Disallow` for ClaudeBot,
anthropic-ai, GPTBot or CCBot, and both surfaces this actor uses are
explicitly allowed:

```
Allow: /search?*tbm=map
Allow: /maps/search/
Allow: /maps/place/
```

Only public business listings are read. No login, no user data, no reviews
text, no personal profiles.

# Actor input Schema

## `searchQueries` (type: `array`):

One Google Maps search per entry, exactly as you would type it into Maps — e.g. 'dentist Austin TX' or 'plumber in Manchester UK'. Google resolves the place name to coordinates for you, so a query carrying its own location needs no latitude/longitude. Each query is capped at ~200 results by Google, so several narrow queries beat one wide one.

## `enrichContacts` (type: `boolean`):

After collecting places, visit each business's own website and pull email addresses and social profiles out of it. Google Maps itself never exposes an email address, so this is the only way to get one. Adds up to 3 requests per place. Every site's robots.txt is checked and honoured before fetching.

## `enrichmentPagesPerSite` (type: `integer`):

How many pages to try on each business website when enriching: the homepage first, then /contact, /contact-us, /about, /about-us, /impressum. Stops early as soon as both an email and a social profile are found. Only used when 'Enrich with website contacts' is on.

## `maxPlacesPerQuery` (type: `integer`):

Stop after this many businesses per search query. Google's own hard ceiling is about 200 results for one query and viewport, so values above that cannot be reached — split the area into narrower queries instead.

## `language` (type: `string`):

Google interface language code, used for category names, opening-hours day names and address formatting. For example 'en', 'de', 'id', 'es'.

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

Two-letter country code that biases which Google results locale answers, e.g. 'us', 'gb', 'de', 'id'. This is Google's regional bias, not a filter — it does not restrict results to that country.

## `latitude` (type: `string`):

Pin the map centre instead of letting Google resolve it from the query text. Must be given together with longitude. Useful for sweeping a city district by district to get past the per-query result ceiling.

## `longitude` (type: `string`):

Pin the map centre instead of letting Google resolve it from the query text. Must be given together with latitude.

## `zoom` (type: `integer`):

Map zoom the search runs at, which sets how wide an area is covered: 11 is metro-wide, 13 is city-wide (default), 16 is a few blocks. Lower zoom covers more ground but returns coarser, more famous results.

## `pageSize` (type: `integer`):

How many places to ask for in one request. Google honours values up to 100 exactly, so the default collapses a full harvest into two requests. Lower it only if you are being rate limited.

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

Upper bound on Google requests in flight across all queries. Pagination inside one query is always sequential regardless of this value, because each page depends on the previous one.

## `minRequestInterval` (type: `string`):

Minimum delay between the START of consecutive Google requests. This, not concurrency, is the honest speed control: once the rate cap binds, extra concurrency buys nothing. Raise it if you see the /sorry/ rate-limit warning in the log.

## `enrichmentConcurrency` (type: `integer`):

How many business websites to fetch at once during contact enrichment. Kept separate from the Google budget so third-party sites and Google never compete for the same workers.

## `proxyConfiguration` (type: `object`):

Proxy used for every request. Residential is the default on the platform: Google rate limits by exit IP and answers a hot datacenter address with a /sorry/ reCAPTCHA interstitial rather than an HTTP error.

## Actor input object example

```json
{
  "searchQueries": [
    "dentist Austin TX"
  ],
  "enrichContacts": false,
  "enrichmentPagesPerSite": 3,
  "maxPlacesPerQuery": 100,
  "language": "en",
  "countryCode": "us",
  "zoom": 13,
  "pageSize": 100,
  "maxConcurrency": 3,
  "minRequestInterval": "0.4",
  "enrichmentConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# 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 = {
    "searchQueries": [
        "dentist Austin TX"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/google-maps-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 = { "searchQueries": ["dentist Austin TX"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/google-maps-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 '{
  "searchQueries": [
    "dentist Austin TX"
  ]
}' |
apify call scrapyx/google-maps-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/google-maps-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/qGV7fllh74LzJ399b/builds/4fPiwLG6to5etIND5/openapi.json
