ToolAssay

Groups up to 500 JSON rows and works out totals per group

Groups up to 500 JSON rows and works out totals per group: count, sum, average, min, max, median, distinct count, first and last, with date buckets (day, week, month, quarter, year), a pivot table, sorting, top N and a totals row. Returns one row per group plus a summary. $0.001 per row sent, $0.002 minimum. Same engine as nerolabs/dataset-aggregate-pivot.

Answeringour last check, 2026-10-21
1 of 1checks answered this week
36 msmedian answer time
$0.003listed price per call
$0.003price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

POST https://x402-agent-tools.nerolabs.workers.dev/data/aggregate

CategoryEverything else
Provider hostx402-agent-tools.nerolabs.workers.dev
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days0 from 0 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-10-21 valid payment request 402$0.003 36 ms

Example input (from the provider)

{
  "body": {
    "aggregations": [
      {
        "field": "sales",
        "function": "sum"
      },
      {
        "function": "count"
      }
    ],
    "groupByFields": [
      "region"
    ],
    "rows": [
      {
        "region": "North",
        "sales": 120
      },
      {
        "region": "South",
        "sales": 80
      },
      {
        "region": "North",
        "sales": 60
      }
    ]
  },
  "bodyType": "json",
  "method": "POST",
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "aggregations": {
              "description": "What to compute per group, for example [{\"function\":\"count\",\"alias\":\"orders\"}, {\"field\":\"amount\",\"function\":\"sum\",\"alias\":\"total_amount\"}]. Every function except count needs a field. alias is the output column name (defaults to function_field, or \"count\"). Omitted gives a plain row count per group. Up to 20.",
              "items": {
                "properties": {
                  "alias": {
                    "description": "Output column name.",
                    "type": "string"
                  },
                  "field": {
                    "description": "The field to aggregate. Optional for count, which then counts rows.",
                    "type": "string"
                  },
                  "function": {
                    "enum": [
                      "count",
                      "countDistinct",
                      "sum",
                      "avg",
                      "min",
                      "max",
                      "median",
                      "first",
                      "last",
                      "list",
                      "listDistinct"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "function"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "dateBucketField": {
              "description": "A date or timestamp field to group by time period, for example \"orderedAt\". Adds a group column named like \"orderedAt_month\". Unreadable dates land in an \"(invalid date)\" group.",
              "type": "string"
            },
            "dateBucketGranularity": {
              "description": "Bucket size for dateBucketField: day (2026-08-19), week (2026-W34), month (2026-08, default), quarter (2026-Q3) or year.",
              "enum": [
                "day",
                "week",
                "month",
                "quarter",
                "year"
              ],
              "type": "string"
            },
            "groupByFields": {
              "description": "One output row per distinct combination of these field values, like SQL GROUP BY, for example [\"region\"] or [\"city\", \"category\"]. Dot paths like \"address.city\" work. Empty or omitted aggregates every row into a single row.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "groupMatching": {
              "description": "normalized (default) ignores letter case and extra whitespace when grouping, so \"South\" and \"south \" are one group. exact requires identical values.",
              "enum": [
                "normalized",
                "exact"
              ],
              "type": "string"
            },
            "includeTotalsRow": {
              "description": "Appends a grand-total row labelled \"(total)\" and adds a _rowType column (\"group\" or \"total\").",
              "type": "boolean"
            },
            "lenientNumbers": {
              "description": "On by default: \"$1,234.50\", \"49 USD\", \"12%\" and \"(300)\" count as numbers for sum, avg, min, max and median. Set false to accept only real numbers and plain numeric strings.",
              "type": "boolean"
            },
            "pivotField": {
              "description": "Turns this field's distinct values into columns, pivot-table style: group by \"region\" and pivot on \"product\" for one row per region with a column per product. Must not also be a group-by field. At most 50 distinct values.",
              "type": "string"
            },
            "pivotFunction": {
              "description": "How pivot cell values are combined. Defaults to sum when pivotValueField is set; ignored (row count) without one.",
              "enum": [
                "count",
                "countDistinct",
                "sum",
                "avg",
                "min",
                "max",
                "median",
                "first",
                "last",
                "list",
                "listDistinct"
              ],
              "type": "string"
            },
            "pivotValueField": {
              "description": "The field whose values fill the pivot cells, for example \"amount\". Omitted fills each cell with a row count.",
              "type": "string"
            },
            "rows": {
              "description": "The records to aggregate, up to 500. Each row is a JSON object; keys may differ between rows.",
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            "sortBy": {
              "description": "An output column to sort by: a group field, an aggregation alias such as \"total_amount\", or a pivot column. Omitted sorts by the group fields.",
              "type": "string"
            },
            "sortDirection": {
              "description": "asc (default) or desc. Use desc with topN for \"top N by\" questions.",
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            },
            "topN": {
              "description": "After sorting, keep only the first N groups. The totals row still covers every input row.",
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "rows"
          ],
          "type": "object"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
         

This page as JSON