# CSV Deduplication API

> CSV Deduplication API is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Removes duplicate rows from CSV text by all columns or a specified subset of key columns, returning cleaned CSV and a removal report.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/csv-dedupe
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-deduplication-api-0c059318
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-3pU7NnkxaYxJ_b3KA6Ci

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 csv-deduplication-api-0c059318 -d '<json body>'
```

Example prompt: Can you deduplicate this CSV for me — remove any rows where the email and user_id columns are identical, and tell me how many duplicates were dropped?

## When to prefer this

Use this endpoint when you need a quick, cheap ($0.003) programmatic way to deduplicate CSV data without spinning up a local data-processing pipeline. Ideal for agents handling user-uploaded CSV files, ETL preprocessing steps, or data quality checks before database imports — especially when a deduplication report (row counts) is needed alongside the cleaned output.

## Known failure modes

- Malformed CSV input causing parse errors
- Invalid or non-existent column names specified as keys
- Empty CSV input returning empty output
- Very large CSV payloads exceeding request size limits
- Encoding issues with non-UTF-8 CSV files

## How this service works

Remove duplicate rows from CSV text by all columns or a subset of key columns; returns cleaned CSV plus a report of how many rows were removed.

## Output

Returns a cleaned CSV string with duplicate rows removed, plus a report indicating how many rows were found and removed during deduplication.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string"
  },
  "keys": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "csv": "id,name\r\n1,alice\r\n2,bob\r\n3,carol\r\n",
  "removed": 1,
  "input_rows": 4,
  "output_rows": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-deduplication-api-0c059318/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
