# Csv Dedupe — REST API endpoint `csv-dedupe`

Remove duplicate rows from a CSV or TSV table. With no keys, a row is a duplicate when every cell matches an earlier row; with keys (column names), when those columns match, so rows with the same email but a different name count as duplicates. keep "first" (default) keeps the earliest occurrence and "last" keeps the latest, and either way the kept rows stay in their original file order. trim (default true) ignores surrounding spaces when matching and ignore_case (default false) ignores letter case; cells are written out unchanged. A row whose key cells are all blank is kept as unique unless blank_keys is "collapse". Returns cleaned_csv (header + kept rows) and duplicates_csv (header + removed rows) in the input delimiter, counts, and a preview of removed rows. Quoted fields, embedded commas and line breaks are preserved; a quote that never closes stops with UNCLOSED_QUOTE and the line it opens on. Nothing is uploaded when used on the browser page.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/csv-dedupe/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/csv-dedupe/
- Same tool on the other surface: https://findutils.com/mcp/csv-dedupe/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/csv-dedupe/execute \
  -H "Content-Type: application/json" \
  -d '{
    "csv": "email,name\nada@example.com,Ada\nada@example.com,Ada L.\ngrace@example.com,Grace",
    "keys": [
      "email"
    ]
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/csv-dedupe
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `csv` | string | yes | CSV or TSV text. Up to about 10 MB. |
| `keys` | array | no | Column names that decide a duplicate. Omit for whole-row matching. |
| `keep` | string (first \| last) | no | Which occurrence of a duplicate to keep. Default first. Default: `"first"`. |
| `trim` | boolean | no | Ignore leading and trailing spaces when matching. Default true. Default: `true`. |
| `ignore_case` | boolean | no | Match without regard to letter case. Default false. Default: `false`. |
| `blank_keys` | string (distinct \| collapse) | no | distinct (default): rows whose key cells are all blank are never duplicates. collapse: they are deduplicated like any other key. Default: `"distinct"`. |
| `delimiter` | string (auto \| , \| 	 \| ; \| |) | no | Field separator. Default auto: detected from the first line. Default: `"auto"`. |
| `header` | boolean | no | The first row is a header. Default true. When false, columns are named column_1..N and the outputs carry no header. Default: `true`. |

Example arguments (verified):

```json
{
  "csv": "email,name\nada@example.com,Ada\nada@example.com,Ada L.\ngrace@example.com,Grace",
  "keys": [
    "email"
  ]
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:csv_dedupe`. Full MCP reference: https://findutils.com/mcp/csv-dedupe/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
