# Places Category Sweep (official Google Places API, your key) (`bulkdeletetools/places-category-sweep`) Actor

Every place of a given type in a country or bounding box: place\_id, address, rating, hours, reviews. Uses the official Places API (New) on your own key, so the data is licensed to you.

- **URL**: https://apify.com/bulkdeletetools/places-category-sweep.md
- **Developed by:** [Joel Chambers](https://apify.com/bulkdeletetools) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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/running/actors-in-store.md#pay-per-event

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

## Places Category Sweep

Every Google place of one type inside a whole country or any bounding box, with Place ID, address, coordinates, rating, phone, website, opening hours, business status and Google's returned reviews.

Runs on the **official Google Places API (New)** with **your own API key**. Google bills your project for the API calls; the data you get is licensed to you under Google's terms. This actor charges only for its run time.

### What it does

1. Splits the area into a grid of Nearby Search circles.
2. Google caps each Nearby Search at 20 results, so any cell that hits the cap is split into four and searched again, down to about 1 km, until every cell comes back under the cap. Dense cities get fine cells, empty countryside gets coarse ones.
3. Deduplicates by Place ID.
4. Optionally fetches Place Details for each result (hours, status, reviews, Maps link).

### Input

| Field | Meaning |
|---|---|
| `apiKey` | Your Google Places API (New) key. Stored as a secret. |
| `placeType` | A Places API type, e.g. `veterinary_care`, `dentist`, `gym`, `pharmacy`, `car_repair`. |
| `country` | `DE`, `AT`, `CH`, `UK`, `NL`, `US`, `FR`, `ES`. |
| `bbox` | Optional `[south, west, north, east]` for any other area. Overrides `country`. |
| `fetchDetails` | Add hours, status and reviews (one extra Google call per place). Default on. |
| `maxPlaces` | Stop after this many places. Handy for a test run. |

### Output

One dataset row per place:

```json
{
  "place_id": "ChIJ...",
  "name": "Tierarztpraxis Dr. Muster",
  "address": "Musterstr. 1, 10115 Berlin, Germany",
  "lat": 52.53, "lng": 13.39,
  "rating": 4.7, "review_count": 132,
  "type": "veterinary_care",
  "website": "https://...", "phone": "030 ...",
  "opening_hours": ["Monday: 8:00 AM - 6:00 PM", "..."],
  "business_status": "OPERATIONAL",
  "maps_url": "https://maps.google.com/?cid=...",
  "reviews": [{"rating": 5, "time": "2026-08-01T10:00:00Z", "text": "..."}]
}
```

The key-value store gets a `SUMMARY` record with the place count and the number of Google calls made.

### Google cost

Nearby Search and Place Details are billed by Google per call. A country-wide sweep of one category makes a few thousand Nearby calls plus one Details call per place. With reviews included, Place Details is roughly USD 20 per 1,000 places. Set `fetchDetails` to false for a cheap first pass, or use `maxPlaces` to test.

### Notes

- Google returns at most five reviews per place through the API. That is a Google limit, not the actor's.
- Place types must be from Google's Places API (New) table. Unknown types return zero results.
- 429 responses are retried with a short back-off.

# Actor input Schema

## `apiKey` (type: `string`):

Your own key with Places API (New) enabled. Google bills your project directly; this actor only charges for its run time.

## `placeType` (type: `string`):

A Places API (New) type, e.g. veterinary\_care, dentist, gym, car\_repair, pharmacy.

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

One of DE, AT, CH, UK, NL, US, FR, ES. For anything else, set bbox instead.

## `bbox` (type: `array`):

Optional. Overrides country.

## `fetchDetails` (type: `boolean`):

One extra Google call per place (about USD 20 per 1,000 with reviews).

## `maxPlaces` (type: `integer`):

Safety cap for test runs. 0 sweeps the whole area.

## `initialGrid` (type: `integer`):

The area is split into this many cells per side before the sweep starts. 12 is fine for a country; use 4 for a city bbox.

## `minCellDeg` (type: `string`):

Stops subdividing dense city cells below this size. 0.01 is about 1 km.

## Actor input object example

```json
{
  "placeType": "veterinary_care",
  "country": "DE",
  "fetchDetails": true,
  "maxPlaces": 0,
  "initialGrid": 12,
  "minCellDeg": "0.01"
}
```

# Actor output Schema

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

No description

# 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 = {
    "placeType": "veterinary_care",
    "country": "DE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bulkdeletetools/places-category-sweep").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 = {
    "placeType": "veterinary_care",
    "country": "DE",
}

# Run the Actor and wait for it to finish
run = client.actor("bulkdeletetools/places-category-sweep").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 '{
  "placeType": "veterinary_care",
  "country": "DE"
}' |
apify call bulkdeletetools/places-category-sweep --silent --output-dataset

```

## MCP server setup

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

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/3X6rqbiEJZyzFjP1o/builds/tC9NTVX8CbUD8eLJX/openapi.json
