# CSV Pivot Count

> CSV Pivot Count is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Builds a count-based pivot table from CSV text using specified row and column category fields, returning normalized counts as versioned deterministic JSON.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/csv-pivot-count
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-pivot-count-117414ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3bj14Ndm46t3sC6OjXg2e

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability csv-pivot-count-117414ab -d '<json body>'
```

Example prompt: Take this CSV data and build a pivot count table where 'region' is the row field and 'product_category' is the column field — I want to see how many records fall into each combination.

## When to prefer this

Use this endpoint when you need a deterministic, bounded count pivot from two categorical fields in CSV data without relying on an external analytics provider. It is ideal as a pre-flight step before handing structured data to a downstream tool with a strict schema contract, or when you need a reproducible, versioned cross-tabulation result for lightweight in-memory aggregation on small-to-medium CSV inputs.

## Known failure modes

- Missing or invalid row_field or column_field names not found in the CSV header — returns validation error
- CSV text exceeds 8192 character limit — truncated or rejected
- Malformed CSV input that cannot be parsed — returns parsing error
- Empty CSV with no data rows — returns empty pivot with zero counts
- Payment failure via x402 — returns 402 Payment Required

## How this service works

CSV Pivot Count: CSV Pivot Count builds a count pivot from row and column category fields from bounded caller-supplied values without an external provider. Call CSV Pivot Count before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for CSV Pivot Count as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-part…

## Output

Returns a versioned deterministic JSON object containing the count pivot table with cross-tabulated frequencies for each row/column category combination, normalized values, and a versioned result contract identifying the transformation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 8192,
   "description": "Text supplied to CSV Pivot Count; used only for this bounded calculation and processed in memory without retention."
  },
  "row_field": {
   "type": "string",
   "maxLength": 8192,
   "description": "Row Field supplied to CSV Pivot Count; used only for this bounded calculation and processed in memory without retention."
  },
  "column_field": {
   "type": "string",
   "maxLength": 8192,
   "description": "Column Field supplied to CSV Pivot Count; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "pivot": {
    "a": {
     "ok": 1,
     "bad": 1
    },
    "b": {
     "ok": 1
    }
   }
  },
  "schema": "delx/util-csv-pivot-count/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "a7d65f7e6ad53c38ed0da2d98857916e403a9b41abcade8314874497f4fdcd7b",
   "external_calls": 0
  },
  "operation": "data_batch:csv_pivot_count"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-pivot-count-117414ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
