{"uid":"cap_hr1C_8yzd4AJH1qehG6Fl","slug":"ai-data-tools-clean-with-audit-trail-2310ff45","name":"AI Data Tools – Clean with Audit Trail","description":"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.\n\n**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.\n\n**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.\n\n**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.\n\nWhat 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.","url":"https://www.aidatatools.dev/api/clean/audit","method":"POST","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"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:..."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.12","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.12/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YZ-AdBHEqqW4ZwWQMYpL7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.12","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs scraped data deterministically (e.g. encoding, formatting issues) and returns a replayable, SHA-256-keyed audit ledger of every change made","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Repair garbled e-commerce product titles","prompt":"I scraped a bunch of product listings and some titles have encoding problems like 'CafÃ©' instead of 'Café' — can you clean this JSON array and give me a ledger showing every field that was fixed?"},{"title":"Auditable ETL pipeline data repair","prompt":"Before we load this batch of scraped records into our database, run them through the deterministic cleaner and return the audit trail with a SHA-256 replay ID so we can prove exactly what changed if anyone questions the data later."},{"title":"Fix CSV price formatting from web scrape","prompt":"This CSV I scraped has prices formatted like '12,99' with commas instead of decimals — clean it up and show me an audit log of every field that was modified so I have a replayable record of the transformation."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:35:35.794Z","isFirstParty":false}