post
https://api.mira.co/v1/ams/query
Execute a synchronous measurement query to retrieve aggregated OOH metrics.
Query formats (choose one):
-
DSL string: Provide a SQL-like query in the
queryfield. When present, all other fields are ignored.SELECT total(imps), total(reach) FROM audience FOR AUDIENCE universe_id=1 WHERE dma_id IN (501) DURING '2025-01-01' TO '2025-01-28' GROUP BY operator -
Structured JSON: Provide the following fields:
select(required): At least one metric to calculate (imps, reach, freq, grps, trps)audience(required): Population universe and optional target segmenttime(required): Date range for the queryfilters: Geographic, operator, inventory, or campaign constraintsgroupby: Dimensions to aggregate by (returns one row per unique combination)layer: Exposure measurement layer (ots, lts, audience)model_version_id: Pin to a specific model version for reproducibility
Privacy: Results are subject to aggregation thresholds. Queries returning
results below the minimum threshold will receive a 403 error with code
aggregation_threshold.
For large or complex queries, use the async endpoint (POST /v1/query/async)
to avoid timeouts.
