# Ndjson To Csv — REST API endpoint `ndjson-to-csv`

Convert newline-delimited JSON (NDJSON, JSON Lines, .jsonl) into a flat CSV. Each line is one JSON object; the header is the union of every key in first-seen order, and a key a row does not have becomes an empty cell. Nested objects are flattened to dot paths (user.name) and array items to indexed keys (tags[0]) by default, or kept as JSON text in one cell with nested set to json. A line that is not valid JSON or not an object is skipped and reported by its line number; the other lines still convert. A JSON array is refused with a pointer to the JSON to CSV tool. Quoting follows RFC 4180. Values are written as text and never coerced.

- 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/ndjson-to-csv/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/ndjson-to-csv/
- Same tool on the other surface: https://findutils.com/mcp/ndjson-to-csv/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/ndjson-to-csv/execute \
  -H "Content-Type: application/json" \
  -d '{
    "ndjson": "{\"id\":1,\"user\":{\"name\":\"Ada\"}}\n{\"id\":2,\"user\":{\"name\":\"Linus\"},\"tags\":[\"a\"]}"
  }'

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

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `ndjson` | string | yes | The JSON Lines text: one JSON object per line. |
| `nested` | string (flatten \| json) | no | flatten (default): nested keys become dot paths such as user.name and array items become tags[0]. json: a nested value is written as JSON text in one cell. Default: `"flatten"`. |
| `delimiter` | string | no | Output field separator: "," (default), ";" or "\t". Default: `","`. |
| `header` | boolean | no | Write the header row. Default true. Default: `true`. |

Example arguments (verified):

```json
{
  "ndjson": "{\"id\":1,\"user\":{\"name\":\"Ada\"}}\n{\"id\":2,\"user\":{\"name\":\"Linus\"},\"tags\":[\"a\"]}"
}
```

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

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