# TinyData API — Clean CSV

> TinyData API — Clean CSV is a paid API for AI agents from cleanrows-api.lyra-lavende-7298.chatgpt.site, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Cleans a CSV string by removing duplicate and empty rows, returning the sanitized CSV along with row and column statistics.

## Facts

- Endpoint: POST https://cleanrows-api.lyra-lavende-7298.chatgpt.site/api/clean-csv?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tinydata-api-clean-csv-ebcb00fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JNgfsMPAVqI9X18BIZTzA

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 tinydata-api-clean-csv-ebcb00fb -d '<json body>'
```

Example prompt: Clean this CSV for me — remove any duplicate rows and empty rows, and tell me how many were removed: [paste CSV here].

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use CSV cleaning operation that removes duplicates and empty rows and returns row-level statistics — especially useful in automated data pipelines where lightweight programmatic cleaning is preferable to a full ETL tool.

## Known failure modes

- Missing or malformed CSV input — validation error returned
- CSV with no header row may produce unexpected column stats
- Very large CSVs may time out or exceed payload limits
- Payment failure (insufficient USDC balance) blocks the request
- Malformed options object may cause processing errors

## How this service works

Hash text, encode or decode Base64, and clean CSV. Pay $0.001–$0.01 per successful request in USDC on Polygon via x402.

## Output

Returns a JSON object with ok: true, the cleaned CSV string, and a stats object containing inputRows, outputRows, duplicateRowsRemoved, emptyRowsRemoved, and columns counts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "csv"
 ],
 "properties": {
  "csv": {
   "type": "string",
   "description": "CSV with a header row."
  },
  "options": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ok",
  "csv",
  "stats"
 ],
 "properties": {
  "ok": {
   "type": "boolean",
   "const": true
  },
  "csv": {
   "type": "string"
  },
  "stats": {
   "type": "object",
   "required": [
    "inputRows",
    "outputRows",
    "duplicateRowsRemoved",
    "emptyRowsRemoved",
    "columns"
   ],
   "properties": {
    "columns": {
     "type": "integer"
    },
    "inputRows": {
     "type": "integer"
    },
    "outputRows": {
     "type": "integer"
    },
    "emptyRowsRemoved": {
     "type": "integer"
    },
    "duplicateRowsRemoved": {
     "type": "integer"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tinydata-api-clean-csv-ebcb00fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cleanrows-api.lyra-lavende-7298.chatgpt.site](https://www.zero.xyz/host/cleanrows-api.lyra-lavende-7298.chatgpt.site/llms.txt)
