{"uid":"cap_Qsdh67Yf8Kkqr-af9zmz9","slug":"grist-tools-csv-to-json-converter-61e1ccaf","name":"grist.tools CSV to JSON Converter","description":"One endpoint does one thing, always the same way, for a fraction of a cent. Payment is verified before the handler runs and settled only after it succeeds, so a rejected or failed call is never a charged call.","url":"https://grist.tools/v1/csv-to-json?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"UTF-8 CSV/TSV URL. Missing charset means UTF-8; only utf-8 and utf8 declarations are accepted (case-insensitive, optionally quoted). Unsupported or invalid declarations and NUL bytes return 415; malformed UTF-8 returns 422. A UTF-8 BOM is accepted. Encoding is checked across the whole body."},"header":{"type":"boolean","description":"Use the first nonempty record as object keys. Names are trimmed; blank names become column_<position>. Names are made unique left to right using the next unused _2, _3 suffix, including collisions with literal suffixed names. Special names remain data keys. Short rows pad with empty strings; extra fields return 422 csv_extra_fields. With false, preserve actual row widths as string arrays."},"max_rows":{"type":"integer","description":"Maximum returned nonempty data rows. One additional nonempty record sets truncated; its width is budgeted but not checked against the header. A truncated success does not validate the entire CSV structure."},"delimiter":{"type":"string","description":"A single field delimiter character such as \",\" or a tab; omitted, it is auto-detected from the first rows among comma, tab, pipe, semicolon and the ASCII record and unit separators, and a line break, quote or BOM given here falls back to a comma."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-s20gvgg8GO1a2YzNMFWB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a CSV or TSV file (fetched from a URL) into a JSON array of objects or arrays, with configurable headers, delimiters, and row limits.","exampleAgentPrompt":"Fetch this CSV file at https://example.com/data.csv and convert it to JSON, treating the first row as headers and returning at most 500 rows.","exampleUseCases":[{"title":"Ingest analytics export for pipeline","prompt":"I just exported our analytics report as a CSV at https://analytics.example.com/export.csv — can you convert it to JSON with the first row as headers so I can feed it into our data pipeline? Cap it at 1000 rows."},{"title":"Preview pipe-delimited vendor feed","prompt":"I have a pipe-delimited vendor product feed at https://vendor.example.com/products.txt — convert just the first 50 rows to JSON using | as the delimiter with the first row as headers so I can check the structure."},{"title":"Parse headerless sensor log","prompt":"Convert the raw sensor log at https://iot.example.com/readings.csv to JSON without using the first row as headers — I want each row returned as a plain array of strings."}],"resultDescription":"A JSON object containing a 'rows' array (of objects when header=true, or arrays of strings when header=false), a 'truncated' boolean indicating whether the result was capped by max_rows, and detected or specified delimiter metadata. Each object uses trimmed header names as keys, with blank or duplicate names normalized automatically.","failureModes":["415 Unsupported Media Type — unsupported or invalid charset declaration or NUL bytes in the file","422 Unprocessable Entity — malformed UTF-8 encoding in the CSV body","422 csv_extra_fields — a data row has more fields than the header when header=true","Payment rejected or timed out — call is not charged if payment verification fails","URL unreachable or returns non-200 — fetch of the remote CSV URL fails","Empty or whitespace-only file — no rows returned"],"whenToPreferThis":"Choose this endpoint when you need a simple, pay-per-call CSV/TSV-to-JSON conversion from a publicly accessible URL, without standing up your own parser or managing file uploads. It is ideal for one-off or infrequent conversions where a $0.005 per-call model is economical, and when strict UTF-8 enforcement and automatic delimiter detection are desirable. Prefer alternatives if you need to process private files requiring authentication, handle non-UTF-8 encodings, or convert very large files exceeding the row budget frequently.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:36:46.318Z","isFirstParty":false,"canonicalSlug":"grist-tools-csv-to-json-converter-61e1ccaf"}