# Google Maps Business Leads with Contacts (`apex-nexus/google-maps-business-leads`) Actor

Google Maps business leads with contacts - deterministic lead generator for dentists, plumbers, restaurants. Each place: name, address, place ID, website, phone, e-mail. Contacts bundled in base per-place price (no add-on). No API key or proxies. $0 when no places returned.

- **URL**: https://apify.com/apex-nexus/google-maps-business-leads.md
- **Developed by:** [Valunex](https://apify.com/apex-nexus) (community)
- **Categories:** Business, Marketing, SEO tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 places

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 Business Leads

Deterministic pay-per-event Apify Actor that finds local businesses on Google
Maps and emits one dataset item per place:
`name, address, place_id, website, phone, e-mail`.

### Who it is for

B2B sales reps, marketing / web-design / SEO agencies and freelancers building
cold-e-mail or cold-calling lists for local businesses (plumbers, dentists,
restaurants, lawyers, …).

### Differentiation

- **Contacts bundled in the base per-place price:** website, phone and
  e-mail (best-effort, extracted from the business's public website) come with
  every place — no separate contact add-on.
- **Deterministic extraction only:** official Google Places API (New) text
  search plus a plain regex for e-mails. No AI lead scoring, no competitor
  analysis, no scraping, no proxies.
- **$0 when a search returns no places:** no places = no per-place event.

### Data source

Official Google Places API (New), Text Search with pagination:

- https://places.googleapis.com/v1/places:searchText

A Google Places API key is required and must be passed as the
`googlePlacesApiKey` input. Google does not provide place data without
authentication, and this Actor intentionally does **not** scrape Google Maps,
so it never encounters consent walls, CAPTCHAs or anti-bot controls.

Google Places API does not expose business e-mail. When `includeContacts` is
enabled the Actor best-effort fetches each business's public website and
extracts e-mails with a deterministic regex. Sites that are unreachable or
return an error are skipped and never abort the run.

### Pricing (pay-per-event, Apify Store)

- Actor start: **$0.0001** per run (one-time)
- Place (dataset item): **$0.004** per place — the primary event
- Apify retains a 20% commission on revenue; payouts are monthly and require
  completed identity verification (KYC).

A search that returns no places emits zero dataset items, so no per-place
charge applies (only the per-start fee).

### Input

See `input-schema.json`. Required: `query` and `googlePlacesApiKey`.

- `query` (string, required): what to search for (e.g. `plumber`).
- `location` (string, default `New York`): where to search, appended to the query.
- `maxResults` (integer, 1-200, default 20): max places per run.
- `includeContacts` (boolean, default `true`): attempt e-mail extraction from each business website.
- `googlePlacesApiKey` (string, required): your Google Places API (New) key.

Example:

```json
{
  "query": "plumber",
  "location": "New York",
  "maxResults": 20,
  "includeContacts": true
}
```

### Output

One dataset item per place. Sample output:

```json
{
  "name": "Acme Plumbing",
  "address": "123 Main St, New York, NY 10001, USA",
  "place_id": "ChIJx1y2z3",
  "website": "https://acme.example",
  "email": "info@acme.example",
  "phone": "+1-555-0100"
}
```

Every field is `null` when it could not be obtained — the Actor never guesses.
`e-mail` is `null` when no e-mail was found on the website or `includeContacts`
is disabled.

### Dataset schema

One dataset item per place (formalized in `actor/.actor/dataset_schema.json`):

| Field | Type | Description |
|-------|------|-------------|
| `name` | string / null | Business name returned by Google Places API. |
| `address` | string / null | Formatted address returned by Google Places API. |
| `place_id` | string / null | Google Places place_id of the business. |
| `website` | string / null | Business website URL returned by Google Places API. |
| `email` | string / null | First e-mail found on the business's public website (best-effort, only when `includeContacts` is enabled). Null when no e-mail could be extracted. |
| `phone` | string / null | International phone number returned by Google Places API. |

All six fields are always present; any that could not be obtained are `null`.

### Limits

- Max 200 places per run.
- Text Search results are paginated (20 per page) until `maxResults` is reached or no more pages exist.
- One bounded request per website for e-mail extraction; failures are logged and never abort the run.

### Verification

Run `pytest tests` before release (builder acceptance criterion). The suite is
deterministic and needs no network or Google API key.

Run `ruff check .` to confirm the linter is clean.

### Licensing

Only Apify SDK + httpx (MIT-compatible). Original code; no competitor code
copied; no Apex code; no secrets committed.

# Actor input Schema

## `query` (type: `string`):

What to search for (e.g. 'plumber', 'dentist', 'coffee shop').

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

Where to search (city, region, address or 'near me'). Appended to the query.

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

Maximum number of places to emit per run (1-200).

## `includeContacts` (type: `boolean`):

When enabled, the Actor attempts to extract e-mail addresses from each business's public website in addition to the phone and website shown on Google Maps.

## Actor input object example

```json
{}
```

# Actor output Schema

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

All place dataset items emitted by the Actor run.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("apex-nexus/google-maps-business-leads").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("apex-nexus/google-maps-business-leads").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 '{}' |
apify call apex-nexus/google-maps-business-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apex-nexus/google-maps-business-leads"
        }
    }
}
```

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/xpHfqBCcVTTbivasb/builds/HJlEMJHxQgTmh3Uzv/openapi.json
