apyhub
Back

Convert and Parse Raw CSV API

What it does

CSV Parser converts CSV text into structured data and builds CSV from structured data. Send a body object with an operation of parse, toJson or stringify.

  • parse returns an object with headers and rows.
  • toJson returns an array of objects keyed by the header names.
  • stringify returns CSV text built from headers and rows.

Use it when you need to accept spreadsheet data from users, normalize it before storing it, or generate CSV for export without writing your own parser. Quoted cells, escaped quotes and line breaks inside quotes are handled, and you can set a single-character delimiter such as ; or a tab. Every value is returned as a string, with no number or date detection.

CSV Parser fits import flows, admin panels, data migration jobs and simple ETL steps where you need to move between human-edited CSV and machine-friendly JSON.

POST
CSV Parse, Build & Convert to JSON
https://api.eu.apyhub.com/freedailypro/convert-and-parse-raw-csv/text/csv

QUICKSTART

GUIDE

Quickstart

Convert CSV text into JSON with the required operation set to toJson.

curl -X POST "https://api.eu.apyhub.com/freedailypro/convert-and-parse-raw-csv/text/csv" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"operation":"toJson","text":"name,age\njohn,30\nleo,28"}'

What you'll get back

The live response to the request above:

{
  "tool": "CSV converter client and server side from freedailypro",
  "result": [
    {
      "name": "john",
      "age": "30"
    },
    {
      "name": "leo",
      "age": "28"
    }
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
The conversion to run.
rows
Rows of cells.
CSV text to convert.
headers
Column names.

About this endpoint

What it does

Converts data between CSV and structured formats, chosen with operation:

  • parse turns CSV text into an object with headers and rows.
  • toJson turns CSV text, or headers and rows, into a list of objects keyed by the header names.
  • stringify turns headers and rows into CSV text.

Quoted fields (values containing the delimiter, quotes or line breaks) are handled, and you can set a custom single-character delimiter such as ;. All values stay strings. There is no number or date detection.

Request Body

ParameterTypeMandatoryDescription
operationStringYesparse, stringify or toJson. Selects the conversion mode.
textStringYes for parse and toJson. Not needed for stringify.CSV text to convert.
headersArray of stringsNoColumn names. Needed for stringify. For toJson, send with rows instead of text. Not used by parse.
rowsArray of arrays of stringsNoRows, each an array of strings. Needed for stringify. For toJson, send with headers instead of text. Not used by parse.
delimiterStringNoSingle character separating cells. Cannot be a double quote or a line break. Default ,.

Sending a field that does not belong to the chosen operation returns a 400 with a plain message.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
resultArray of objects, object or stringThe converted data. A string for stringify, an object with headers and rows for parse, or an array of row objects for toJson.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.