# Google Maps Places by Category (`xtracto/gmaps-places-by-category`) Actor

Find every place of a given category around a location: cafes, restaurants, hotels, gyms, salons, parks, gas stations, anything searchable on Google Maps. For hotels, auto-enriches results with booking prices from Booking.com, Agoda, Expedia, Hotels.com, Traveloka, and more.

- **URL**: https://apify.com/xtracto/gmaps-places-by-category.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Automation, Lead generation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Google Maps Places by Category

Find every place of a given category around a location — cafes, restaurants, hotels, gyms, salons, gas stations, parks, you name it. When category is **hotel**, automatically enriches with booking prices per platform.

### What you get

A list of places matching `{category} near {location}`. Each item has name, full address, coordinates, average rating, review count, and the Google Maps category. For **hotels**, an extra `prices[]` array lists every booking partner (booking.com, agoda, traveloka, expedia, etc.) with start/end price and room options.

### Use cases

- **Lead lists for B2B sales** — pull every "dentist near Manhattan" or "gym in London" into a CRM.
- **Hotel intelligence** — see real-time pricing for every 3–5 star hotel in a city across booking platforms.
- **Local SEO discovery** — list every business in a category to find unclaimed Google Business Profiles.
- **Competition mapping** — count cafes within 1 km of your planned new shop, compare ratings.
- **Travel apps** — power "Restaurants near me" or "Best gyms in town" features.

### Why this actor

- **Generic**: one actor for hotels, cafes, restaurants, gyms, anything searchable on Google Maps.
- **Hotel-aware**: automatically pulls booking-partner pricing when category is hotel — replaces 5+ separate price-comparison API calls.
- **Country & language aware**: works for any region, returns localized data.
- **Star-range filter for hotels**: pass `hotel_star_min` / `hotel_star_max` to narrow to your tier.
- **Parallel enrichment**: hotel pricing for 20 places fetched concurrently for fast results.

### Sample input — cafes in New York

```json
{
    "location": "New York",
    "category": "cafe",
    "max_items": 5,
    "language": "en",
    "country": "us"
}
````

### Sample output — cafes

```json
[
    {
        "item_id": "0x89c2590014a48ff9:0x34466e9af9759422",
        "name": "Le Cafe Coffee",
        "coordinate": [40.765291, -73.9767121],
        "address": "1427 6th Ave, New York, NY 10019",
        "rating_star": 4.6,
        "review_count": null,
        "category": "Coffee shop"
    },
    {
        "item_id": "0x89c2591b920da2bf:0x974c3ae78a7be9e4",
        "name": "Urban Backyard",
        "coordinate": [40.7208064, -73.9966015],
        "address": "180 Mulberry St, New York, NY 10012",
        "rating_star": 4.7,
        "review_count": null,
        "category": "Coffee shop"
    },
    {
        "item_id": "0x89c259b52862a671:0xd50cb6d3dbcffc98",
        "name": "In Common NYC - A Breakfast & Brunch Restaurant",
        "coordinate": [40.753834999999995, -73.99624299999999],
        "address": "441 9th Ave Ste 101, New York, NY 10001",
        "rating_star": 4.5,
        "review_count": null,
        "category": "Cafe"
    }
]
```

### Sample input — 4–5 star hotels in New York

```json
{
    "location": "New York",
    "category": "hotel",
    "hotel_star_min": 4,
    "hotel_star_max": 5,
    "with_pricing": true,
    "max_items": 10,
    "language": "en",
    "country": "us"
}
```

When `category=hotel`, each item additionally has:

```json
{
    "item_id": "0x89c259490f5bc24b:0x3368727b11e06bfc",
    "name": "The Flat NYC - Hotel & Event Space New York",
    "address": "25 W 24th St, New York, NY 10010",
    "rating_star": 4.1,
    "hotel_star": "3",
    "categories": ["Hotel", "Event management company", "Live music venue", "... 2 more"],
    "checkin_out_date": "2026-08-03:2026-08-04",
    "prices": [
        {
            "site_name": "The Flat Hotel NYC",
            "start_price": "IDR 686,711",
            "end_price": "IDR 4,915,395",
            "rooms": [
                {"beds_available": "1 king bed", "room_price": "IDR 5,328,367"},
                {"beds_available": "1 queen bed", "room_price": "IDR 4,915,395"},
                "... 1 more"
            ]
        },
        {"site_name": "klook", "start_price": "IDR 555,847", "end_price": "IDR 3,870,416", "rooms": []},
        {"site_name": "Vio.com", "start_price": "IDR 552,968", "end_price": "IDR 3,990,798", "rooms": []}
    ],
    "desc": "..."
}
```

Prices come back in whatever currency Google shows for your run's location — not necessarily the `country` you set. If you need a fixed currency, convert after the run.

### How to get the inputs

- **`location`** — any city, neighborhood, or area name a user would type into Google Maps ("New York", "Manhattan SoHo", "Bali Ubud", "Tokyo Shibuya"). No URL or item\_id needed.
- **`category`** — any business category Google Maps recognizes ("cafe", "restaurant", "hotel", "gym", "pharmacy", "bar", "park", ...).

### Tips

- For non-hotel categories, set `with_pricing: false` to skip the enrichment step (faster).
- Use specific neighborhoods for tighter result clusters.
- For hotels, restrict to your star tier with `hotel_star_min`/`hotel_star_max` (0 to 5).

### Pair with other actors

- Chain each result's `item_id` into **[Google Maps Reviews](https://apify.com/xtracto/gmaps-reviews)** to pull every review per place — perfect for "all reviews of every cafe in Soho".
- Chain `item_id` into **[Google Maps Place Detail](https://apify.com/xtracto/gmaps-detail-places)** for full enrichment (popular times, contact info).
- Chain `item_id` into **[Google Maps Photos & Videos](https://apify.com/xtracto/gmaps-photos-videos)** to assemble galleries of every place in the list.
- For free-text search instead of category-near-location, use **[Google Maps Search Places](https://apify.com/xtracto/gmaps-search-places)**.

# Actor input Schema

## `location` (type: `string`):

City or area to search around (e.g. 'New York', 'Bali Ubud', 'Tokyo Shibuya').

## `category` (type: `string`):

Type of place to look for (e.g. 'cafe', 'restaurant', 'hotel', 'gym', 'salon', 'bar', 'park').

## `hotel_star_min` (type: `integer`):

Minimum hotel star rating to include (0-5). Only used when category=hotel.

## `hotel_star_max` (type: `integer`):

Maximum hotel star rating to include (0-5). Only used when category=hotel.

## `with_pricing` (type: `boolean`):

When category=hotel, also fetch booking prices per platform (booking.com, agoda, etc).

## `max_items` (type: `integer`):

Maximum number of places to return.

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

Language for result text (names, addresses, descriptions).

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

Geographic bias for Google results. Picks how Google ranks places and what currency/units it shows.

## Actor input object example

```json
{
  "location": "New York",
  "category": "cafe",
  "hotel_star_min": 0,
  "hotel_star_max": 5,
  "with_pricing": true,
  "max_items": 20,
  "language": "en",
  "country": "us"
}
```

# 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 = {
    "location": "New York"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/gmaps-places-by-category").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 = { "location": "New York" }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/gmaps-places-by-category").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "location": "New York"
}' |
apify call xtracto/gmaps-places-by-category --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=xtracto/gmaps-places-by-category",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Places by Category",
        "description": "Find every place of a given category around a location: cafes, restaurants, hotels, gyms, salons, parks, gas stations, anything searchable on Google Maps. For hotels, auto-enriches results with booking prices from Booking.com, Agoda, Expedia, Hotels.com, Traveloka, and more.",
        "version": "1.0",
        "x-build-id": "A51uChyBJrSImetEk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~gmaps-places-by-category/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-gmaps-places-by-category",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/xtracto~gmaps-places-by-category/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-gmaps-places-by-category",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/xtracto~gmaps-places-by-category/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-gmaps-places-by-category",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "location",
                    "category"
                ],
                "properties": {
                    "location": {
                        "title": "Location anchor",
                        "type": "string",
                        "description": "City or area to search around (e.g. 'New York', 'Bali Ubud', 'Tokyo Shibuya')."
                    },
                    "category": {
                        "title": "Place category",
                        "type": "string",
                        "description": "Type of place to look for (e.g. 'cafe', 'restaurant', 'hotel', 'gym', 'salon', 'bar', 'park').",
                        "default": "cafe"
                    },
                    "hotel_star_min": {
                        "title": "[Hotel only] Min star rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Minimum hotel star rating to include (0-5). Only used when category=hotel.",
                        "default": 0
                    },
                    "hotel_star_max": {
                        "title": "[Hotel only] Max star rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Maximum hotel star rating to include (0-5). Only used when category=hotel.",
                        "default": 5
                    },
                    "with_pricing": {
                        "title": "[Hotel only] Fetch booking prices",
                        "type": "boolean",
                        "description": "When category=hotel, also fetch booking prices per platform (booking.com, agoda, etc).",
                        "default": true
                    },
                    "max_items": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of places to return.",
                        "default": 20
                    },
                    "language": {
                        "title": "Language (hl)",
                        "enum": [
                            "en",
                            "en-GB",
                            "es",
                            "fr",
                            "de",
                            "it",
                            "pt",
                            "pt-BR",
                            "nl",
                            "pl",
                            "ru",
                            "uk",
                            "ro",
                            "cs",
                            "hu",
                            "el",
                            "sv",
                            "no",
                            "da",
                            "fi",
                            "tr",
                            "ja",
                            "ko",
                            "zh-CN",
                            "zh-TW",
                            "id",
                            "ms",
                            "th",
                            "vi",
                            "hi",
                            "bn",
                            "ta",
                            "ur",
                            "fa",
                            "ar",
                            "he"
                        ],
                        "type": "string",
                        "description": "Language for result text (names, addresses, descriptions).",
                        "default": "en"
                    },
                    "country": {
                        "title": "Country (gl)",
                        "enum": [
                            "us",
                            "gb",
                            "ca",
                            "au",
                            "nz",
                            "ie",
                            "de",
                            "fr",
                            "es",
                            "it",
                            "nl",
                            "be",
                            "ch",
                            "at",
                            "pt",
                            "pl",
                            "se",
                            "no",
                            "dk",
                            "fi",
                            "gr",
                            "cz",
                            "hu",
                            "ro",
                            "ua",
                            "ru",
                            "tr",
                            "jp",
                            "kr",
                            "cn",
                            "tw",
                            "hk",
                            "sg",
                            "id",
                            "my",
                            "ph",
                            "th",
                            "vn",
                            "in",
                            "pk",
                            "bd",
                            "lk",
                            "ae",
                            "sa",
                            "qa",
                            "kw",
                            "il",
                            "eg",
                            "za",
                            "ng",
                            "ke",
                            "ma",
                            "mx",
                            "br",
                            "ar",
                            "cl",
                            "co",
                            "pe",
                            "ve",
                            "uy"
                        ],
                        "type": "string",
                        "description": "Geographic bias for Google results. Picks how Google ranks places and what currency/units it shows.",
                        "default": "us"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
