# Google Maps Scraper (`solarg/google-maps-scraper`) Actor

Scrape Google Maps search results: name, full address with city and postcode, phone in E.164, website, rating, review count, opening hours, closed status, coordinates and place ID. Optional emails and social links from each business website.

- **URL**: https://apify.com/solarg/google-maps-scraper.md
- **Developed by:** [Solar G](https://apify.com/solarg) (community)
- **Categories:** Lead generation, Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 place scrapeds

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

Scrapes Google Maps search results into a clean dataset: business name, categories, full address (with street, city, postal code, state and country as separate fields), phone number in national and E.164 format, website, rating, review count, opening hours, closed status, coordinates and Google place ID. As an option, it also visits each business website to collect email addresses and social media links.

### Input

| Field | Description |
|---|---|
| `searchQueries` | What you'd type into Google Maps, including the location: `"dentists in Leeds"`, `"coffee shops in Austin TX"`. |
| `maxPlacesPerQuery` | Default 100, maximum 300. Google Maps returns up to about 120 places per search. |
| `includeContactDetails` | Visit each business website (homepage and up to 3 contact/about pages) for emails and social links. Default `false`. |
| `skipWithoutWebsite` | Only return places that list a website. |
| `language` | Default `en`. Any language code Google supports, e.g. `de`, `fr`, `pt-BR`. Affects category names, descriptions, opening-hours labels and the country name in addresses. |
| `country` | Default `us`. Two-letter country code for the search region (`uk` is accepted for `gb`). It only biases which places Google returns; addresses and phone numbers come out in the same format whatever the region. |

An unknown `country` or `language` code stops the run straight away with a message saying which value is wrong.

```json
{
  "searchQueries": ["plumbers in Manchester", "dentists in Leeds"],
  "maxPlacesPerQuery": 100,
  "country": "gb",
  "includeContactDetails": true
}
```

To cover a whole city beyond about 120 results, run several narrower searches (by neighbourhood, district or postcode). Duplicates within a query, and repeated queries, are removed.

### Output

```json
{
  "searchQuery": "dentists in Leeds",
  "rank": 1,
  "name": "Leeds City Dentalcare",
  "categories": ["Dentist", "Cosmetic dentist", "Dental hygienist"],
  "category": "Dentist",
  "address": "159 Beeston Rd, Leeds LS11 6AW, United Kingdom",
  "street": "159 Beeston Rd",
  "city": "Leeds",
  "postalCode": "LS11 6AW",
  "state": null,
  "locality": "Leeds LS11 6AW",
  "cityLine": "Leeds LS11 6AW",
  "neighborhood": null,
  "country": "United Kingdom",
  "countryCode": "GB",
  "latitude": 53.7784034,
  "longitude": -1.5529913,
  "phone": "0113 270 5020",
  "phoneInternational": "+441132705020",
  "website": "https://www.leedscitydentalcare.co.uk/",
  "rating": 4.9,
  "reviewsCount": 597,
  "price": null,
  "description": null,
  "permanentlyClosed": false,
  "temporarilyClosed": false,
  "openingHours": [
    { "day": "Monday", "dayLabel": "Monday", "hours": "8 am-5 pm", "periods": [{ "open": "08:00", "close": "17:00" }] },
    { "day": "Saturday", "dayLabel": "Saturday", "hours": "Closed", "periods": [] }
  ],
  "timezone": "Europe/London",
  "imageUrl": "https://lh3.googleusercontent.com/grass-cs/...=w800-h600-k-no",
  "placeId": "ChIJYVVk-IJeeUgRuqS8KGHdmNI",
  "cid": "7492290227201009660",
  "googleMapsUrl": "https://www.google.com/maps/place/?q=place_id:ChIJYVVk-IJeeUgRuqS8KGHdmNI",
  "emails": ["info@leedscitydentalcare.co.uk"],
  "socials": {
    "instagram": ["https://www.instagram.com/leedscitydentalcareltd"],
    "facebook": ["https://www.facebook.com/Leedscitydentalcare"]
  }
}
```

#### Field notes

- `address` always ends with the country name (in the result language), so the same place gives the same address whatever `country` you search from.
- `city`, `postalCode` and `state` come from Google's structured address. `state` is the full name (e.g. `Texas`) and is null where Google does not use one.
- `locality` is the town and postcode part of the address, without the street, district or country, e.g. `Leeds LS11 6AW`, `Austin, TX 78751` or `75018 Paris`. `cityLine` is the same value, kept for compatibility; use `locality` in new integrations.
- `phone` is the national format; `phoneInternational` is E.164 (`+` and digits only).
- `openingHours` runs Monday to Sunday. `day` is always the English day name; `dayLabel` and `hours` are as Google shows them in the result language. `periods` gives 24-hour `open`/`close` times: `24:00` means midnight, and a close time earlier than the open time means the place closes after midnight.
- `permanentlyClosed` is true for places Google marks as permanently closed (they are still returned so you can remove them from your lists). `temporarilyClosed` is true when Google labels the place temporarily closed.
- `price` is Google's price level where shown; for hotels it is the nightly price Google shows, in the currency Google picks.
- `imageUrl` is the main photo at 800x600.
- `description` is Google's short summary, when there is one.
- Tracking parameters (`utm_*`, `fbclid`, `gclid`, `y_source`, `mc_cid` and similar) are removed from website URLs.
- `neighborhood` is the district Google gives for the place (e.g. `Wortley` or `Hyde Park`), or null.
- `emails` and `socials` only appear when `includeContactDetails` is on. Social links use one form per network (`https://`, a single host such as `www.facebook.com` or `x.com`, no query string) and are deduplicated ignoring case. WhatsApp links are normalised to `https://wa.me/<number>`.

#### Empty and failed queries

- A query with no results adds one item with `searchQuery`, `input` and an `info` message. It is not charged.
- A query that fails (for example, Google does not respond) adds one item with `searchQuery`, `input` and `error`. It is not charged.
- An entry in `searchQueries` that is not text adds an item with `input` (the entry as JSON text, e.g. `123`) and `error`. The other queries still run.

The dataset has three views: Places, Contacts, and Errors and empty queries.

### API usage

```bash
curl -X POST "https://api.apify.com/v2/acts/solarg~google-maps-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["dentists in Leeds"], "country": "gb", "maxPlacesPerQuery": 50}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("solarg/google-maps-scraper").call(run_input={"searchQueries": ["plumbers in Manchester"], "country": "gb", "includeContactDetails": True})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Pricing

- Place: $1.50 per 1,000 places saved.
- Emails and socials add-on: $2.00 per 1,000 places, charged only when `includeContactDetails` is on.

Platform usage is included in the price. Info and error items are not charged. Apify subscription plans get a discount on these prices.

### Limitations

- About 120 places per search query (a Google Maps limit). Use more specific queries for wider coverage.
- Review text, photos beyond the main image, plus codes and whether a listing is claimed are not available from search results and are not included.
- Emails are taken from the business's own website and are only available when the site publishes one.
- Contact details are public business information. Use them in line with applicable law (e.g. GDPR, CAN-SPAM).

Report problems in the Issues tab.

# Actor input Schema

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

What you would type into Google Maps, including the location, e.g. "dentists in Leeds" or "coffee shops in Austin TX".

## `maxPlacesPerQuery` (type: `integer`):

Google Maps returns up to about 120 places per search. For more, split the area into smaller searches (e.g. by neighbourhood or postcode).

## `includeContactDetails` (type: `boolean`):

Visit each business website (homepage and up to 3 contact/about pages) to collect email addresses and social media links. Charged as an add-on per place ($2.00 per 1,000 places) when enabled.

## `skipWithoutWebsite` (type: `boolean`):

Skip businesses that don't list a website.

## `language` (type: `string`):

Language code for results, e.g. en, de, fr, pt-BR. Affects category names, opening-hours labels and descriptions. An unknown code stops the run with a message.

## `country` (type: `string`):

Two-letter country code for the search region, e.g. us, gb, de (uk is accepted for gb). The region only biases which places Google returns; addresses and phone numbers are output in the same format for every region. An unknown code stops the run with a message.

## Actor input object example

```json
{
  "searchQueries": [
    "coffee shops in Austin TX"
  ],
  "maxPlacesPerQuery": 20,
  "includeContactDetails": false,
  "skipWithoutWebsite": false,
  "language": "en",
  "country": "us"
}
```

# Actor output Schema

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

Places table view of the dataset.

## `contacts` (type: `string`):

Emails and social links (when Find emails and social links is on).

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

All scraped items in the default dataset.

# 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 shops in Austin TX"
    ],
    "maxPlacesPerQuery": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("solarg/google-maps-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 shops in Austin TX"],
    "maxPlacesPerQuery": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("solarg/google-maps-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 shops in Austin TX"
  ],
  "maxPlacesPerQuery": 20
}' |
apify call solarg/google-maps-scraper --silent --output-dataset

```

## MCP server setup

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