Index
AreaInsights
(interface)ComputeInsightsRequest
(message)ComputeInsightsResponse
(message)Filter
(message)Insight
(enum)LocationFilter
(message)LocationFilter.Circle
(message)LocationFilter.CustomArea
(message)LocationFilter.CustomArea.Polygon
(message)LocationFilter.Region
(message)OperatingStatus
(enum)PlaceInsight
(message)PriceLevel
(enum)RatingFilter
(message)TypeFilter
(message)
AreaInsights
Service definition for the Places Insights API.
ComputeInsights |
---|
Compute Insights RPC This method lets you retrieve insights about areas using a variaty of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see
|
ComputeInsightsRequest
Request for the ComputeInsights RPC.
Fields | |
---|---|
insights[] |
Required. Insights to compute. Currently only INSIGHT_COUNT and INSIGHT_PLACES are supported. |
filter |
Required. Insight filter. |
ComputeInsightsResponse
Response for the ComputeInsights RPC.
Fields | |
---|---|
place_insights[] |
Result for Insights.INSIGHT_PLACES. |
count |
Result for Insights.INSIGHT_COUNT. |
Filter
Filters for the ComputeInsights RPC.
Fields | |
---|---|
location_filter |
Required. Restricts results to places which are located in the area specified by location filters. |
type_filter |
Required. Place type filters. |
operating_status[] |
Optional. Restricts results to places whose operating status is included on this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is used as default. |
price_levels[] |
Optional. Restricts results to places whose price level is included on this list. If price_level is not set, all price levels are included in the results. |
rating_filter |
Optional. Restricts results to places whose average user ratings are in the range specified by rating_filter. If rating_filter is not set, all ratings are included in the result. |
Insight
Supported insights.
Enums | |
---|---|
INSIGHT_UNSPECIFIED |
Not Specified. |
INSIGHT_COUNT |
Count insight. When this insight is specified ComputeInsights returns the number of places that match the specified filter criteria.
|
INSIGHT_PLACES |
Return Places When this insight is specified ComputeInsights returns Places that match the specified filter criteria.
|
LocationFilter
Location filters.
Specifies the area of interest for the insight.
Fields | |
---|---|
Union field area . One of the following must be specified. area can be only one of the following: |
|
circle |
Area as a circle. |
region |
Area as region. |
custom_area |
Custom area specified by a polygon. |
Circle
A circle is defined by a center point and radius in meters.
Fields | |
---|---|
radius |
Optional. The radius of the circle in meters |
Union field center . The center of the circle. center can be only one of the following: |
|
lat_lng |
The latitude and longitude of the center of the circle. |
place |
The Place resource name of the center of the circle. Only point places are supported. |
CustomArea
Custom Area.
Fields | |
---|---|
polygon |
Required. The custom area represented as a polygon |
Polygon
A polygon is represented by a series of connected coordinates in an counterclockwise ordered sequence. The coordinates form a closed loop and define a filled region. The first and last coordinates are equivalent, and they must contain identical values. The format is a simplified version of GeoJSON polygons (we only support one counterclockwise exterior ring).
Fields | |
---|---|
coordinates[] |
Optional. The coordinates that define the polygon. |
Region
A region is a geographic boundary such as: cities, postal codes, counties, states, etc.
Fields | |
---|---|
Union field region . Defines a geographic region. Only one type of region (e.g. place) can specified at a time. region can be only one of the following: |
|
place |
The unique identifier of a specific geographic region. |
OperatingStatus
Operating status of the place.
Enums | |
---|---|
OPERATING_STATUS_UNSPECIFIED |
Not Specified. |
OPERATING_STATUS_OPERATIONAL |
The place is operational and its open during its defined hours. |
OPERATING_STATUS_PERMANENTLY_CLOSED |
The Place is no longer in business. |
OPERATING_STATUS_TEMPORARILY_CLOSED |
The Place is temporarily closed and expected to reopen in the future. |
PlaceInsight
Holds information about a place
Fields | |
---|---|
place |
The unique identifier of the place. This resource name can be used to retrieve details about the place using the Places API. |
PriceLevel
Price level of the place.
Enums | |
---|---|
PRICE_LEVEL_UNSPECIFIED |
Place price level is unspecified or unknown. |
PRICE_LEVEL_FREE |
Place provides free services. |
PRICE_LEVEL_INEXPENSIVE |
Place provides inexpensive services. |
PRICE_LEVEL_MODERATE |
Place provides moderately priced services. |
PRICE_LEVEL_EXPENSIVE |
Place provides expensive services. |
PRICE_LEVEL_VERY_EXPENSIVE |
Place provides very expensive services. |
RatingFilter
Average user rating filters.
Fields | |
---|---|
min_rating |
Optional. Restricts results to places whose average user rating is greater than or equal to min_rating. Values must be between 1.0 and 5.0. |
max_rating |
Optional. Restricts results to places whose average user rating is strictly less than or equal to max_rating. Values must be between 1.0 and 5.0. |
TypeFilter
Place type filters.
Only Place types from Table a are supported.
A place can only have a single primary type associated with it. For example, the primary type might be "mexican_restaurant" or "steak_house". Use included_primary_types and excluded_primary_types to filter the results on a place's primary type.
A place can also have multiple type values associated with it. For example a restaurant might have the following types: "seafood_restaurant", "restaurant", "food", "point_of_interest", "establishment". Use included_types and excluded_types to filter the results on the list of types associated with a place.
If a search is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if you specify {"included_types": ["restaurant"], "excluded_primary_types": ["steak_house"]}, the returned places provide "restaurant" related services but do not operate primarily as a "steak_house".
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types types or included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
One of included_types or included_primary_types must be set.
Fields | |
---|---|
included_types[] |
Optional. Included Place types. |
excluded_types[] |
Optional. Excluded Place types. |
included_primary_types[] |
Optional. Included primary Place types. |
excluded_primary_types[] |
Optional. Excluded primary Place types. |