aggregate_endpoint
Get statistical aggregations for market analysis. Billed per aggregate value returned. Aggregations: count, sum, mean, median, mode, min, max, quantile-10, quantile-25, quantile-40, quantile-60, quantile-75, quantile-80, quantile-85, quantile-90, quantile-95, quantile-99. Text and boolean fields only support count and mode, and only fields field_detail marks aggregatable are accepted. count counts the properties that hold a value for the field, so a count per country measures how well a field is covered there. Ask for several statistics in one call with the aggregations array instead of one call each.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>"
},
"name": "aggregate_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | City name. Requires country_abbreviation and province_abbreviation, and the request is refused with a 400 error if either is missing. | |
| field | No | Field to aggregate for a single statistic. Use field_list to discover available fields. Leave this out when using aggregations. | |
| api_key | Yes | API key for authentication | |
| exclude | No | Source classes to leave out of the aggregation, comma separated: "inferred" leaves out every value Houski worked out, and "inferred,observed" keeps only values from a linked public record. Applies to a field with a source column, and the answer's values_used counts the values each statistic used. In the aggregations form every entry inherits it unless it sets its own. | |
| filters | No | Filters array. Format: "field_operator=value", with the value as plain text and not URL encoded. Use search_api_documentation for reference. | |
| polygon | No | Polygon coordinates "lat_lng,lat_lng,lat_lng", latitude and longitude joined by an underscore. Maximum 100 points, simplify a shape that has more. | |
| community | No | Community/neighborhood name. Requires country_abbreviation, province_abbreviation and city. | |
| aggregation | No | Aggregation type for the single-statistic form: count, sum, mean, median, mode, min, max, quantile-10, quantile-25, quantile-40, quantile-60, quantile-75, quantile-80, quantile-85, quantile-90, quantile-95 or quantile-99. Those quantiles are the only ones that exist. | |
| bbox_ne_lat | No | Bounding box northeast latitude. All four bbox values are required together. | |
| bbox_ne_lng | No | Bounding box northeast longitude. All four bbox values are required together. | |
| bbox_sw_lat | No | Bounding box southwest latitude. All four bbox values are required together. | |
| bbox_sw_lng | No | Bounding box southwest longitude. All four bbox values are required together. | |
| price_quote | No | Return the cost of this request without billing it or returning data | |
| aggregations | No | Several statistics in one request, instead of one call each. Each entry gets its own field and aggregation, and inherits this call's location and filters unless it sets its own. Do not also set field. | |
| country_abbreviation | No | Country abbreviation as location_endpoint returns it (for example "CA"). Any letter case is accepted. | |
| province_abbreviation | No | Province, state or region abbreviation as location_endpoint returns it (for example "AB"). Requires country_abbreviation. |