# CSV Column Count Check

> CSV Column Count Check 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).

Validates every row in a CSV string against an expected column count and returns detailed counts, normalized values, and a versioned validation result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/csv-column-count-check
- 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-column-count-check-c2c7d175
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fe1PAxgCf6cZBqzG0tsLn

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-column-count-check-c2c7d175 -d '<json body>'
```

Example prompt: Check this CSV text to make sure every row has exactly 5 columns and tell me which rows are malformed: "name,age,city,country,zip\nAlice,30,NYC,US,10001\nBob,25,LA,US\nCarol,28,Chicago,US,60601"

## When to prefer this

Choose this endpoint when you need a lightweight, deterministic, no-side-effect check that every row in a CSV has the correct number of columns before passing structured data to a downstream system with a strict schema contract. It is ideal as a preflight validation step in ETL pipelines, agent batch workflows, or any context where malformed rows would cause downstream failures. Prefer it over manual parsing when you need a versioned, auditable result contract.

## Known failure modes

- CSV text exceeds 8192 character limit — request rejected
- expected_columns not provided or not a positive integer — validation cannot proceed
- malformed input that is not parseable as CSV — may return error or unexpected counts
- empty CSV text — returns zero rows validated

## How this service works

CSV Column Count Check: CSV Column Count Check checks every CSV row against an expected column count from bounded caller-supplied values without an external provider. Call CSV Column Count Check 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 Column Count Check as versioned deterministic JSON. Price: $0.001 USDC via…

## Output

Returns a versioned deterministic JSON object containing per-row validation findings, actual column counts per row, expected vs actual mismatches, normalized values, and an overall pass/fail result for the CSV against the expected column count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 8192,
   "description": "Text supplied to CSV Column Count Check; used only for this bounded calculation and processed in memory without retention."
  },
  "expected_columns": {
   "type": "integer",
   "description": "Expected Columns supplied to CSV Column Count Check; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "passed": true,
   "invalid_rows": [],
   "header_columns": 2
  },
  "schema": "delx/util-csv-column-count-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "43c14336a55089e6418f34c8148a557706d0aeff75358365faa1dca16fa7cf64",
   "external_calls": 0
  },
  "operation": "data_batch:csv_column_count_check"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-column-count-check-c2c7d175/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)
