Detect a CSV file's delimiter, quote, header row and broken header names
Detects the delimiter (comma, semicolon, tab, pipe), quote character, line terminator, BOM, header row offset (preamble lines above the header) and whether a header exists in CSV text, parsed per RFC 4180 so quoted delimiters and CRLF inside quoted fields are handled. Returns every candidate dialect with its score, each ragged row with its physical line, and header repairs (empty, duplicate or BOM-polluted names, with the deterministic replacement). Reports `unknown` when two dialects fit equally well or the file has a single column, instead of guessing. For agents about to parse an unfamiliar export. It does not coerce types or fix data rows; use csv-roundtrip for type and spreadsheet hazards.
What you get
Wrong-delimiter parses silently produce one wide column or shifted fields. 200 KB per $0.005 call, no guesses when ambiguous.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/csv-dialect. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/csv-dialect \
-H 'content-type: application/json' \
-d '{"text":"Export 2026-11-04\n\nid;name;note\n007;Ann;\"a;b\"\n008;Bob;ok\n"}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
text | string; length 0..200000 | yes | CSV text, up to 200000 characters. Detection samples the first 50000; structure checks cover all of it. |
Example request body
{
"text": "Export 2026-11-04\n\nid;name;note\n007;Ann;\"a;b\"\n008;Bob;ok\n"
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
dialect | one of | no | |
candidates | array<object> | no | |
columns | one of | no | |
preambleRows | one of | no | |
headerRow | one of | no | |
headerLine | one of | no | |
hasHeader | string; one of "yes", "no", "unknown" | no | |
header | one of | no | |
raggedRows | array<object> | no | |
ambiguity | one of | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the data-contract-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent