{"uid":"cap_PML3KKO7QOMeLRisaw900","slug":"csv-deduplication-api-x402-7448606d","name":"CSV Deduplication API (x402)","description":"Paid deterministic utility APIs settled in native USDC on Base.","url":"https://x402-url-evidence.vercel.app/api/csv-dedupe","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":{"required":["csvText"],"properties":{"csvText":{"type":"string","description":"CSV text with a unique, non-empty header row"},"keyColumns":{"type":"array","items":{"type":"string"},"description":"Columns used as the duplicate key; defaults to all columns"},"trimWhitespace":{"type":"boolean","description":"Trim duplicate-key values; defaults true"},"caseInsensitive":{"type":"boolean","description":"Normalize duplicate keys to lowercase; defaults true"}}},"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":{"csv":"email,name\nALICE@example.com,Alice\n","sha256":"64 lowercase hexadecimal characters","inputRows":2,"keyColumns":["email"],"outputRows":1,"duplicatesRemoved":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CVQjG24UuxxETtX-Np58b","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Removes duplicate rows from a CSV string using configurable key columns, returning a deduplicated CSV with a SHA-256 hash and row counts.","exampleAgentPrompt":"I have a CSV with contact records that has a lot of duplicate emails — can you deduplicate it using the 'email' column as the key, with case-insensitive matching? Here's the CSV text: 'email,name\\nAlice@example.com,Alice\\nalice@example.com,Alice Dup\\nbob@example.com,Bob'","exampleUseCases":[{"title":"Deduplicating a marketing email list","prompt":"I exported our subscriber list as a CSV and there are tons of duplicate email addresses. Can you deduplicate it using the 'email' column as the key with case-insensitive matching? The CSV is: 'email,name,signup_date\\nJane@co.com,Jane,2024-01-01\\njane@co.com,Jane Doe,2024-01-05\\nmark@co.com,Mark,2024-01-02'"},{"title":"Cleaning CRM export before database import","prompt":"Before I import this CRM export into our database, can you remove duplicate rows where both 'company_id' and 'contact_email' match? Here's the CSV: 'company_id,contact_email,contact_name\\n42,john@acme.com,John\\n42,john@acme.com,John Smith\\n99,sara@globex.com,Sara'"},{"title":"Deduplicating product catalog by SKU","prompt":"Our product catalog CSV has repeated SKU entries from a data merge — please deduplicate it keeping only the first occurrence of each SKU. CSV: 'sku,name,price\\nABC-1,Widget,9.99\\nabc-1,Widget v2,10.99\\nXYZ-2,Gadget,19.99'"}],"resultDescription":"Returns a JSON object containing: the deduplicated CSV as a string ('csv'), a SHA-256 hex hash of the output ('sha256'), the number of input rows ('inputRows'), output rows ('outputRows'), duplicates removed ('duplicatesRemoved'), and the key columns used ('keyColumns').","failureModes":["Missing or empty 'csvText' field returns a validation error","CSV with no header row or an empty header causes a parse error","Invalid or non-existent 'keyColumns' values that don't match any header column may result in an error or fallback to all columns","Malformed CSV (unbalanced quotes, inconsistent columns) may cause a parse failure","Payment failure via x402 (insufficient USDC balance) results in a 402 response before processing","Extremely large CSV inputs may hit payload or timeout limits"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, auditable deduplication of CSV data with configurable key columns and case normalization, and you want a verifiable SHA-256 hash of the output for integrity checking. It is ideal for data pipeline pre-processing, contact list cleaning, or any ETL step where reproducible deduplication with a micropayment audit trail (settled in USDC on Base) is acceptable. Prefer this over in-house scripts when you need a stateless, pay-per-use deduplication service without infrastructure overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:35:17.132Z","isFirstParty":false}