# Google Maps Business Scraper (`rodexco/gmb-scraper`) Actor

Scrape Google Maps business listings over HTTP and parse the embedded search JSON.

- **URL**: https://apify.com/rodexco/gmb-scraper.md
- **Developed by:** [Syed Muhammad Ismail](https://apify.com/rodexco) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 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/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 Scraper

A product of **Rodexco** — fast, cost-efficient local business data extraction from Google Maps.

### What it does

Search Google Maps by keyword and location, and get back structured business
data: name, address, phone, category, rating, website, opening hours,
reviews, and photo links — without the overhead of a browser-based scraper.

### Why it's different

Most Google Maps scrapers run a full headless browser per request, which
drives up cost and slow-downs. This Actor reads Google Maps' own data
response directly, which means faster runs and lower cost per result
without sacrificing data completeness.

### Input

| Field | Description | Default |
|---|---|---|
| `searchQueries` | List of search terms, e.g. `"coffee shop in Austin, TX"` | coffee shop in Austin, TX |
| `maxResultsPerQuery` | Max businesses to return per query | 20 |
| `includeReviews` | Whether to fetch reviews for each business | true |
| `maxReviewsPerPlace` | Max reviews to include per business | 8 |

### Output

One dataset record per business, including:

```json
{
  "placeId": "...",
  "name": "...",
  "address": "...",
  "phone": "...",
  "category": "...",
  "rating": 4.5,
  "reviewCount": 12,
  "website": "...",
  "openingHours": { "Monday": "9 AM-5 PM", "...": "..." },
  "reviews": [{ "text": "...", "rating": 5, "authorUrl": "..." }],
  "photoUrls": ["..."]
}
```

### Notes

- In sparse or rural areas, Google itself may widen the search and return
  loosely related businesses or nearby towns — this reflects Google's own
  search behavior, not a scraping error.
- Reviews are capped per run for speed and cost efficiency; this is not a
  full review-history export.
- Photos are returned as URLs only — images are not downloaded or stored.

### Support

Built and maintained by Rodexco. For issues or feature requests, reach out
via the Actor's Issues tab on Apify Store.

# Actor input Schema

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

What to look up on Google Maps. Put a business type and a place on each line, for example "coffee shop in Austin, TX". Each line is searched separately.

## `maxResultsPerQuery` (type: `integer`):

How many businesses to save for each search. The run stops at this number even when Google has more results.

## `includeReviews` (type: `boolean`):

Save review text for each business. Turn this off to skip reviews and finish faster.

## `maxReviewsPerPlace` (type: `integer`):

How many reviews to keep for each business. This run stores a short set of review snippets, not a business's full review history. Set this to 0 to save no review text.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests to Google. The default is enough for a normal run. Increase it if requests start getting blocked.

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

Leave this off to connect directly. Turn on Apify Proxy to start with datacenter proxies. If Google blocks a request, that request is retried through a residential proxy.

## Actor input object example

```json
{
  "searchQueries": [
    "coffee shop in Austin, TX"
  ],
  "maxResultsPerQuery": 20,
  "includeReviews": true,
  "maxReviewsPerPlace": 8,
  "requestDelaySecs": 1.5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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": [
        "coffee shop in Austin, TX"
    ],
    "maxResultsPerQuery": 20,
    "maxReviewsPerPlace": 8,
    "requestDelaySecs": 1.5
};

// Run the Actor and wait for it to finish
const run = await client.actor("rodexco/gmb-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": ["coffee shop in Austin, TX"],
    "maxResultsPerQuery": 20,
    "maxReviewsPerPlace": 8,
    "requestDelaySecs": 1.5,
}

# Run the Actor and wait for it to finish
run = client.actor("rodexco/gmb-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": [
    "coffee shop in Austin, TX"
  ],
  "maxResultsPerQuery": 20,
  "maxReviewsPerPlace": 8,
  "requestDelaySecs": 1.5
}' |
apify call rodexco/gmb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rodexco/gmb-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/bUeSrNdbFVAmKXWLe/builds/KMPtcrratcwSpGAty/openapi.json
