More on type filters

In the Places Insights API, the type filter helps you focus your search by letting you choose which types of places you want to include in or omit from the response. You can make lists of types you want and types you don't want, both for the main category of a place and for its other details. This way, you can create specific searches to find exactly the places you're looking for.

How place types work

A place can have multiple place types:

  • A place can have a single primary type that reflects its primary function. However, in some cases, the primary type might not be specified for a place.

  • A place can have one or more secondary types. Secondary types are additional categories that apply to a place to provide supplementary information about the place's characteristics and services.

For example, a place might specify its primary type as restaurant, but because it also serves as a bar and provides food services, it can also specify its secondary place types as bar, food, and establishment.

Filter by type

To filter places by primary type, use includedPrimaryTypes and excludedPrimaryTypes in the request. The filter only applies to a place's primary type. For example, an includedPrimaryTypes filter for restaurant only returns places that primarily function as restaurants.

To filter places by both the primary and secondary types, use includedTypes and excludedTypes in the request. The filter applies to both types. For example, an includedTypes of bar returns places that have bar as either their primary or secondary type.