apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert Raw CSV to JSON API

What it does

CSV to JSON converts a CSV string into a JSON array of objects keyed by the header row. Send the CSV content in body.csv, and you get back parsed objects in data plus a count of how many rows were converted.

Use body.delimiter when your file uses something other than a comma. The default delimiter is ,, so common CSV exports work without extra configuration. This is useful when you need to normalize spreadsheet exports, import tabular data into a service, or turn CSV payloads into a format your app can process with standard JSON tooling.

The response is intentionally simple: data contains the converted rows as objects, and count tells you how many records were produced. If your CSV header is name,age, a row like Alice,30 becomes an object keyed by those column names. Keep the input as a CSV string and let the converter handle the row-to-object mapping for you.

POST
Convert a CSV string to a JSON array of objects keyed by the header row
http://localhost:8080/dosvak/raw-csv-to-json
QUICKSTARTGUIDE

Quickstart

Convert a small CSV string into JSON by sending the CSV content in the request body.

curl -X POST "http://localhost:8080/dosvak/raw-csv-to-json" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"csv":"name,age\nAlice,30\nBob,25"}'

What you'll get back

Returns a JSON object with a data array of objects and a count integer. data contains the parsed rows, and count is the number of rows returned.

{
  "data": [
    {
      "name": "Alice",
      "age": "30"
    },
    {
      "name": "Bob",
      "age": "25"
    }
  ],
  "count": 2
}
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.

About this endpoint

What it does

Converts a CSV string into a JSON array of objects, using the first row as the header row and the row values as object fields. The response returns the parsed array in data and the number of items in count.

Request Body

ParameterTypeMandatoryDescription
csvStringYesThe CSV content to convert.
delimiterStringNoThe field delimiter to use. Default: ,.

Response

Returns a JSON object with a data string array of objects and a count integer. The data field contains the converted rows, and count indicates how many objects were produced.

ParameterTypeMandatoryDescription
dataObject ArrayNoThe parsed CSV rows as objects.
countIntegerNoThe number of objects in data.

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.