# AI Data Tools – Clean with Audit Trail

> AI Data Tools – Clean with Audit Trail is a paid API for AI agents from www.aidatatools.dev, paid per call via x402, $0.12/call, status unknown (last checked 2026-09-14).

Repairs scraped data deterministically (e.g. encoding, formatting issues) and returns a replayable, SHA-256-keyed audit ledger of every change made

## Facts

- Endpoint: POST https://www.aidatatools.dev/api/clean/audit
- Price: $0.12/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ai-data-tools-clean-with-audit-trail-2310ff45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hr1C_8yzd4AJH1qehG6Fl

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 ai-data-tools-clean-with-audit-trail-2310ff45 -d '<json body>'
```

Example prompt: Clean this scraped product data array — it has mojibake encoding issues and messy price formatting — and give me back the fixed records along with a full audit ledger showing exactly what was changed and a replay ID I can use to verify the repairs later.

## When to prefer this

Choose this endpoint when you need not only cleaned data but a cryptographically verifiable, replayable audit trail of every repair — ideal for compliance-sensitive pipelines, regulated data workflows, or any scenario where you must prove what changed and why. Prefer this over the base clean endpoint when auditability and reproducibility are requirements, not just nice-to-haves.

## Known failure modes

- Malformed or empty body array returns a validation error
- Unsupported bodyType enum value causes a 400-level rejection
- Extremely large payloads may exceed request limits
- If no repairs are needed, ledger may be empty but replay_id is still returned
- Network timeouts on slow upstream connections

## How this service works

Deterministic post-scrape data cleaner and quality gate for AI agents. Three tiers over one engine, no LLM anywhere: the same input always produces byte-identical output.

**CLEAN** (`POST /api/clean`, $0.04) - post the raw output of a scrape, get the REPAIRED data back as the response body: residual HTML stripped, mojibake decoded ("CafÃ©" -> "Café"), invisible characters removed, non-breaking spaces normalised, values trimmed, across nested objects and arrays. It repairs how data was ENCODED and never what it SAYS: a negative price or a failed extraction ("captcha", "access denied") is reported, never rewritten or deleted. Call it after every extraction run - a verdict is cached per source, but dirt is produced fresh by every run.

**CLEAN + AUDIT** (`POST /api/clean/audit`, $0.12) - identical repaired data plus a complete, replayable, reversible ledger of every transformation, with a replay_id and input/output SHA-256. Applying the ledger in reverse reconstructs the input byte for byte.

**VERDICT** (`POST /api`, $0.01) - score + exact facts + a RELIABLE / USABLE_WITH_CLEANING / UNRELIABLE judgement, for deciding whether to trust a source at all. Facts-only signals (price_divergence, text_cleanliness, a robust MAD cross-check) report alongside without moving the score.

What is repaired automatically, what needs an explicit opt-in, and what is only ever reported is published in full at `GET /api/clean` - machine-readable, and auditable before you pay. Paid via x402: no account, no API key, no signup.

## Output

Returns the cleaned data in the same shape as the input (JSON array of objects, single object, CSV, or text), alongside an audit object containing a ledger array that lists every field path touched, the rule applied (e.g. 'mojibake.repair'), the before and after values, and a SHA-256 replay_id for verifiable, replayable audit purposes.

## 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": "array",
     "items": {
      "type": "object"
     },
     "description": "The scraped data to process. A JSON array of objects, a single object, a CSV string or raw text are all accepted -- the endpoint detects the shape and gives the same shape back."
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "sku": "B0C1",
    "price": "12,99",
    "title": "Café Table Lamp & Shade"
   }
  ],
  "audit": {
   "ledger": [
    {
     "path": "[0].title",
     "rule": "mojibake.repair",
     "after": "Café",
     "before": "CafÃ©"
    }
   ],
   "replay_id": "sha256:..."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ai-data-tools-clean-with-audit-trail-2310ff45/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.aidatatools.dev](https://www.zero.xyz/host/www.aidatatools.dev/llms.txt)
