# Nero Labs JSON Data Cleaner

> Nero Labs JSON Data Cleaner is a paid API for AI agents from x402-agent-tools.nerolabs.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Cleans up to 150 messy JSON rows by removing duplicates, flattening nested objects, normalizing emails/phones/URLs, stripping HTML, coercing types, and dropping empty fields — returning cleaned rows plus a change report.

## Facts

- Endpoint: POST https://x402-agent-tools.nerolabs.workers.dev/data/clean?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nero-labs-json-data-cleaner-160dd6fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rd87cV298rM7Au1Xm4pgt

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 nero-labs-json-data-cleaner-160dd6fd -d '<json body>'
```

Example prompt: Clean these 80 contact records for me — flatten any nested fields, deduplicate by email using normalized matching keeping the most complete row, normalize the emails and phone numbers, strip any HTML, and give me the results as JSON.

## When to prefer this

Choose this endpoint when you need a single-step, multi-operation data cleaning pipeline on up to 150 JSON rows — especially when you need deduplication (exact, normalized, or fuzzy), field normalization (emails, phones, URLs), nested JSON flattening, HTML stripping, and type coercion all in one call. Prefer this over building custom cleaning logic when working with contact lists, scraped data, or CRM exports that need to be cleaned before storage or analysis. The same engine powers nerolabs/dataset-cleaner-exporter, making it reliable for production ETL use cases.

## Known failure modes

- More than 150 rows submitted — endpoint caps at 150 rows
- Invalid JSON in rows array causes parsing error
- Fuzzy dedup with very long key text or more than 100 rows may be silently capped
- dedupKeys referencing non-existent columns silently no-ops deduplication
- Payment not included or insufficient — x402 payment required ($0.002 USDC minimum)
- maxItems set to 0 when a cap was intended — 0 means no cap

## How this service works

Pay-per-call tools for AI agents, 31 in all: read web pages and RSS feeds, OCR, PDF text, transcription; email, phone and domain checks; UK, Irish and Polish company lookups and UK risk reports; website contacts, tech stack and SEO audits; PageSpeed; AI review, job post and row enrichment; data cleaning, joins, dedupe and diffs; US and EU compliance rules. No account or API key: pay each call in USDC on Base over x402.

## Output

Returns a JSON object with a `rows` array of cleaned records and a `summary` object containing: input and output row counts, duplicates removed, columns present, fill rates per field, dedup mode used, flatten status, warnings, and the keep strategy applied. Optionally returns results as CSV text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "description": "The rows to clean. Each row is a JSON object; keys may differ between rows and values may be nested."
  },
  "flatten": {
   "type": "boolean",
   "description": "Default true. Turn nested objects into flat columns. Arrays become one JSON-text cell."
  },
  "maxItems": {
   "type": "integer",
   "minimum": 0,
   "description": "Optional cap: read at most this many rows and return at most this many. 0 (default) means no cap."
  },
  "dedupKeys": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Fields that identify a duplicate, for example [\"Email\"]. Empty compares the whole row. Use the final column names: flattened (Details_founded) and renamed. Exact and case-sensitive. Rows where every key is empty count as duplicates of each other."
  },
  "dedupMode": {
   "enum": [
    "none",
    "exact",
    "normalized",
    "fuzzy"
   ],
   "type": "string",
   "description": "How duplicates are found. normalized (default) ignores case and whitespace; exact needs identical values; fuzzy also merges near-duplicates (up to 100 rows and 1000 characters of key text, so name a short field in dedupKeys); none keeps every row."
  },
  "stripHtml": {
   "type": "boolean",
   "description": "Default false. Remove HTML tags and decode common entities in text."
  },
  "cleanFields": {
   "type": "boolean",
   "description": "Default true. Normalize emails, phone numbers and URLs, detected by field name or value shape."
  },
  "coerceTypes": {
   "type": "boolean",
   "description": "Default false. Turn \"42\" into 42 and \"true\" into true. Leading-zero values like \"007\" stay text."
  },
  "emptyToNull": {
   "type": "boolean",
   "description": "Default true. Blank text becomes null."
  },
  "keepStrategy": {
   "enum": [
    "most_complete",
    "first",
    "last"
   ],
   "type": "string",
   "description": "Which duplicate survives: most_complete (default, fewest empty fields), first or last."
  },
  "outputFormat": {
   "enum": [
    "json",
    "csv"
   ],
   "type": "string",
   "description": "json (default) returns rows; csv returns the same result as CSV text in \"csv\" instead."
  },
  "columnsToKeep": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Keep only these columns (flattened names). Takes priority over columnsToRemove."
  },
  "columnRenameMap": {
   "anyOf
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": [
   {
    "name": "Ana Silva",
    "email": "ana@silva.co.uk",
    "phone": "01174960012"
   }
  ],
  "summary": {
   "columns": [
    "name",
    "email",
    "phone"
   ],
   "warnings": [],
   "dedupKeys": [
    "email"
   ],
   "fillRates": {
    "name": 1,
    "email": 1,
    "phone": 1
   },
   "keepStrategy": "most_complete",
   "outputFormat": "json",
   "dedupModeUsed": "normalized",
   "inputRowCount": 2,
   "outputRowCount": 1,
   "fieldsFlattened": true,
   "droppedByMaxItems": 0,
   "duplicatesRemoved": 1,
   "rowsAddedByExpansion": 0
  },
  "_example_note": "Real output, trimmed: long lists cut to their first items and long text shortened."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nero-labs-json-data-cleaner-160dd6fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-tools.nerolabs.workers.dev](https://www.zero.xyz/host/x402-agent-tools.nerolabs.workers.dev/llms.txt)
