CSV Viewer API
Parse CSV into headers and rows (padded to the same width), optionally filtered by a search term and sorted by a column. Numbers and dates sort naturally.
POST /api/v1/tools/csv-viewerMCP csv_viewerData & ConversionView CSV files as a clean, sortable table in your browser. Click headers to sort, filter rows by any text and export the result. Nothing is uploaded.
Input
Send these as a JSON object. Unknown fields are rejected.
- input
- The CSV text. (string, required)
- delimiter
- Delimiter: "auto" to detect, or a single character. (string, up to 4 characters, default "auto")
- header
- Use the first row as column headings. (boolean, default true)
- filter
- Keep only rows where some cell contains this text (case-insensitive). (string, up to 500 characters, default "")
- sortColumn
- 1-based column number to sort by. Omit to keep file order. (integer, 1 to 10000)
- sortDirection
- Sort direction when sortColumn is set. (string, one of asc, desc, default "asc")
- limit
- Maximum rows to return (1 to 1000). (integer, 1 to 1000, default 100)
curl https://pithlab.com/api/v1/tools/csv-viewer \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"input":"city,population\nLeeds,812000\nYork,202800\nBristol,472400","sortColumn":2,"sortDirection":"desc"}'