# Csv Diff — REST API endpoint `csv-diff`

Compare two CSV or TSV tables by key column and list the rows that were added, removed or changed - a table diff, not a line diff, so rows in a different order are not changes. keys names one or more columns (a composite key, e.g. email + country); when omitted the tool picks a shared column named id, else a unique *_id column (customer_id), else one named email, sku, uuid, key or code, else the first shared column whose values are unique in both files, else it falls back to whole-row comparison and says so in notes. A row is changed when a non-key column present in both files differs (cells compared exactly; trim and ignore_case apply to key matching only). Duplicate keys within a file keep the first row and are reported in duplicate_keys. A quote that opens and never closes stops the comparison with UNCLOSED_QUOTE naming the file and line. mode "row" compares whole rows as a multiset, with no changed class. Returns counts, the rows (capped at max_rows), and diff_csv: comma-separated, header change_type, then every column of A followed by the new columns of B, then old_<column> for each column that changed anywhere; removed rows hold A's values, added and changed rows B's, and old_<column> holds A's value on changed rows. diff_csv lists every added, removed and changed row; unchanged rows are left out. 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-diff/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/csv-diff/
- Same tool on the other surface: https://findutils.com/mcp/csv-diff/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/csv-diff/execute \
  -H "Content-Type: application/json" \
  -d '{
    "a": "id,name,price\n1,Apple,1.00\n2,Banana,0.50",
    "b": "id,name,price\n1,Apple,1.20\n3,Cherry,3.00"
  }'

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

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `a` | string | yes | The old table (file A), CSV or TSV with a header row. a and b together up to about 10 MB. |
| `b` | string | yes | The new table (file B), CSV or TSV with a header row. a and b together up to about 10 MB. |
| `keys` | array | no | Key column names present in both files. Omit to let the tool suggest one. |
| `mode` | string (key \| row) | no | key (default): match rows by key columns. row: match whole rows, counting repeats. Default: `"key"`. |
| `trim` | boolean | no | Ignore spaces around key values when matching. Default true. Default: `true`. |
| `ignore_case` | boolean | no | Match key values without regard to letter case. Default false. Default: `false`. |
| `delimiter` | string (auto \| , \| 	 \| ; \| |) | no | Field separator for both files. Default auto: detected per file from its first line. Default: `"auto"`. |
| `header` | boolean | no | The first row of each file is a header. Default true. When false, columns are named column_1..N. Default: `true`. |
| `max_rows` | integer | no | Most entries returned in rows. Default 5000. Counts and diff_csv are never cut. Default: `5000`. |

Example arguments (verified):

```json
{
  "a": "id,name,price\n1,Apple,1.00\n2,Banana,0.50",
  "b": "id,name,price\n1,Apple,1.20\n3,Cherry,3.00"
}
```

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_diff`. Full MCP reference: https://findutils.com/mcp/csv-diff/

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