{"uid":"cap_S3csX2KImJsKri7PLInKx","slug":"csv-data-cleanup-deduplication-api-6f906a87","name":"CSV Data Cleanup & Deduplication API","description":"Clean a CSV ($0.005 USDC): give an https url or inline csv (max 1 MB / 20k rows). Trims whitespace, optional case rules, dates to ISO 8601, lowercases emails, normalizes phone digits, merges or flags exact + fuzzy duplicate rows on key_columns. Returns cleaned CSV text + JSON report (rows in/out, dupes, columns changed). Deterministic, no AI. As is, no warranty. Nothing stored. Provided as is, with no warranty or guarantee of accuracy or fitness. Nothing is stored.","url":"https://well-016-datacleanup.rainmaker-wells.workers.dev/api/data-cleanup?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"csv":{"type":"string","description":"Inline CSV text instead of url (max 1 MB)."},"url":{"type":"string","description":"Public https URL of a CSV (max 1 MB)."},"fuzzy":{"type":"boolean","description":"Also match near-duplicates (default true)."},"dedupe":{"type":"string","description":"merge (default), flag, or none."},"case_rules":{"type":"object","description":"Map column -> lower | upper | title."},"date_order":{"type":"string","description":"mdy (default) or dmy for ambiguous dates."},"has_header":{"type":"boolean","description":"First row is a header (default true)."},"key_columns":{"type":"array","description":"Columns used to detect duplicates (default all)."},"date_columns":{"type":"array","description":"Columns to convert to ISO 8601 (default auto)."},"phone_format":{"type":"string","description":"digits (default) or e164."},"email_columns":{"type":"array","description":"Email columns (default auto)."},"phone_columns":{"type":"array","description":"Phone columns (default auto by header)."},"fuzzy_threshold":{"type":"number","description":"Similarity 0.5-1 (default 0.92)."}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_B8_rltsnOkcruKL05xLgG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Cleans and normalizes a CSV file by trimming whitespace, standardizing dates/emails/phones, applying case rules, and merging or flagging duplicate rows, returning cleaned CSV plus a JSON summary report.","exampleAgentPrompt":"Can you clean up this CSV — trim all whitespace, convert any date columns to ISO 8601 (dates are in month/day/year order), lowercase all email addresses, normalize phone numbers to digits only, and merge any fuzzy duplicate rows matched on the 'email' and 'name' columns? Here's the file URL: https://example.com/contacts.csv","exampleUseCases":[{"title":"Contact list deduplication before CRM import","prompt":"I have a contacts CSV at https://example.com/contacts.csv — can you clean it up, normalize all phone numbers to digits only, lowercase emails, convert dates to ISO 8601 assuming month/day/year order, and merge any fuzzy duplicate rows that share the same 'email' and 'phone' columns?"},{"title":"Standardize mixed-format sales data","prompt":"I've got inline CSV sales data with inconsistent date formats, mixed-case product names, and some duplicate rows. Can you clean it up — convert all dates to ISO 8601 treating ambiguous ones as day/month/year, apply title case to the 'product_name' column, and flag duplicates rather than merging them?"},{"title":"Pre-import data quality check for a database","prompt":"Before I load this CSV into our database, can you trim all whitespace, normalize the emails to lowercase, convert phone numbers to e164 format, standardize dates using month/day/year, and give me a report on how many duplicates were found and what columns changed? The file is at https://example.com/leads.csv"}],"resultDescription":"Returns cleaned CSV text with all normalizations applied (whitespace trimmed, dates in ISO 8601, emails lowercased, phone digits normalized, duplicates merged or flagged), plus a JSON report containing row counts in and out, number of duplicates found, and a list of columns that were changed.","failureModes":["CSV exceeds 1 MB or 20,000 rows — returns an error indicating size limit exceeded","URL is not publicly accessible or not HTTPS — returns a fetch error","Malformed CSV that cannot be parsed — returns a parse error","fuzzy_threshold outside 0.5–1 range — may return a validation error","Network timeout fetching remote URL — returns a timeout error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based CSV cleaning without AI involvement — especially for normalizing dates, phones, emails, casing, and deduplicating rows with configurable fuzzy matching. It is ideal for pre-import ETL pipelines, contact list cleanup, and data quality checks on files up to 1 MB / 20k rows. Nothing is stored server-side, making it suitable for sensitive data. Prefer it over AI-based cleaning when reproducibility and low cost ($0.005 per call) are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:30:27.262Z","isFirstParty":false,"canonicalSlug":"csv-data-cleanup-deduplication-api-6f906a87"}