# Sql To Csv — REST API endpoint `sql-to-csv`

Read rows out of SQL INSERT statements and return CSV, one file per table. Parses a mysqldump, a SQLite dump or a pg_dump made with --inserts as text — nothing is executed against a database. PostgreSQL COPY blocks (the pg_dump default) are not read. Column names come from the INSERT column list, then from a CREATE TABLE in the same input, then from positions. NULL becomes an empty cell. Dump noise such as SET, LOCK TABLES and comments is ignored, and an INSERT ... SELECT with no literal VALUES is reported rather than guessed at.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, API key for tools/call, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/sql-to-csv/execute (API key, 60 req/min per IP)
- API key: Running a tool needs an API key. Keys are not for sale yet: ask for early access. Without a key, a tool call answers HTTP 402 Payment Required with the error code PAYMENT_REQUIRED. The catalog and the schemas stay open without a key. https://findutils.com/api/#api-keys
- Reference page: https://findutils.com/api/sql-to-csv/
- Same tool on the other surface: https://findutils.com/mcp/sql-to-csv/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/sql-to-csv/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sql": "INSERT INTO people (id, name) VALUES (1, '\''Ada'\''), (2, '\''Doe, John'\'');"
  }'

# Parameter schema (no key needed)
curl https://api.findutils.com/api/tools/sql-to-csv
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `sql` | string | yes | SQL dump text containing INSERT statements. |
| `table` | string | no | Return only this table. Default: every table found. |
| `delimiter` | string | no | Output field separator. Default: a comma. Default: `","`. |
| `max_rows` | integer | no | Stop after this many rows per table. Default 50000, maximum 200000. Default: `50000`. |

Example arguments (verified):

```json
{
  "sql": "INSERT INTO people (id, name) VALUES (1, 'Ada'), (2, 'Doe, John');"
}
```

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/ --header "Authorization: Bearer YOUR_API_KEY"
```

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

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