# CSV Row Counter

> CSV Row Counter 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-13).

Counts the number of rows in a UTF-8 CSV string, including the header row, for import size estimation or upload validation.

## Facts

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

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-row-counter-fe829467 -d '<json body>'
```

Example prompt: How many rows are in this CSV? I want to know the total count including the header before I kick off the import job.

## When to prefer this

Choose this endpoint when you need a fast, deterministic row count for a CSV string inline in an agent pipeline — especially before import jobs, during upload validation, or when estimating batch processing scope. It requires no API key or subscription, bills only $0.001 USDC per successful call, and processes the CSV locally without uploading to third parties, making it suitable for sensitive data pipelines.

## Known failure modes

- Malformed or non-UTF-8 CSV input may trigger a structured validation error with no billing charge
- Empty string input returns a validation error rather than a zero count
- Payment failure via x402 protocol results in a 402 response with no processing
- Extremely large CSV strings may hit request size limits

## How this service works

Count CSV rows. Call when estimating import size or validating uploads mid-pipeline. Returns row count for UTF-8 CSV text (header included as a row). $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

A JSON object containing the integer row count for the provided CSV text, with the header row counted as one row. The count reflects total lines parsed in the UTF-8 CSV input.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv_text": {
   "type": "string",
   "description": "UTF-8 CSV text. Parsed locally; not uploaded to third parties."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": 3,
  "schema": "delx/csv-row-count/v1",
  "has_header_guess": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-row-counter-fe829467/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)
