# Google Maps Business Scraper (Playwright) (`limitless_cricket/google-maps-business-scraper`) Actor

Scrapes Google Maps businesses by search queries with rating and website filtering using Playwright.

- **URL**: https://apify.com/limitless\_cricket/google-maps-business-scraper.md
- **Developed by:** [InTourist Pakistan](https://apify.com/limitless_cricket) (community)
- **Categories:**
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Ultra-Fast Google Maps Business Scraper (Apify Actor)

High-performance, low-cost Apify Actor designed to scrape **20,000 – 30,000+ Google Maps businesses per run** at blazing speeds (**1,500+ results per minute**) using lightweight Playwright network RPC stream extraction.

***

### Key Features & Capabilities

- **Flexible Input Support:** Supports plain text queries (one per line), `.txt` file uploads, or JSON array format.
- **Full Apify Dataset Output Schema:** Fully compliant dataset schema for clean export to CSV, JSON, Excel, and API integrations.
- **15x–20x Faster Execution:** 1 search query finishes in **5–7 seconds** instead of 120 seconds.
- **Ultra-Low Memory & Cost:** Images, fonts, media, and 3D map tiles are blocked at the network level, reducing RAM usage to <500MB.
- **Proxy Support:** Seamless integration with Apify Proxy for rotating IP addresses to prevent rate limits.

***

### Output Fields Extracted

- `name`: Business Name
- `rating`: Star Rating (e.g. `4.8`)
- `reviewsCount`: Total Review Count (e.g. `243`)
- `website`: Clean Website URL (unwrapped from Google redirects)
- `phone`: Direct Phone Number (international / local format)
- `address`: Complete Street Address
- `category`: Primary Business Category (e.g. `Roofing contractor`)
- `categories`: List of all categories
- `latitude` & `longitude`: GPS Coordinates
- `placeId`: Google Place ID / Hex CID
- `link`: Google Maps Direct Place URL
- `query`: The search keyword that returned this business

***

### Apify Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | Textarea / Plain Text | `roofing contractor London\nroofing contractor Birmingham` | Search queries, one per line. You can paste plain text or upload a `.txt` file directly. |
| `maxResults` | Integer | `30000` | Target maximum results cap before automatic graceful exit |
| `concurrency` | Integer | `8` | Number of parallel worker tabs (recommended 6–10) |
| `minRating` | Number | `3.5` | Minimum business rating to include (0.0 to 5.0) |
| `maxRating` | Number | `4.9` | Maximum business rating to include (0.0 to 5.0) |
| `requireWebsite` | Boolean | `false` | If true, only businesses with a website link will be saved |
| `requirePhone` | Boolean | `false` | If true, only businesses with a phone number will be saved |
| `maxScrollSecondsPerQuery` | Integer | `15` | Maximum scroll duration per query |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true }` | Apify Proxy settings |

***

### How to Deploy to Apify

1. **Install Apify CLI**:
   ```bash
   npm install -g apify-cli
   ```

2. **Log in to Apify**:
   ```bash
   apify login
   ```

3. **Push / Deploy to Apify**:
   ```bash
   apify push
   ```

4. **Run on Apify Platform**:
   Go to your [Apify Console](https://console.apify.com/), type your queries line by line or upload your `.txt` file, and click **Start**.

# Actor input Schema

## `searchQueries` (type: `string`):

Enter search queries, one per line (e.g. 'roofing contractor London'). You can paste plain text or upload a .txt file directly.

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

Maximum total places to collect across all queries before stopping (e.g. 25000 or 30000).

## `concurrency` (type: `integer`):

Number of concurrent search workers running in parallel. Recommended 6-10 for high speed and low memory.

## `minRating` (type: `number`):

Minimum business rating to include (e.g. 3.5).

## `maxRating` (type: `number`):

Maximum business rating to include (e.g. 4.9 to filter out artificial 5.0s).

## `requireWebsite` (type: `boolean`):

If enabled, only businesses with a valid website link will be saved.

## `requirePhone` (type: `boolean`):

If enabled, only businesses with a valid phone number will be saved.

## `maxScrollSecondsPerQuery` (type: `integer`):

Maximum seconds allowed for scrolling a single query before moving to the next. Auto-terminates earlier if feed ends.

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

Select Apify Proxy to prevent rate limits and IP blocking when running in the cloud.

## Actor input object example

```json
{
  "searchQueries": "roofing contractor London\nroofing contractor Birmingham\nroofing contractor Manchester",
  "maxResults": 30000,
  "concurrency": 8,
  "minRating": 3.5,
  "maxRating": 4.9,
  "requireWebsite": false,
  "requirePhone": false,
  "maxScrollSecondsPerQuery": 15,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `resultsDataset` (type: `string`):

The default dataset containing all scraped Google Maps business listings.

# 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": `roofing contractor London
roofing contractor Birmingham
roofing contractor Manchester`
};

// Run the Actor and wait for it to finish
const run = await client.actor("limitless_cricket/google-maps-business-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": """roofing contractor London
roofing contractor Birmingham
roofing contractor Manchester""" }

# Run the Actor and wait for it to finish
run = client.actor("limitless_cricket/google-maps-business-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": "roofing contractor London\\nroofing contractor Birmingham\\nroofing contractor Manchester"
}' |
apify call limitless_cricket/google-maps-business-scraper --silent --output-dataset

```

## MCP server setup

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