| Count |
Count insight.
When this insight is specified ComputeInsights returns the number of
places that match the specified filter criteria.
Example request:
{
"insights": ["INSIGHT_COUNT"],
"filter": {
"locationFilter": {
"region": {
"place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
}
},
"typeFilter": {
"includedTypes": ["restaurant"]
},
"operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
"priceLevels": [
"PRICE_LEVEL_FREE",
"PRICE_LEVEL_INEXPENSIVE"
],
"ratingFilter": {
"minRating": 4.0
}
}
}
Example response:
{
"count": 1234
}
|
| Places |
Return Places
When this insight is specified ComputeInsights returns places IDs
that match the specified filter criteria.
Example request:
{
"insights": ["INSIGHT_PLACES"],
"filter": {
"locationFilter": {
"region": {
"place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
}
},
"typeFilter": {
"includedTypes": ["restaurant"]
},
"operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
"priceLevels": [
"PRICE_LEVEL_FREE",
"PRICE_LEVEL_INEXPENSIVE"
],
"ratingFilter": {
"minRating": 4.0
}
}
}
Example response:
{
"placeInsights": [
{"place": "places/ABC"},
{"place": "places/PQR"},
{"place": "places/XYZ"}
]
}
|