Data Clean
by Nero Labs Agent Tools in Documents & files
Cleans up to 150 messy JSON rows: removes duplicates (exact, normalized or fuzzy), flattens nested JSON, trims and fixes emails, phone numbers and URLs, strips HTML, turns number and true/false text into real types, drops empty fields, keeps, removes or renames columns. Returns clean rows plus a report of what changed. $0.002 per row sent, $0.002 minimum. Same engine as nerolabs/dataset-cleaner-exporter.
https://x402-agent-tools.nerolabs.workers.dev/data/clean- Price
- $0.004
- per call in USDC
- Uptime
- 98.9%
- last 30 days
- Response time
- 533 ms
- 1.0 s slowest 5%
- Last check
- Passed
- 10 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://x402-agent-tools.nerolabs.workers.dev/data/clean
Each call costs $0.004 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://x402-agent-tools.nerolabs.workers.dev/data/clean
content-type: application/json
{
"dedupKeys": [
"email"
],
"dedupMode": "normalized",
"rows": [
{
"email": "[email protected] ",
"name": " Ana Silva ",
"phone": "0117 496 0012"
},
{
"email": "[email protected]",
"name": "Ana Silva",
"phone": "01174960012"
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cleanFields | boolean | No | Default true. Normalize emails, phone numbers and URLs, detected by field name or value shape. |
coerceTypes | boolean | No | Default false. Turn "42" into 42 and "true" into true. Leading-zero values like "007" stay text. |
columnRenameMap | array of string or object | No | Rename columns after keep/remove, as ["oldName:newName"] or {"oldName":"newName"}, for example {"Details_founded":"founded"}. |
columnsToKeep | array of string | No | Keep only these columns (flattened names). Takes priority over columnsToRemove. |
columnsToRemove | array of string | No | Drop these columns (flattened names). Ignored if columnsToKeep is set. |
dedupKeys | array of string | No | 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 | string | No | 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. One of: none, exact, normalized, fuzzy. |
dropEmptyFields | boolean | No | Default false. Remove null and empty fields from each row. |
emptyToNull | boolean | No | Default true. Blank text becomes null. |
expandArrayField | string | No | Optional. One top-level array field (for example "offers") to explode into one row per entry, repeating the other fields. Object entries become columns. The expanded total must stay within the row limit. |
flatten | boolean | No | Default true. Turn nested objects into flat columns. Arrays become one JSON-text cell. |
flattenSeparator | string | No | Joins nested key paths when flattening. Default "_". |
keepStrategy | string | No | Which duplicate survives: most_complete (default, fewest empty fields), first or last. One of: most_complete, first, last. |
maxItems | integer | No | Optional cap: read at most this many rows and return at most this many. 0 (default) means no cap. |
outputFormat | string | No | json (default) returns rows; csv returns the same result as CSV text in "csv" instead. One of: json, csv. |
rows | array of object | Yes | The rows to clean. Each row is a JSON object; keys may differ between rows and values may be nested. |
similarityThreshold | number | No | Fuzzy mode only. 0.5 to 0.99, default 0.9. Higher is stricter. |
stripHtml | boolean | No | Default false. Remove HTML tags and decode common entities in text. |
Example response
The provider's example. We can't check it without paying.
Example response, 35 lines
{
"_example_note": "Real output, trimmed: long lists cut to their first items and long text shortened.",
"rows": [
{
"email": "[email protected]",
"name": "Ana Silva",
"phone": "01174960012"
}
],
"summary": {
"columns": [
"name",
"email",
"phone"
],
"dedupKeys": [
"email"
],
"dedupModeUsed": "normalized",
"droppedByMaxItems": 0,
"duplicatesRemoved": 1,
"fieldsFlattened": true,
"fillRates": {
"email": 1,
"name": 1,
"phone": 1
},
"inputRowCount": 2,
"keepStrategy": "most_complete",
"outputFormat": "json",
"outputRowCount": 1,
"rowsAddedByExpansion": 0,
"warnings": []
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.004.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://x402-agent-tools.nerolabs.workers.dev/data/clean' \
-H 'content-type: application/json' \
--data-raw '{"dedupKeys":["email"],"dedupMode":"normalized","rows":[{"email":"[email protected] ","name":" Ana Silva ","phone":"0117 496 0012"},{"email":"[email protected]","name":"Ana Silva","phone":"01174960012"}]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://x402-agent-tools.nerolabs.workers.dev/data/clean' \
-H 'content-type: application/json' \
--data-raw '{"dedupKeys":["email"],"dedupMode":"normalized","rows":[{"email":"[email protected] ","name":" Ana Silva ","phone":"0117 496 0012"},{"email":"[email protected]","name":"Ana Silva","phone":"01174960012"}]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.004 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.004" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.004 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-agent-tools.nerolabs.workers.dev%2Fdata%2Fclean&method=POST
const res = await pay("https://x402-agent-tools.nerolabs.workers.dev/data/clean", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"dedupKeys": [
"email"
],
"dedupMode": "normalized",
"rows": [
{
"email": "[email protected] ",
"name": " Ana Silva ",
"phone": "0117 496 0012"
},
{
"email": "[email protected]",
"name": "Ana Silva",
"phone": "01174960012"
}
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.004 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.004"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://x402-agent-tools.nerolabs.workers.dev/data/clean",
json={
"dedupKeys": [
"email",
],
"dedupMode": "normalized",
"rows": [
{
"email": "[email protected] ",
"name": " Ana Silva ",
"phone": "0117 496 0012",
},
{
"email": "[email protected]",
"name": "Ana Silva",
"phone": "01174960012",
},
],
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 10 h ago | Passed | 402 | 694 ms | $0.004 |
| 3 days ago | Timed out | - | - | - |
| 4 days ago | Passed | 402 | 118 ms | $0.004 |
| 5 days ago | Passed | 402 | 1.1 s | $0.004 |
| 5 days ago | Passed | 402 | 955 ms | $0.004 |
Show 10 older checks
| 6 days ago | Passed | 402 | 477 ms | $0.004 |
| 6 days ago | Passed | 402 | 170 ms | $0.004 |
| 7 days ago | Passed | 402 | 478 ms | $0.004 |
| 7 days ago | Passed | 402 | 640 ms | $0.004 |
| 8 days ago | Passed | 402 | 147 ms | $0.004 |
| 8 days ago | Passed | 402 | 989 ms | $0.004 |
| 9 days ago | Passed | 402 | 533 ms | $0.004 |
| 9 days ago | Passed | 402 | 1.1 s | $0.004 |
| 10 days ago | Passed | 402 | 207 ms | $0.004 |
| 10 days ago | Passed | 402 | 725 ms | $0.004 |
History
| 22 Oct 2026 | Payment address changed from 0xbe3942b2519520Ae4F3963273F7D7f0440D67292 to 0xA969a3127DcC74B2989a4b4e45Ae61B81093164A |