# CSV Cleaner & Merger

> CSV Cleaner & Merger is a paid API for AI agents from openworker.etips.me, paid per call via x402, $0.3/call, status unknown (last checked 2026-11-20).

Fetches a CSV from a public URL, applies configurable cleaning rules (whitespace trimming, header normalization, deduplication, empty-row removal), optionally merges additional CSVs, and returns both the cleaned CSV and a JSON change log.

## Facts

- Endpoint: POST https://openworker.etips.me/api/services/csv_cleaner_merger?utm_source=zero.xyz
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-cleaner-merger-196f7ca4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VMsg3E8gcCPB4qkrDxIyz

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-cleaner-merger-196f7ca4 -d '<json body>'
```

Example prompt: Fetch the CSV at https://example.com/exports/tenders.csv, normalize all headers to snake_case, drop empty rows, deduplicate on 'vendor_id' and 'submission_date', and give me back the cleaned CSV plus a full JSON summary of every change made.

## When to prefer this

Choose this endpoint when you need a deterministic, auditable CSV cleaning and merging operation with a verifiable JSON change log — especially for tender dumps, form exports, government data releases, or any pipeline requiring proof of what changed. Prefer it over ad-hoc scripting when you need reproducible, cheap, per-call processing with explicit deduplication keys and column schema enforcement.

## Known failure modes

- Source URL unreachable or returns non-CSV content — fetch error with URL details
- CSV exceeds max_input_bytes limit (default 5MB, max 10MB) — size rejection error
- Merge URLs return incompatible or missing headers — partial merge with warning in JSON log
- Invalid URI format for source_url or merge_urls — schema validation error
- deduplicate_on references column names not present in CSV — column-not-found error
- Network timeout fetching remote CSV — timeout error

## How this service works

Fetch a CSV from a public URL, apply explicit cleaning and merging rules, and return both the cleaned CSV and a machine-readable JSON summary of every change (rows dropped, cells trimmed, duplicates collapsed, headers normalized, sources merged). Deterministic, verifiable, and cheap; ideal as a companion pack for tender dumps, form exports, and proof/desk fulfillment pipelines.

## Output

Returns two artifacts: (1) the cleaned, transformed CSV text ready for downstream use, and (2) a machine-readable JSON summary documenting every change — including rows dropped, cells trimmed, duplicate rows collapsed, headers renamed/normalized, and records merged from additional source URLs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "source_url"
     ],
     "properties": {
      "delimiter": {
       "type": "string",
       "default": ","
      },
      "merge_urls": {
       "type": "array",
       "items": {
        "type": "string",
        "format": "uri"
       },
       "default": [],
       "description": "Additional CSV URLs to fetch and merge by header name"
      },
      "source_url": {
       "type": "string",
       "format": "uri",
       "description": "Publicly reachable CSV URL to fetch"
      },
      "deduplicate_on": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "default": [],
       "description": "Column names that jointly identify a row; keep first occurrence"
      },
      "output_columns": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Explicit output column order/schema; missing columns become null"
      },
      "drop_empty_rows": {
       "type": "boolean",
       "default": true
      },
      "max_input_bytes": {
       "type": "integer",
       "default": 5000000,
       "maximum": 10000000
      },
      "trim_whitespace": {
       "type": "boolean",
       "default": true
      },
      "normalize_headers": {
       "type": "boolean",
       "default": true,
       "description": "Lowercase, snake_case, strip punctuation"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-cleaner-merger-196f7ca4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openworker.etips.me](https://www.zero.xyz/host/openworker.etips.me/llms.txt)
