# City Table Clean

> City Table Clean is a paid API for AI agents from city-table-clean.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-15).

Cleans city open-data CSVs (Socrata or CKAN) by normalizing headers, trimming whitespace, standardizing dates, removing duplicates, and returning a cleaned CSV plus a per-cell change log.

## Facts

- Endpoint: POST https://city-table-clean.onrender.com/v1/clean?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/city-table-clean-f7193719
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OZw9_dhmFm8iEvVJqrzbq

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 city-table-clean-f7193719 -d '<json body>'
```

Example prompt: Can you clean this Socrata dataset for me — https://data.cityofchicago.org/resource/wrvz-psew.csv — deduplicate the rows and give me back a cleaned CSV with a full change report showing what was fixed?

## When to prefer this

Choose this endpoint when working specifically with Socrata or CKAN city open-data CSVs that need standardization before analysis or ingestion — it is purpose-built for municipal dataset quirks (inconsistent headers, mixed date formats, duplicate rows) and returns both a cleaned file and an auditable change log in one call. Prefer it over generic CSV tools when you need the change report for data governance or when the source is a known city data portal URL.

## Known failure modes

- Invalid or inaccessible CSV URL returns an error — URL must be publicly reachable
- Non-CSV content at the URL (e.g. HTML, JSON) causes a parse failure
- Dataset exceeds max_rows limit of 50,000 rows and is truncated or rejected
- Malformed Socrata or CKAN URL format not recognized by the service
- Network timeout if the remote CSV is very large or the host is slow
- Payment failure if USDC balance is insufficient for the $0.02 per-call fee

## How this service works

City Table Clean: send a Socrata or CKAN city open-data CSV URL (or upload) and get back a cleaned CSV plus a change report: trimmed whitespace, normalized headers, ISO dates, plain numbers, de-duplicated rows, and a per-cell change log. Feedback/support: POST /feedback (free) or js4336638@gmail.com.

## Output

Returns a cleaned CSV file with trimmed whitespace, normalized column headers, ISO-formatted dates, plain numeric values, and deduplicated rows, along with a structured change report detailing every per-cell modification made during the cleaning process.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "https URL of a public CSV: Socrata (/resource/xxxx-xxxx.csv, /d/xxxx-xxxx, rows.csv) or CKAN resource/download URL"
  },
  "dedupe": {
   "type": "boolean",
   "default": true
  },
  "max_rows": {
   "type": "integer",
   "default": 50000,
   "maximum": 50000,
   "minimum": 1
  },
  "include_changes": {
   "type": "boolean",
   "default": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/city-table-clean-f7193719/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from city-table-clean.onrender.com](https://www.zero.xyz/host/city-table-clean.onrender.com/llms.txt)
