apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert JSON to CSV API

Hosted on ApyHub

What it does

JSON to CSV converts JSON objects, JSON arrays, or JSON files into CSV output. You can send raw JSON in the request body, upload a JSON file, or point the service at a public JSON URL, then choose whether you want the result inline, as a downloadable file, or as a pre-signed S3 URL.

Use JSON to CSV when you need to flatten API responses, export records for spreadsheets, or move structured data into tools that expect comma-separated values. The raw-body endpoints accept either a JSON object with at least one property or a non-empty array of JSON objects. The file and URL endpoints accept JSON input from an uploaded file or a public URL, and the file-based responses return a downloadable CSV binary.

If you need a URL-based workflow, the signed-URL variants return an object with a data field containing a pre-signed S3 URL to the converted file. If you prefer to handle the output directly in your app, use the inline endpoints, which return the CSV as a string.

JSON to CSV is a practical fit for reporting pipelines, lightweight ETL jobs, admin exports, and any integration where tabular output is easier to store or review than nested JSON.

▣ ENDPOINT 01 / 09
POST
Convert JSON from URL to CSV (inline response)
http://localhost:8080/apyhub/json-to-csv/json-url-csv-raw
QUICKSTARTGUIDE

Quickstart

Fetch CSV content from a public JSON file by sending its URL.

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

What you'll get back

Returns a JSON string containing the generated CSV output.

"column1,column2\nvalue1,value2"
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*
Public URL pointing to a JSON file. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json file.

About this endpoint

What it does

Converts the JSON document available at the supplied URL into CSV and returns the converted result inline in the response body.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json file. Format: URI.

Response

Returns a plain string containing the CSV output.

ParameterTypeMandatoryDescription
stringStringYesThe converted CSV content returned inline as a string.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert JSON from URL to CSV (downloadable file)
http://localhost:8080/apyhub/json-to-csv/json-url-csv-file
QUICKSTARTGUIDE

Quickstart

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

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

What you'll get back

Returns a binary CSV file containing the converted data.

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*
Public URL pointing to a JSON file. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json file.

About this endpoint

What it does

Converts JSON fetched from a public URL into a downloadable CSV file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json file. Format: URI.

Response

Returns a downloadable CSV file as binary content.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 09
POST
Convert JSON from URL to CSV (S3 signed URL)
http://localhost:8080/apyhub/json-to-csv/json-url-csv-url
QUICKSTARTGUIDE

Quickstart

Convert a JSON file at a public URL into a CSV export by sending the source URL in the request body.

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

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://..."
}
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*
Public URL pointing to a JSON file. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json file.

About this endpoint

What it does

Converts JSON content from a publicly accessible URL into a CSV file and returns a pre-signed S3 URL for the converted output. The request sends the source JSON file URL and can optionally set an output name.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublic URL pointing to a JSON file. Must be a URI. The response must have content-type application/json, text/plain; charset=UTF-8, or a content-disposition header referencing a .json 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 04 / 09
POST
Convert uploaded JSON file to CSV (downloadable file)
http://localhost:8080/apyhub/json-to-csv/json-file-csv-file
QUICKSTARTGUIDE

Quickstart

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

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

What you'll get back

Returns a downloadable CSV file as binary content. The response body is the converted CSV file.

id,name
1,Alice
2,Bob
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*
JSON file to convert. Must have MIME type application/json.

About this endpoint

What it does

Converts an uploaded JSON file into a downloadable CSV file. You send the JSON file in the request body and receive the converted CSV as binary output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOptional output name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must be uploaded as binary and use MIME type application/json.

Response

Returns a downloadable CSV file as binary content. The success response is a single binary file containing the converted data.

ParameterTypeMandatoryDescription
binaryStringYesThe response body is a downloadable CSV 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 05 / 09
POST
Convert raw JSON body to CSV (inline response)
http://localhost:8080/apyhub/json-to-csv/json-raw-csv-raw
QUICKSTARTGUIDE

Quickstart

Convert a JSON object or a non-empty array of JSON objects into raw CSV output.

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

What you'll get back

Returns a plain string containing the CSV output.

name,age
Alice,30
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.
A JSON object or a non-empty array of JSON objects to convert.
body*

About this endpoint

What it does

Converts a raw JSON object or a non-empty array of JSON objects in the request body into CSV and returns the CSV content inline as a string.

Request Body

ParameterTypeMandatoryDescription
bodyObject ArrayYesA JSON object or a non-empty array of JSON objects to convert. Accepts either:<br>- an object with at least 1 property<br>- an array with at least 1 object

Response

Returns a plain JSON string containing the CSV output.

ParameterTypeMandatoryDescription
valueStringYesThe CSV content generated from the input JSON.

Body

Name
Type
Description
bodyREQUIRED
any
A JSON object or a non-empty array of JSON objects to convert.
▣ ENDPOINT 06 / 09
POST
Convert uploaded JSON file to CSV (inline response)
http://localhost:8080/apyhub/json-to-csv/json-file-csv-raw
QUICKSTARTGUIDE

Quickstart

Upload a JSON file to convert it to CSV.

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

What you'll get back

Returns a plain string containing the CSV output.

"col1,col2\nvalue1,value2"
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*
JSON file to convert. Must have MIME type application/json.

About this endpoint

What it does

Converts an uploaded JSON file into CSV and returns the converted content inline in the response. The request body must include a binary file upload containing a JSON file with MIME type application/json.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must be provided as binary input and have MIME type application/json.

Response

Returns a CSV payload as a plain string.

ParameterTypeMandatoryDescription
valueStringYesThe converted CSV content returned inline in the response.

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 JSON file to CSV (S3 signed URL)
http://localhost:8080/apyhub/json-to-csv/json-file-csv-url
QUICKSTARTGUIDE

Quickstart

Upload a JSON file to convert it to CSV and return a pre-signed download URL.

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

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*
JSON file to convert. Must have MIME type application/json.

About this endpoint

What it does

Converts an uploaded JSON file into a CSV file and returns a pre-signed S3 URL for the converted output.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name base. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. Must have MIME type application/json. Binary upload.

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

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 JSON body to CSV (downloadable file)
http://localhost:8080/apyhub/json-to-csv/json-raw-csv-file
QUICKSTARTGUIDE

Quickstart

Convert a JSON object or array into a downloadable CSV file.

curl -X POST "http://localhost:8080/apyhub/json-to-csv/json-raw-csv-file?output=my-report" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Alice","age":30}'

What you'll get back

Returns a binary CSV file (format: "binary") containing the converted data.

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.
A JSON object or a non-empty array of JSON objects to convert.
body*

About this endpoint

What it does

Converts a raw JSON payload into a downloadable CSV file. The request body must be either a JSON object or a non-empty array of JSON objects, and the response is a binary CSV file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name prefix. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyObject / Object ArrayYesA JSON object or a non-empty array of JSON objects to convert. For the array form, each item must be a JSON object. Additional properties are allowed.

Response

Returns a binary file download containing the converted CSV data. The success response is a downloadable CSV file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
any
A JSON object or a non-empty array of JSON objects to convert.
▣ ENDPOINT 09 / 09
POST
Convert raw JSON body to CSV (S3 signed URL)
http://localhost:8080/apyhub/json-to-csv/json-raw-csv-url
QUICKSTARTGUIDE

Quickstart

Convert a JSON object or array into a CSV file and return a pre-signed download URL.

curl -X POST "http://localhost:8080/apyhub/json-to-csv/json-raw-csv-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"body":[{"name":"Alice","age":30},{"name":"Bob","age":32}]}'

What you'll get back

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

{
  "data": "https://s3.amazonaws.com/.../converted.csv"
}
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.
A JSON object or a non-empty array of JSON objects to convert.
body*

About this endpoint

What it does

Converts a raw JSON payload into a CSV file and returns a pre-signed S3 URL where the converted file can be downloaded. The input can be either a single JSON object or a non-empty array of JSON objects.

Query Parameter(s)

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

Request Body

ParameterTypeMandatoryDescription
bodyObject ArrayYesA JSON object or a non-empty array of JSON objects to convert.
body[]ObjectYesEach item must be a JSON object. Additional properties are allowed.

Response

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

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
any
A JSON object or a non-empty array of JSON objects to convert.
▣ 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.