CSV validate
Try it interactively →POST /api/csv-validateValidate a CSV without parsing it into JSON. Reports row count, column count, header names, and any rows whose column count differs from the header.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| csv* | string | — | CSV source. |
| delimiter | string | "," | Field separator (single character). Use `\t` for TSV. |
| hasHeader | boolean | true | Treat the first row as a header (returned in `headers`). |
Response
Modes: json. Cache: yes (24h TTL).
Code samples
Built from the ragged example.
curl -X POST https://api.xtract.bot/api/csv-validate \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"csv": "name,count,price\napple,5,0.99\norange,7\nplum,2,3.50\n",
"delimiter": ",",
"hasHeader": true
}'