apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert CSV to JSON API

Hosted on ApyHub

What it does

CSV to JSON Converter turns CSV data into JSON, whether you send a raw CSV body, upload a CSV file, or point it at a publicly accessible CSV URL. You can receive the converted data inline as a JSON array, as a downloadable JSON file, or as a pre-signed S3 URL.

Use the inline JSON array endpoints when you want to parse tabular data directly in your app. Send raw CSV content, a CSV file, or a CSV URL, and get back an array of objects. Use the file and URL output variants when you need a downloadable JSON artifact or a temporary hosted link for downstream processing.

The inputs are simple: a body containing raw CSV text, a binary file, or a url to a CSV resource. For URL-based conversion, the source must be publicly accessible. For file uploads, the endpoint accepts CSV files and, in the raw-file variant, common CSV MIME types.

CSV to JSON Converter is a good fit for import pipelines, data normalization jobs, ETL steps, and tools that need to ingest spreadsheet exports into JSON-based systems.

▣ ENDPOINT 01 / 09
POST
Convert CSV at URL → inline JSON array
http://localhost:8080/apyhub/csv-to-json/csv-url-json-raw
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into raw JSON by sending the CSV URL in the request body.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-url-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a JSON array of objects. Each array item is a JSON object, and the schema does not restrict the fields inside those objects.

[
  { "name": "Alice", "age": 30 },
  { "name": "Bob", "age": 25 }
]
TRY ITLIVE · 50 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*
Publicly accessible URL pointing to a CSV file. The endpoint validates that the response Content-Type is `text/csv` or `text/plain; charset=UTF-8`, or that the Content-Disposition header references a `.csv` file.

About this endpoint

What it does

Converts a CSV file accessible at a public URL into a JSON array. The endpoint fetches the CSV from the provided URL and returns the parsed rows as an array of JSON objects.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file. Must be a valid URI. The endpoint validates that the response Content-Type is text/csv or text/plain; charset=UTF-8, or that the Content-Disposition header references a .csv file.

Response

Returns a JSON array of objects, where each array item is an object parsed from the CSV rows. The output schema allows additional properties on each object.

ParameterTypeMandatoryDescription
array itemObjectYesOne parsed CSV row as a JSON object. Additional properties are allowed.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert CSV at URL → S3 signed URL
http://localhost:8080/apyhub/csv-to-json/csv-url-json-url
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into JSON by sending the CSV URL in the request body.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-url-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a JSON object with a data string field. The data value is a pre-signed S3 URL to the converted file.

{
  "data": "https://..."
}
TRY ITLIVE · 50 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*
Publicly accessible URL pointing to a CSV file.

About this endpoint

What it does

Converts a CSV file from a public URL into JSON and returns a pre-signed S3 URL where the converted file can be downloaded.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 09
POST
Convert uploaded CSV file → downloadable JSON file
http://localhost:8080/apyhub/csv-to-json/csv-file-json-file
QUICKSTARTGUIDE

Quickstart

Upload a CSV file to convert it into a JSON file.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-file-json-file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv" \
  -F "output=my-converted-data"

What you'll get back

Returns a downloadable JSON file as binary content containing the converted data.

(binary file)
TRY ITLIVE · 50 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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into a downloadable JSON file. The request sends a binary CSV file, and the response returns a binary JSON file containing the converted data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name/prefix for the generated file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Binary file upload.

Response

Returns a binary file response containing the converted JSON data. The output schema is a downloadable JSON file, so the success response is a string with format: binary.

ParameterTypeMandatoryDescription
binary fileStringYesDownloadable JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 04 / 09
POST
Convert raw CSV body → S3 signed URL
http://localhost:8080/apyhub/csv-to-json/csv-raw-json-url
QUICKSTARTGUIDE

Quickstart

Convert raw CSV text to a JSON file by sending the CSV content in the request body.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-raw-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;name,age\nAlice,30\nBob,25'

What you'll get back

Returns a JSON object with a data string field, which is a pre-signed S3 URL to the converted file.

{
  "data": "https://..."
}
TRY ITLIVE · 50 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.
Raw CSV content.

About this endpoint

What it does

Converts raw CSV content in the request body into a JSON file and returns a pre-signed S3 URL where the converted file can be downloaded.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the converted data. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a JSON object with a data string field formatted as a URI. The data value is a pre-signed S3 URL to the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ ENDPOINT 05 / 09
POST
Convert CSV at URL → downloadable JSON file
http://localhost:8080/apyhub/csv-to-json/csv-url-json-file
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into a downloadable JSON file.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-url-json-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a binary JSON file (application/json) containing the converted data.

<downloadable file>
TRY ITLIVE · 50 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*
Publicly accessible URL pointing to a CSV file.

About this endpoint

What it does

Converts the CSV file located at the provided URL into a downloadable JSON file. The request sends a CSV URL in the body and can optionally include an output query parameter to control the generated file name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoFile name to use for the generated JSON output. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file. Must be a URI.

Response

Returns a binary downloadable JSON file containing the converted data.

ParameterTypeMandatoryDescription
binaryStringYesThe response body is a binary file download in JSON format.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 06 / 09
POST
Convert uploaded CSV file → inline JSON array
http://localhost:8080/apyhub/csv-to-json/csv-file-json-raw
QUICKSTARTGUIDE

Quickstart

Convert a CSV file to raw JSON by uploading it as file.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-file-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"

What you'll get back

Returns a JSON array of objects. Each item in the array is an object, and the schema allows additional properties on each object.

[
  {
    "anyKey": "anyValue"
  }
]
TRY ITLIVE · 50 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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert. Accepted MIME types: `text/csv`, `text/plain`, `application/vnd.ms-excel`, `application/csv`, `application/octet-stream`.

About this endpoint

What it does

Converts an uploaded CSV file into an inline JSON array. The request sends a binary file, and the response returns an array of JSON objects parsed from that CSV.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Accepted MIME types: text/csv, text/plain, application/vnd.ms-excel, application/csv, application/octet-stream.

Response

Returns a JSON array of objects. Each item in the array is an object, and the schema allows additional properties on those objects. Success returns an array response.

ParameterTypeMandatoryDescription
itemObjectYesA parsed row from the uploaded CSV file. The object schema allows additional properties.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 07 / 09
POST
Convert uploaded CSV file → S3 signed URL
http://localhost:8080/apyhub/csv-to-json/csv-file-json-url
QUICKSTARTGUIDE

Quickstart

Upload a CSV file to convert it and return a pre-signed URL for the JSON output.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-file-json-url" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into a JSON file and returns a pre-signed S3 URL for the converted output. The request body must include the CSV file, and you can optionally specify the output name via query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the converted file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Format: binary.

Response

Returns a JSON object with a data string field containing a URI. The data value is the pre-signed S3 URL to the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 08 / 09
POST
Convert raw CSV body → inline JSON array
http://localhost:8080/apyhub/csv-to-json/csv-raw-json-raw
QUICKSTARTGUIDE

Quickstart

Send raw CSV text in the request body to convert it into JSON.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-raw-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;name,age\nAlice,30\nBob,25'

What you'll get back

Returns a JSON array of objects. Each array item is a JSON object, and the schema allows additional properties in each object.

[
  { "name": "Alice", "age": 30 },
  { "name": "Bob", "age": 25 }
]
TRY ITLIVE · 50 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.
Raw CSV content.

About this endpoint

What it does

Converts a raw CSV string in the request body into a JSON array. The response is an array of JSON objects parsed from the CSV rows.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a JSON array of objects.

ParameterTypeMandatoryDescription
itemObjectYesEach array item is a JSON object parsed from one CSV row. Additional properties are allowed.

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ ENDPOINT 09 / 09
POST
Convert raw CSV body → downloadable JSON file
http://localhost:8080/apyhub/csv-to-json/csv-raw-json-file
QUICKSTARTGUIDE

Quickstart

Send your raw CSV text in the request body to convert it into a downloadable JSON file.

curl -X POST "http://localhost:8080/apyhub/csv-to-json/csv-raw-json-file?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;name,age\nAlice,30\nBob,25'

What you'll get back

Returns a downloadable JSON file (binary) containing the converted data.

<JSON file download>
TRY ITLIVE · 50 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.
Raw CSV content.

About this endpoint

What it does

Converts raw CSV content sent in the request body into a downloadable JSON file. The response is a binary file stream containing the converted JSON data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name hint for the converted file. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a binary response representing a downloadable JSON file with the converted data. The success response is a single binary file, not a JSON object.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ 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.