Skip to main content
GET
/
api
/
aggregate
/
{source}
/
multi-metric
Multiple metrics with per-metric filters in a single query
curl --request GET \
  --url https://api.example.com/api/aggregate/{source}/multi-metric \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {}
  ],
  "query_info": {
    "source": "<string>",
    "group_by": "<string>",
    "metrics": [
      {
        "label": "<string>",
        "type": "<string>"
      }
    ],
    "total_groups": 123
  }
}

Authorizations

Authorization
string
header
required

Auth0 JWT access token

Path Parameters

source
enum<string>
required

The source to aggregate

Available options:
founders,
investors,
companies,
funding-rounds,
valuations,
entities,
fundings
Example:

"companies"

Query Parameters

metric
required

Metric definition: label,metric_type. Repeat for multiple metrics. Types: count, count_distinct:field, sum:field, avg:field, median:field, p25:field, p75:field, percentage:numerator_label/denominator_label. Example: metric=total,count&metric=unicorns,count&metric=pct,percentage:unicorns/total

Minimum string length: 1
Example:

"total,count"

metric_filter

Per-metric filter expression:

Minimum string length: 1
Example:

"unicorns:is_unicorn[eq]:true"

metric_having

Post-aggregation filter:

Minimum string length: 1
Example:

"percentage[gt]:25"

group_by
string

Dimension(s) to group by, comma-separated. Omit for flat aggregation

Minimum string length: 1
Pattern: ^[a-z][a-z0-9_.]*(?:,[a-z][a-z0-9_.]*)*$
Example:

"hq_country"

filter
string

Filter expression: and(key[op]:value,...), or(...). Example: and(tag_id[eq]:42,launch_year[gte]:2020)

Example:

"and(tag_id[eq]:42,launch_year[gte]:2020)"

sort
string

Sort by metric label or 'dimension'. Prefix with - for descending

Pattern: ^-?[a-z][a-z0-9_]*$
Example:

"-total"

limit
string

Number of results to return (1-500, default 25)

Example:

"25"

Response

Multi-metric results (grouped or flat depending on group_by)

data
object[]
required
query_info
object
required