# Google Maps Market Analyzer: area x category, GeoJSON (`ucchiii/maps-market-analyzer`) Actor

Turn Google Maps scraper results into a market analysis by area and category: places, ratings, reviews, chain share, a competition score and whitespace candidates, plus GeoJSON and KML map files. No Google access, no phone numbers or names. $5 per 1,000 segments.

- **URL**: https://apify.com/ucchiii/maps-market-analyzer.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 segments

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?

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 Market Analyzer — area x category market analysis, GeoJSON and KML

Site-selection and sales-territory teams, and agencies building pitch decks, get **a ready-made market analysis from
Google Maps scraper data**: for every area and business category, how many places, how good, how reviewed, how chain-heavy.
Feed it the dataset of a Google Maps scraper run; it finds the **least-competitive areas** and exports **GeoJSON and KML** maps.
**$5 per 1,000 segments** (one segment = one area x category row). Reading, deduplication and map files are free.

- **Three ways to split areas**: by city, by postal code, or by a latitude/longitude grid (`gridKm`, default 2 km)
- **Per area x category**: `places`, `avgRating`, `medianReviews`, `totalReviews`, `closedShare`, `withWebsiteShare`,
  `topPlaces` (top 3 by rating x reviews, with names and Maps URLs), `chainShare`, area centre `lat`/`lng`
- **Chain estimate**: a business name that appears 3 or more times in your data counts as a chain
- **Competition score (estimate, 0-100)** per area from the number of places and total reviews; the **5 weakest areas**
  are listed in `SUMMARY` as whitespace candidates. It is a rough guide, not sales or foot traffic.
- **Map files** of the places (up to the first 100,000 places that have coordinates): `MAP_GEOJSON` and `MAP_KML` (name, category, rating, reviewsCount, mapsUrl) — open in
  QGIS, Google My Maps, Kepler.gl, Felt
- **Privacy**: no phone numbers, no emails, no reviewer or owner names are read or output. The Actor never contacts Google.

Works with the output of `compass/crawler-google-places` and other Maps scrapers using similar field names
(`title`/`name`, `placeId`, `categoryName`/`categories`, `totalScore`, `reviewsCount`, `address`, `city`, `postalCode`,
`location`, `permanentlyClosed`, `website`, `url`).

### Use cases

- **Where to open the next shop or branch**: compare competition and ratings per district for your category
- **Sales territory planning**: find areas with many places but few chains or few websites
- **Agency proposals**: drop a map and a table of local competitors into a client deck

### How to use

1. Run a Google Maps scraper (e.g. *Google Maps Scraper*) for your area and category. Note the dataset ID of the run.
2. Run this Actor with that dataset ID in `datasetIds` (several runs are merged and deduplicated).
3. Open the dataset table, the `SUMMARY` record (whitespace candidates) and the `MAP_GEOJSON` / `MAP_KML` records.

Leave `datasetIds` empty to see a **free demo** on fictional sample data (rows are marked `_demo: true`).

### Input

```json
{
  "datasetIds": ["<dataset ID of your Google Maps scraper run>"],
  "groupBy": "grid",
  "gridKm": 2,
  "categoriesInclude": ["dentist"],
  "minReviews": 5,
  "excludeClosed": true
}
```

### Output (dataset: one row per area x category)

```json
{
  "area": "Sampletown", "category": "Cafe", "lat": 35.06, "lng": 139.09,
  "places": 3, "avgRating": 3.9, "medianReviews": 280, "totalReviews": 730,
  "closedShare": 0, "withWebsiteShare": 1, "chainShare": 1,
  "topPlaces": [{"name": "Example Cafe", "url": "https://www.google.com/maps/place/..."}],
  "competitionScore": 62
}
```

Key-value store: `SUMMARY` (overview, top categories, 5 whitespace candidates), `MAP_GEOJSON`, `MAP_KML`.

### Pricing

**$5 per 1,000 segments.** A run with 30 areas and 10 categories each produces at most 300 segments (about $1.50).
Set a maximum cost per run in Apify and the Actor stops when it is reached. The demo is free.

### Notes and limits

- The Actor only reads datasets you point it to; you are responsible for how that data was collected.
- Scores and chain detection are estimates from the data you give it; a small or partial scrape gives a partial picture.
- Places without coordinates are left out of `grid` grouping and the map files.

### More tools from the same developer

- [Google Maps Leads Cleaner](https://apify.com/ucchiii/maps-leads-cleaner) — dedupe Google Maps scraper results, format phones (E.164), CRM-ready leads
- [Google Maps Reviews Analyzer](https://apify.com/ucchiii/reviews-insights) — per-place ratings, trends, owner response rate and top terms from Google Maps reviews
- [Google Sheets Export](https://apify.com/ucchiii/google-sheets-export) — export an Apify dataset to Google Sheets
- [Dataset Merge & Dedup](https://apify.com/ucchiii/dataset-dedup-merge) — merge Apify datasets and remove duplicates by the fields you choose

# Actor input Schema

## `datasetIds` (type: `array`):

Dataset IDs (the 'defaultDatasetId' of a finished run of the source Actor, e.g. 'WkzbQMuFYuamGv3YF'). Datasets from your Google Maps scraper runs (e.g. compass/crawler-google-places). Several runs are merged and deduplicated. Leave empty for a free demo on fictional sample data.

## `groupBy` (type: `string`):

How to split places into areas: 'city' (default), 'postalCode' or 'grid' (a square mesh of gridKm; needs coordinates in the data).

## `gridKm` (type: `number`):

Side length of each mesh cell in kilometres. Used only when groupBy is 'grid'.

## `categoriesInclude` (type: `array`):

Analyze only places whose category contains any of these words (e.g. 'dentist', 'cafe'). Empty = all.

## `minReviews` (type: `integer`):

Ignore places with fewer reviews than this. Minimum 0. Empty = no filter.

## `excludeClosed` (type: `boolean`):

Drop places marked permanently or temporarily closed before analysis.

## Actor input object example

```json
{
  "groupBy": "city",
  "gridKm": 2,
  "excludeClosed": true
}
```

# Actor output Schema

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

One row per area and category: places, avgRating, medianReviews, totalReviews, closedShare, withWebsiteShare, chainShare, competitionScore, topPlaces, lat, lng.

## `summary` (type: `string`):

Record SUMMARY: overall totals and whitespace candidates.

## `mapGeojson` (type: `string`):

Map points as GeoJSON.

## `mapKml` (type: `string`):

Map points as KML (opens in Google Earth / My Maps).

# 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("ucchiii/maps-market-analyzer").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("ucchiii/maps-market-analyzer").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 ucchiii/maps-market-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ucchiii/maps-market-analyzer"
        }
    }
}
```

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/HKEoqHaYY3gcFetOn/builds/ghwoF9wuaL3DR6Fpk/openapi.json
