JSON in. Metrics out.

Define a metric once in the UI, then query it over HTTP from anything: a script, a service, your own product. Events go in as the JSON you already produce.

Set up a filter once, ask it lots of questions

A filter holds the expensive decisions: which events count, which properties to group by, the interval, and up to 10 aggregations with their calculations. It runs continuously as events arrive.

The questions come later. Each Metrics API request picks an aggregation and calculation, then decides how to treat each grouping, which percentile to read, how many groups to keep and how wide the intervals should be. None of that needs a new filter.

Filter · set up once
App opens
Filter
@.eventName == 'appOpen'
Groupings
@.device.type@.app.version
Interval
5 minutes
Aggregations
1 Users · @.userId · count, distinct count2 Session length · @.sessionSeconds · avg, percentiles
  • Daily active users on iOScalculation APPROX_COUNT_DISTINCT@.device.type ["ios"]recalculatedInterval DAY 1
  • Unique users across all platformscalculation APPROX_COUNT_DISTINCT@.device.type ["$__agg"]Rolled up, so someone on iOS and Android counts once.
  • p95 session length by app versionaggregationId 2calculation PERCENTILESpercentile 0.95
  • The 5 busiest versions each hourcalculation COUNT@.device.type ["$__agg"]limit 5 TOPrecalculatedInterval HOUR 1

Metrics API

Call GET /filter-definitions to list your filters, their groupings and aggregation IDs, then POST /metrics/results with the time range and options you want. Results come back as one row per interval and group, using the grouping aliases you set.

Grouping filters
Per grouping, keep every value, keep a list of values, filter without returning the key, or roll it up with $__agg.
Top or bottom N
Keep only the largest or smallest groups in each interval.
Percentiles at query time
Percentiles are stored as t-digests, so p50, p95 or p99 is a request parameter, not a setup choice.
Rollups
Read a 5-minute filter as hourly, daily or monthly. Intervals can only get wider.
Incomplete intervals
Include or leave out the interval that is still filling.
POST /api/v1/metrics/results
{
  "filterId": "6f1c…",
  "aggregationId": 1,
  "calculation": "APPROX_COUNT_DISTINCT",
  "startTime": "2026-11-14T09:00:00Z",
  "endTime": "2026-11-14T10:00:00Z",
  "groupingFilters": [
    { "grouping": "@.device.type", "filters": ["ios"], "returnGroupingValues": false }
  ],
  "recalculatedInterval": { "type": "MINUTE", "frequency": 15 }
}
Response
[
  { "dt": "2026-11-14T09:00:00Z", "value": 1832, "groupings": { "@.app.version": "3.4.0" } },
  { "dt": "2026-11-14T09:00:00Z", "value": 4410, "groupings": { "@.app.version": "3.3.2" } },
  …
]

Where results go

The same API sits behind the Grafana plugin. Teams also use it for their own charts and alert jobs, as input to models and other services, and for dashboards inside their product.

When your app makes the same query over and over, a Data Endpoint stores it, so each request only sends what changes.

Keys and limits

Metrics calls need a key with read permission. Keys that only write can ship in mobile and web apps, because they can't read anything back.

The Metrics API allows 150 requests every 10 seconds per organization. Ask us if you need more.

Ingest API

POST a batch of JSON events to your ingest URL with a write key. There's no SDK to add and no tracking plan to adopt first.

  • Up to 1 MB per request and 1,000 requests a second by default. Batch more events per request before asking for a higher limit.
  • Use the time we receive an event, or point at a timestamp field in your events for backfills and delayed sources.
  • Errors are plain HTTP: 400 for bad payloads, 401 for keys, 429 for limits.

Posting events · Creating an ingest

Send events
curl https://ingest.aggregations.io/abc12345 \
  -H 'Content-Type: application/json' \
  -H 'x-api-token: $WRITE_KEY' \
  -d '[{"eventName": "appOpen", "userId": "u_8f2c41",
        "device": {"type": "ios"}, "app": {"version": "3.4.0"}}]'

Keep your event structure

Filters, groupings and fields point at properties with JPath, so nested objects, arrays and events from different sources all work as they are. You don't rename fields, flatten payloads or drop properties to fit us. We don't store raw events, so extra properties cost nothing.

From your backend
{ "type": "order_placed",
  "order": { "total": 42.5,
             "items": [ … ] },
  "customer": { "plan": "pro" } }

@.order.total · grouped by @.customer.plan

From Segment
{ "type": "track",
  "event": "Order Completed",
  "properties": { "revenue": 42.5 },
  "context": { "os": { "name": "iOS" } } }

@.properties.revenue · grouped by @.context.os.name

Ways to send events

If events already flow through a pipeline, connect it instead of writing new code. Each ingest accepts one of four payload formats, so most producers fit without a transform:

  • A JSON array of events, the usual choice for batching.
  • Newline-delimited JSON, one event per line.
  • An object with an events array inside it, at a path you set.
  • A single object per request, for webhooks that can't batch.

Need another source or format? Tell us.

More in Real-Time Metrics

Questions

What is a filter?

A filter is the building block for your real-time aggregation. It defines what data matters, how you want to group your aggregations and at what interval. Learn more here

How many aggregations do I get per filter?

You can add up to 10 aggregations per filter. Each aggregation can contain 1-6 calculations, so you don't need to worry about separate aggregations for Counts vs Sums etc.

From $60/month. Every feature on every plan. 14 days free.