# Google Maps Lead Generator (`ahmedraza1026/apify-google-leads`) Actor

Extract high-quality business leads from Google Maps in minutes. Export names, phones, websites, ratings, reviews, and coordinates to CSV, JSON, Excel, or Apify Dataset.

- **URL**: https://apify.com/ahmedraza1026/apify-google-leads.md
- **Developed by:** [Ahmed Raza](https://apify.com/ahmedraza1026) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Apify Google Leads

Extract business leads from Google Maps for a keyword and location, then enrich each result with website-based signals such as emails, social links, tech stack hints, SEO data, and a lead score.

### What This Actor Does

Give the Actor a search like:

- `Dentists` in `London`
- `Roofers` in `Austin, Texas`
- `Immigration lawyers` in `Dubai`

It will return businesses with structured lead data such as:

- business name
- category
- address
- city and country
- phone number
- website
- extracted emails
- social links
- technology stack hints
- SEO details
- lead score and short reason

All results are written to the default Apify dataset.

### Typical Use Cases

- build local business prospect lists
- find companies with weak web presence
- collect sales leads by niche and city
- enrich Google Maps results before outreach
- export leads for CRM or spreadsheet workflows

### Input

#### Required

- `keyword`: the type of business or search phrase
- `location`: the city, region, or country to search

#### Optional

- `max_results`: maximum number of leads to collect
- `provider_mode`: choose how Google data is collected
- `playwright_headless`: run the browser invisibly or visibly when browser mode is used
- `export_format`: preferred export artifact format
- `enable_ai`: reserved for future AI summary support

### Provider Modes

#### `playwright`

This is the default mode on Apify.

Use it when:

- you want the simplest setup
- you do not want to provide a Google Places API key
- browser-based Google Maps extraction is acceptable

#### `api`

Use this mode when:

- you want to use the Google Places API
- you have a valid `GOOGLE_MAPS_API_KEY`
- you prefer API-backed collection instead of browser extraction

If you choose `api`, add `GOOGLE_MAPS_API_KEY` in the Actor environment variables or secrets.

### Output

Each dataset item contains a structured business record. Common fields include:

- `id`
- `name`
- `category`
- `address`
- `city`
- `country`
- `phone`
- `website`
- `emails`
- `social_links`
- `technology_stack`
- `ai_summary`
- `outreach_message`
- `lead_score`
- `lead_reason`

### How To Use On Apify

1. Open the Actor input form.
2. Enter a `keyword` and `location`.
3. Leave `provider_mode` as `playwright` for the easiest first run.
4. Set `max_results` based on how many businesses you want.
5. Run the Actor.
6. Open the dataset to review and export the results.

### Recommended First Run

- `keyword`: `Dentists`
- `location`: `London`
- `max_results`: `25`
- `provider_mode`: `playwright`

### Notes

- `playwright` mode does not require a Google API key.
- `api` mode requires `GOOGLE_MAPS_API_KEY`.
- Website enrichment depends on whether a business website is publicly available and reachable.
- Some businesses may have partial data if Google Maps or the target website does not expose every field.

### Output Quality Tips

- Use specific keywords like `family dentists`, `solar installers`, or `personal injury lawyers`.
- Use realistic locations such as a city, metro area, or country.
- Start with smaller runs to validate the niche before scaling up.
- If you need a simpler first run, keep the default Playwright mode.

# Actor input Schema

## `keyword` (type: `string`):

Business category or search phrase, for example `Dentists`, `Roofers`, or `Family lawyers`.
## `location` (type: `string`):

City, country, or target search area used with the keyword, for example `London`, `Austin, Texas`, or `Dubai`.
## `max_results` (type: `integer`):

Maximum number of businesses to return.
## `provider_mode` (type: `string`):

Default `playwright` runs without a Google API key. Use `api` only if you set `GOOGLE_MAPS_API_KEY` in Actor environment variables or secrets.
## `playwright_headless` (type: `boolean`):

Run Chromium headlessly when `provider_mode` is `playwright`.
## `export_format` (type: `string`):

The engine also builds other export artifacts internally, while the Actor always writes full business objects to the dataset.
## `enable_ai` (type: `boolean`):

Reserved for future AI-backed summaries in the core engine.

## Actor input object example

```json
{
  "keyword": "Dentists",
  "location": "London",
  "max_results": 25,
  "provider_mode": "playwright",
  "playwright_headless": true,
  "export_format": "json",
  "enable_ai": false
}
````

# 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 = {
    "keyword": "Dentists",
    "location": "London"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmedraza1026/apify-google-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 = {
    "keyword": "Dentists",
    "location": "London",
}

# Run the Actor and wait for it to finish
run = client.actor("ahmedraza1026/apify-google-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "Dentists",
  "location": "London"
}' |
apify call ahmedraza1026/apify-google-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ahmedraza1026/apify-google-leads",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Lead Generator",
        "description": "Extract high-quality business leads from Google Maps in minutes. Export names, phones, websites, ratings, reviews, and coordinates to CSV, JSON, Excel, or Apify Dataset.",
        "version": "0.1",
        "x-build-id": "lYSUTTQ3LXqBwMW5v"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ahmedraza1026~apify-google-leads/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ahmedraza1026-apify-google-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ahmedraza1026~apify-google-leads/runs": {
            "post": {
                "operationId": "runs-sync-ahmedraza1026-apify-google-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ahmedraza1026~apify-google-leads/run-sync": {
            "post": {
                "operationId": "run-sync-ahmedraza1026-apify-google-leads",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword",
                    "location"
                ],
                "properties": {
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Business category or search phrase, for example `Dentists`, `Roofers`, or `Family lawyers`."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, country, or target search area used with the keyword, for example `London`, `Austin, Texas`, or `Dubai`."
                    },
                    "max_results": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of businesses to return.",
                        "default": 25
                    },
                    "provider_mode": {
                        "title": "Provider mode",
                        "enum": [
                            "playwright",
                            "api"
                        ],
                        "type": "string",
                        "description": "Default `playwright` runs without a Google API key. Use `api` only if you set `GOOGLE_MAPS_API_KEY` in Actor environment variables or secrets.",
                        "default": "playwright"
                    },
                    "playwright_headless": {
                        "title": "Headless browser",
                        "type": "boolean",
                        "description": "Run Chromium headlessly when `provider_mode` is `playwright`.",
                        "default": true
                    },
                    "export_format": {
                        "title": "Primary export format",
                        "enum": [
                            "json",
                            "csv",
                            "markdown"
                        ],
                        "type": "string",
                        "description": "The engine also builds other export artifacts internally, while the Actor always writes full business objects to the dataset.",
                        "default": "json"
                    },
                    "enable_ai": {
                        "title": "Enable AI summary",
                        "type": "boolean",
                        "description": "Reserved for future AI-backed summaries in the core engine.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
