> Documentation index: https://developers.google.com/maps/documentation/llms.txt

The Places Aggregate API is a service that returns insights about places within a specified area, filtered by location, place type, operating status, price level, and user rating. Results are either aggregated counts or the matching place IDs.

## Places Aggregate API: key facts

- **Product:** Places Aggregate API
- **Also known as:** Places Insights API (former name, renamed March 2025)
- **Category:** Analytics
- **Platform:** Web service (REST)
- **Runs on:** Server (backend code)
- **Launch stage:** GA
- **Lifecycle:** Active
- **Overview:** [Places Aggregate API overview](https://developers.google.com/maps/documentation/places-aggregate/overview.md.txt)

## Places Aggregate API: when to use it

**Use Places Aggregate API when:**

- You need the number of places of given types inside a circle, region, or custom polygon.
- You need the place IDs of places that match type, operating status, price level, or rating filters in an area.
- You need place density data for site selection, competitor analysis, or location scoring.
**Don't use Places Aggregate API when:**

- You need details such as name, address, or hours for the places found; the API returns only counts or place IDs. Use [Places API (New)](https://developers.google.com/maps/documentation/places/web-service/quick-reference.md.txt) instead.
- You need statistical place or brand insights in BigQuery. Use [Places Insights](https://developers.google.com/maps/documentation/placesinsights/quick-reference.md.txt) instead.

## Places Aggregate API: setup

- **Service to enable:** `areainsights.googleapis.com`
- **Authentication:** API key, OAuth 2.0, Service account
- **Get started:** [Set up Places Aggregate API](https://developers.google.com/maps/documentation/places-aggregate/get-api-key.md.txt)
- **Reference:** [Places Aggregate API reference](https://developers.google.com/maps/documentation/places-aggregate/reference/rest.md.txt)
- **Pricing:** [Places Aggregate API usage and billing](https://developers.google.com/maps/documentation/places-aggregate/usage-and-billing.md.txt)
- **Policies:** [Places Aggregate API policies](https://developers.google.com/maps/documentation/places-aggregate/policies.md.txt)
- **Release notes:** [Places Aggregate API release notes](https://developers.google.com/maps/documentation/places-aggregate/release-notes.md.txt)

**Official Places Aggregate API packages:**

- npm: `@googlemaps/areainsights`
- go: `cloud.google.com/go/maps`
- pypi: `google-maps-areainsights`

## Places Aggregate API: related products

- **Often used with:** [Places API (New)](https://developers.google.com/maps/documentation/places/web-service/quick-reference.md.txt), [Geocoding API](https://developers.google.com/maps/documentation/geocoding/quick-reference.md.txt)

## Places Aggregate API: common mistakes

- **Problem:** With `INSIGHT_PLACES`, if more than 100 places match, the request fails with HTTP 429 `RESOURCE_EXHAUSTED` ("Only 100 places can be returned in a single response") and returns no place IDs. **Fix:** Run `INSIGHT_COUNT` first, then narrow the area or filters until the count is 100 or lower before you request `INSIGHT_PLACES`. See [/maps/documentation/places-aggregate/request-parameters](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt).
- **Problem:** If you omit `operatingStatus`, only places with `OPERATING_STATUS_OPERATIONAL` are counted; closed places are silently excluded. **Fix:** Set `operatingStatus` explicitly when you need temporarily or permanently closed places. See [/maps/documentation/places-aggregate/request-parameters](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt).
- **Problem:** Region filters reject place IDs whose types include `establishment`, `intersection`, or `subpremise`, or that lack polygon geometry (400 error), and `INSIGHT_PLACES` requests with a `region` filter that includes disputed areas are rejected. **Fix:** Check the place ID's types with the Geocoding API before using it in a `region` filter. See [/maps/documentation/places-aggregate/request-parameters](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt).
- **Problem:** Any location filter (`circle`, `region`, or `customArea`) smaller than 1556.86 m² or larger than 2 trillion m² returns `INVALID_ARGUMENT` (for example, "Location filter area is too small, min size is 1556.86 squared meters"). **Fix:** Keep the area within that range, for example a circle `radius` of at least 23 m. See [/maps/documentation/places-aggregate/request-parameters](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt).
- **Problem:** Type filters automatically include subtypes (for example, `gym` includes `yoga_studio`), which can inflate counts. **Fix:** Use `excludedTypes` or `excludedPrimaryTypes` to remove subtypes you don't want. See [/maps/documentation/places-aggregate/more-on-type-filters](https://developers.google.com/maps/documentation/places-aggregate/more-on-type-filters.md.txt).

## What you can do with Places Aggregate API

See the guides linked below for each task, or compare across products in the
[Capabilities Explorer](https://developers.google.com/maps/documentation/capabilities-explorer.md.txt).

- [Return the count of places within a specified geographic area that meet a set of filter criteria.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt)
- [Return the Google place identifiers of places within a specified geographic area that meet a set of filter criteria.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt)
- [Specify the place type criteria used to return the count of places within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#type_filter)
- [Specify the place type criteria used to return the Google place identifiers within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#type_filter)
- [Specify the operating status criteria used to return the count of places within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#operating_status)
- [Specify the operating status criteria used to return the Google place identifiers within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#operating_status)
- [Specify the price level criteria used to return the count of places within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#price_level)
- [Specify the price level criteria used to return the Google place identifiers within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#price_level)
- [Specify the user rating criteria used to return the count of places within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#rating_filter)
- [Specify the user rating criteria used to return the Google place identifiers within a geographic area.](https://developers.google.com/maps/documentation/places-aggregate/request-parameters.md.txt#rating_filter)