# Gmaps - Business, Location details (`whitebot/apify-agents`) Actor

Scrap business information and location details.

- **URL**: https://apify.com/whitebot/apify-agents.md
- **Developed by:** [whitebot](https://apify.com/whitebot) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results scraped

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/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 Scraper: LLM-Ready Place Data

**Turn any Google Maps search into clean, compact JSON that ChatGPT, Claude, Gemini and your own AI agents can use immediately.**

Most Google Maps scrapers try to extract everything: photos, popular-times histograms, review dumps, nearby hotels, social profiles. That is great for some jobs, but it also means large, deeply nested records that are expensive to read, slow to process and wasteful to put into an LLM context window.

This Actor does the opposite. It returns the **fields people actually ask about** (who, where, how to reach them, how good they are, and when they are open) in a flat, predictable schema, at a fraction of the cost.

> **In short:** search → get a tidy list of businesses → paste it into an LLM, a spreadsheet, a CRM or a RAG index. No cleanup step.

***

### ✨ Why this Actor

| | |
|---|---|
| 🧠 **Built for LLMs** | Flat, consistent keys. Explicit `null` for unknown values, never a missing key. One record is roughly 1 KB of JSON, around 300 tokens. |
| 🎯 **Crisp, not bloated** | 15 well-chosen fields instead of 100+. You can pass results straight into a prompt without trimming. |
| 🕒 **Clean opening hours** | A full 7-day list, always sorted **Monday → Sunday**. Google rotates its table so "today" comes first; we normalise it so your data never shifts. |
| 📌 **Precise location** | Full address, **Plus Code** and numeric `latitude` / `longitude`, ready for maps, geo-queries and distance calculations. |
| 💸 **Pay only for what you need** | **$2.00 per 1,000 places.** No add-ons, no surprise enrichment charges. |
| 🔌 **Works everywhere** | Apify API, Python/JS clients, webhooks, Make, Zapier, Google Sheets, and the Apify MCP server for AI agents. |

***

### 🧰 What can you do with it?

**Feed an AI assistant real-world local data**

- Ground an LLM in current, real businesses: *"Which of these fish markets are open on Sunday and have a rating above 4.0?"*
- Build a local-business RAG index (one record = one document, with coordinates for geo-filtering).
- Give an AI agent a "find places" tool without it hallucinating names, addresses or phone numbers.

**Sales and lead generation**

- Build prospect lists with name, category, phone and website, then let an LLM draft personalised outreach.
- Segment by rating, review volume or category to prioritise who to contact first.

**Market and competitor research**

- Count how many businesses of a type operate in an area and compare their ratings and review volumes.
- Spot under-served neighbourhoods by comparing result density across searches.

**Local SEO and listings audits**

- Check whether addresses, phone numbers, websites and opening hours are filled in for a set of locations.

**Travel, logistics and operations**

- Collect opening hours and coordinates for route planning, store-locator pages or "open now" features.

***

### 📦 What data does it extract?

| Field | Type | Description |
|---|---|---|
| `search_query` | string | The query that produced this place (useful when you run several). |
| `title` | string | Business or place name. |
| `category` | string | null | Google's main category, e.g. `Seafood market`, `Audi dealer`. |
| `rating` | number | null | Average star rating (0–5). |
| `reviews_count` | integer | null | Total number of Google reviews. |
| `address` | string | null | Full postal address. |
| `plus_code` | string | null | Google Plus Code, a short location identifier that works even without street addresses. |
| `phone` | string | null | Contact phone number as displayed on Google Maps. |
| `website` | string | null | Official website URL, when listed. |
| `open_hours` | array | Weekly schedule: `[{ "day": "Monday", "hours": "9 am–6 pm" }, …]`, sorted Monday → Sunday. Empty list `[]` if the place doesn't list hours. |
| `status` | string | null | Current open/closed text, e.g. `Open · Closes 8 pm`. For some places Google shows a short description here instead. |
| `image_url` | string | null | Main photo thumbnail URL. |
| `latitude` / `longitude` | number | null | Exact coordinates. |
| `url` | string | null | Direct link to the place on Google Maps. |

> Fields Google does not publish for a place are returned as `null` (or `[]` for `open_hours`), so every record has the **same keys** and downstream code or prompts never have to guess.

#### Example output

```json
{
  "search_query": "fish market in tokyo",
  "title": "Toyosu Market",
  "category": "Seafood market",
  "rating": 3.6,
  "reviews_count": 12898,
  "address": "6 Chome-6-1 Toyosu, Koto City, Tokyo 135-0061, Japan",
  "plus_code": "JQVM+JP Koto City, Tokyo, Japan",
  "phone": "+81 3-3520-8205",
  "website": "https://www.toyosu-market.or.jp/",
  "open_hours": [
    { "day": "Monday", "hours": "5 am–3 pm" },
    { "day": "Tuesday", "hours": "5 am–3 pm" },
    { "day": "Wednesday", "hours": "Closed" },
    { "day": "Thursday", "hours": "5 am–3 pm" },
    { "day": "Friday", "hours": "5 am–3 pm" },
    { "day": "Saturday", "hours": "5 am–3 pm" },
    { "day": "Sunday", "hours": "Closed" }
  ],
  "status": "Open · Closes 3 pm",
  "image_url": "https://lh3.googleusercontent.com/...",
  "latitude": 35.6440911,
  "longitude": 139.784281,
  "url": "https://www.google.com/maps/place/Toyosu+Market/..."
}
```

***

### ⬇️ Input

| Field | Type | Description |
|---|---|---|
| `search_queries` | array of strings | One or more searches, written the way you would type them into Google Maps. **Include the location in the text.** |
| `max_results_per_query` | integer | Maximum places to collect **per query** (default `5`). A lower number means a faster, cheaper run. |

#### Example input

```json
{
  "search_queries": [
    "fish market in tokyo",
    "audi car service center in mumbai"
  ],
  "max_results_per_query": 20
}
```

This returns up to 20 places for Tokyo and up to 20 for Mumbai.

#### Writing good queries

- **Be specific:** `vegan restaurants in Kreuzberg Berlin` gives tighter results than `restaurants Berlin`.
- **Put the place in the query:** `dentist in Austin TX`, `ev charging stations near Heathrow Airport`.
- **Use distinct queries, not near-duplicates.** `bakery in Lyon` and `boulangerie in Lyon` will mostly return the same places and you will pay for duplicates.
- **Need more than ~120 results for a city?** Google Maps only shows around 120 places for one search. Split the area into neighbourhoods (`pizza in Brooklyn`, `pizza in Queens`, `pizza in Manhattan`) and run them together.

***

### 🤖 Using the results with ChatGPT, Claude and other LLMs

#### 1. Run it and load the data (Python)

```python
from apify_client import ApifyClient
import json

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("<your-username>/google-maps-scraper").call(
    run_input={
        "search_queries": ["fish market in chennai"],
        "max_results_per_query": 30,
    }
)

places = client.dataset(run["defaultDatasetId"]).list_items(
    # Send the model only what it needs, which keeps token usage low.
    fields=["title", "rating", "reviews_count", "address", "phone", "open_hours"],
    clean=True,
).items

context = json.dumps(places, ensure_ascii=False, separators=(",", ":"))
```

#### 2. Put it in a prompt

```text
You are a local-business research assistant. Using ONLY the JSON data below,
list the places that are open on Sunday and have a rating of 4.0 or higher.
Return a table with name, rating, reviews, phone and Sunday hours.
If a value is null, say "not listed". Do not invent information.

DATA:
{context}
```

Because every record has the same keys and `null` means "not available", the model has a clear rule for missing data, which helps reduce guessing.

#### 3. Or give your AI agent a live tool

Apify Actors can be exposed to AI clients through the **Apify MCP server**, so an assistant like Claude can call this Actor on demand ("find 20 fish markets in Chennai") and reason over the result in the same conversation.

#### Token-saving tips

- A full record is about 1 KB of minified JSON, roughly 300 tokens. That is a rough estimate, since real counts depend on the model's tokenizer.
- Use the `fields` parameter (shown above) to drop `url`, `image_url` and `plus_code` when you don't need them. It can cut a record's size roughly in half.
- Skip `image_url` entirely for text-only LLM workflows.

***

### ⬆️ Output and views

Results are stored in the run's **Dataset**. You can:

- Browse them in the **Output** tab as a table (the **Overview** and **Location** views).
- Download as **JSON, CSV, Excel, XML or HTML**.
- Fetch them through the **Apify API** or connect to Google Sheets, Make, Zapier, Slack or webhooks.

***

### 💰 Pricing

**$2.00 per 1,000 places scraped.**

You pay for results, not for features you didn't ask for. There are no paid add-ons and no extra charges for contact, image or review enrichment, because those are not part of this Actor.

*Example: 5 queries × 100 places = 500 places = about $1.00.*

***

### 🧭 What this Actor is, and what it isn't

This Actor is designed to be **fast, focused and affordable**. To keep it that way, it deliberately does **not** extract:

- Individual **review texts** (the review *count* and *rating* are included)
- Emails or social media profiles scraped from websites
- Popular-times histograms, photo galleries, menus or Q\&A
- Lead enrichment (people, job titles, LinkedIn)

If you need those, a full-feature scraper is the better tool. If you need reliable business basics at low cost, ready for an LLM, this one is.

#### 🗺️ Roadmap

- 💬 **Review comments**: optional extraction of review text and metadata, ideal for sentiment analysis and AI summarisation. *Tell us if you want it.*
- 📐 Search by custom area / coordinates
- 🌍 Language and region options

Want something specific? Open a request on the **Issues** tab. Feedback directly shapes what gets built next.

***

### ❓ FAQ

**How many places can I get per search?**
Google Maps shows about 120 places per search. To go beyond that, split your search by neighbourhood or district.

**Why are some fields `null`?**
Not every place lists a phone number, website or opening hours on Google Maps. Instead of leaving fields out, the Actor always returns them as `null` (or `[]` for hours), so every record has the same structure.

**Are opening hours always in the same order?**
Yes, always Monday → Sunday. Google Maps lists the current day first, which would otherwise make your data change depending on the day you run the Actor.

**Which language are results in?**
English by default, including day names in `open_hours`.

**Does it work for any country?**
Yes. Any location Google Maps covers, for example `fish market in tokyo` or `audi car service center in mumbai`.

**Can I schedule it to keep data fresh?**
Yes. Use Apify **Schedules** to re-run it hourly, daily or weekly, and use **webhooks** to send each finished dataset to your pipeline.

**Is it legal to scrape Google Maps?**
Web scraping of publicly available data is generally legal, but you are responsible for using the data lawfully. Respect Google's Terms of Use, and take care with any personal data under laws like GDPR. This Actor collects business listing information, and it does not collect reviewers' personal data.

***

### 💬 Feedback

Found a bug, a place that returned odd data, or a field you wish existed? Please open an issue on the **Issues** tab. It is the fastest way to get it fixed.

# Actor input Schema

## `search_queries` (type: `array`):

List of search terms or locations to scrape from Google Maps.

## `max_results_per_query` (type: `integer`):

Maximum number of places to extract for each search query.

## Actor input object example

```json
{
  "search_queries": [
    "fish market in tokyo",
    "audi car service center in mumbai"
  ],
  "max_results_per_query": 5
}
```

# Actor output Schema

## `places` (type: `string`):

All scraped places as JSON (use the dataset views for tables, or export to CSV/Excel).

# 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 = {
    "search_queries": [
        "fish market in tokyo",
        "audi car service center in mumbai"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("whitebot/apify-agents").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 = { "search_queries": [
        "fish market in tokyo",
        "audi car service center in mumbai",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("whitebot/apify-agents").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 '{
  "search_queries": [
    "fish market in tokyo",
    "audi car service center in mumbai"
  ]
}' |
apify call whitebot/apify-agents --silent --output-dataset

```

## MCP server setup

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

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/HGOgsEQk4QnFfFhDA/builds/sGOgL2CcnDyKVSIBf/openapi.json
