aggregate
Run aggregation queries on the AQUAVIEW catalog — get counts, spatial distributions, temporal distributions, and per-collection breakdowns without fetching individual items.
Args:
aggregations: Comma-separated aggregation types (required). Valid types: total_count, datetime_max, datetime_min, datetime_frequency, collection_frequency, geometry_geohash_grid_frequency, geometry_geotile_grid_frequency.
collections: Comma-separated collection IDs to scope the aggregation (e.g., "NOAA,NDBC").
exclude_collections: Comma-separated collection IDs to omit from the aggregation (e.g., "INCIDENT_NEWS"). Applied as a CQL2 NOT filter, so it composes with filter.
bbox: Bounding box as "west,south,east,north".
datetime: Temporal filter (same format as search_datasets).
q: Free-text search to scope the aggregation. Multi-word queries are tokenised on whitespace and OR-combined to mirror search_datasets semantics (aggregate compiles q to CQL2 LIKE clauses on title/description; a raw %multi word% substring match would return 0 for most queries).
filter: CQL2-JSON filter as an object or JSON-encoded string. Flat example: {"op": "=", "args": [{"property": "aquaview:institution"}, "NOAA"]}. Nested example: {"op": "<=", "args": [{"property": "aquaview:column_stats_summary.variables.Pressure.min"}, 10]}.
license: Comma-separated SPDX license id(s) to scope the aggregation (e.g., "CC-BY-4.0,CC0-1.0"), or one of "public-domain", "proprietary", "various", "unknown". Matched against aquaview:license.
precision: Grid precision for geo aggregations (1-12, higher = finer grid). Applied to whichever geo aggregation type is requested.
datetime_frequency_interval: Interval for datetime_frequency (e.g., "month", "year", "day").
output_format: "csv" (default, sectioned CSV — ~50% fewer tokens than TOON for bucket responses), "json" (structured STAC API response), or "toon". Use "json" for deterministic/structured consumers.
Returns:
Aggregation results. In CSV mode: one ## <name> section per aggregation;
scalars render on a single line; bucket aggregations render as CSV with a
# rows: N header, a # key=value line for columns that are constant
across all rows, and a conventional CSV table of the varying columns.
In JSON/TOON mode: the raw SFEOS response with name, data_type, and
value/buckets for each requested aggregation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | ||
| bbox | No | ||
| filter | No | ||
| license | No | ||
| datetime | No | ||
| precision | No | ||
| collections | No | ||
| aggregations | Yes | ||
| output_format | No | csv | |
| exclude_collections | No | ||
| datetime_frequency_interval | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |