apyhub
DATA EXTRACTION · DEVELOPER TOOLS

Convert XML to CSV API

Hosted on ApyHub

What it does

XML to CSV Converter turns XML from a raw request body, an uploaded file, or a public URL into CSV output. You can receive the result as inline CSV text, a downloadable CSV file, or a pre-signed S3 URL depending on the endpoint you call.

Send raw XML in the request body when you already have the document content, or pass a url to a publicly accessible XML file. If you prefer file upload workflows, send the XML file itself; the file endpoint accepts text/xml or application/xml input. Several endpoints also accept an optional output value that is used to name the generated CSV artifact.

Use XML to CSV Converter when you need to flatten structured XML into a tabular format for spreadsheets, downstream ETL jobs, or CSV-based imports. It fits common automation flows where an XML feed needs to be handed off to another service, stored as a file, or inspected quickly as plain text.

The responses stay simple: inline endpoints return CSV text, file endpoints return a downloadable CSV, and URL endpoints return a data field containing a temporary signed URL to the converted file.

▣ ENDPOINT 01 / 09
POST
Convert XML at URL → inline CSV text
http://localhost:8080/apyhub/convert-xml-to-csv/xml-url-csv-raw
QUICKSTARTGUIDE

Quickstart

Convert an XML file from a public URL to CSV by sending the XML URL in the request body.

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

What you'll get back

Returns a string containing the converted CSV output.

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 an XML file.

About this endpoint

What it does

Converts the XML file available at the provided URL into CSV and returns the result as inline CSV text. The request sends a single body field, url, and the response is a plain string containing the CSV output.

Request Body

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

Response

Returns a plain string containing the CSV text generated from the XML at the provided URL.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert XML at URL → downloadable CSV file
http://localhost:8080/apyhub/convert-xml-to-csv/xml-url-csv-file
QUICKSTARTGUIDE

Quickstart

Convert a public XML file URL into a CSV download. The optional output query parameter is left out for the simplest call.

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

What you'll get back

Returns a downloadable CSV file as a binary response.

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 an XML file.

About this endpoint

What it does

Converts an XML file available at a public URL into a downloadable CSV file. The request takes the XML file URL in the body and can optionally take an output query parameter to control the generated file name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoFile name prefix for the generated CSV output. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to an XML file. Format: URI.

Response

Returns a binary downloadable CSV file containing the converted data.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable CSV file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

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

Quickstart

Convert an XML file to CSV by uploading the XML file as multipart form data.

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

What you'll get back

Returns a downloadable CSV file as binary content.

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*
XML file to convert. Must have MIME type `text/xml` or `application/xml`.

About this endpoint

What it does

Converts an uploaded XML file into a downloadable CSV file. The request sends the XML file in the body, and the response returns the generated CSV as binary data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Must have MIME type text/xml or application/xml.

Response

Returns a binary CSV file. The success response body is a downloadable CSV 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 XML body → inline CSV text
http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-raw
QUICKSTARTGUIDE

Quickstart

Send your XML in the request body to convert it into CSV.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  -d '<root><row><name>Alice</name><email>[email protected]</email></row></root>'

What you'll get back

Returns a plain string containing the CSV output.

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.

About this endpoint

What it does

Converts a raw XML request body into CSV text. The endpoint accepts XML as a string in the request body and returns CSV as a plain string.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert into CSV text.

Response

Returns a plain string containing the generated CSV text.

Body

Name
Type
Description
bodyREQUIRED
string
▣ ENDPOINT 05 / 09
POST
Convert XML at URL → S3 signed URL
http://localhost:8080/apyhub/convert-xml-to-csv/xml-url-csv-url
QUICKSTARTGUIDE

Quickstart

Convert an XML file from a public URL into a CSV file and return a temporary download link.

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

What you'll get back

Returns a JSON object with a data string field — a pre-signed S3 URL pointing to the converted CSV file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.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.
body*
Publicly accessible URL pointing to an XML file.

About this endpoint

What it does

Converts an XML file available at a public URL into a CSV file and returns a pre-signed S3 URL for the generated CSV. The request supplies the source XML URL and can optionally provide an output name used in the generated file path.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name used in the generated CSV file path. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to an XML file. Must be a valid URI.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URL for the converted CSV file. The URL is valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted CSV file. Must be a valid URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 06 / 09
POST
Convert uploaded XML file → inline CSV text
http://localhost:8080/apyhub/convert-xml-to-csv/xml-file-csv-raw
QUICKSTARTGUIDE

Quickstart

Upload an XML file to convert it to raw CSV output.

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

What you'll get back

Returns a plain string containing the converted CSV output.

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*
XML file to convert. Must have MIME type `text/xml` or `application/xml`.

About this endpoint

What it does

Converts an uploaded XML file into CSV text. The request body must include a binary file containing XML, and the response returns the converted CSV as a string.

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Must have MIME type text/xml or application/xml.

Response

Returns a plain string containing the CSV output.

ParameterTypeMandatoryDescription
stringStringYesCSV text generated from the uploaded XML file.

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 XML file → S3 signed URL
http://localhost:8080/apyhub/convert-xml-to-csv/xml-file-csv-url
QUICKSTARTGUIDE

Quickstart

Upload an XML file to convert it to CSV and get back a downloadable link.

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

What you'll get back

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

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
XML file to convert. Must have MIME type `text/xml` or `application/xml`.

About this endpoint

What it does

Converts an uploaded XML file into a CSV file and returns a pre-signed S3 URL for the converted output. The request accepts a binary XML file upload and an optional output query parameter to influence the generated file name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name hint used in the generated CSV URL. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Must be uploaded as binary and use MIME type text/xml or application/xml.

Response

Returns a JSON object with a data string field containing a URI to the converted CSV file. The data value is a pre-signed S3 URL that is valid for 5 minutes.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted CSV file. Valid for 5 minutes.

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 XML body → downloadable CSV file
http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-file
QUICKSTARTGUIDE

Quickstart

Send your XML in the request body and download the converted CSV file.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-file?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  --data '<root><item><name>Alpha</name><value>100</value></item></root>'

What you'll get back

Returns a downloadable CSV file as a binary response.

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.

About this endpoint

What it does

Converts a raw XML request body into a downloadable CSV file. The XML is sent in the request body, and the response is a binary CSV file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output.<br>Used as the output name for the converted data.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert into CSV.

Response

Returns a binary downloadable CSV file. The response is a single binary payload containing the converted data.

ParameterTypeMandatoryDescription
binaryStringYesCSV file content returned as a downloadable binary response.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
▣ ENDPOINT 09 / 09
POST
Convert raw XML body → S3 signed URL
http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-url
QUICKSTARTGUIDE

Quickstart

Send your XML in the request body to convert it into a CSV file URL, and optionally set the output filename with a query parameter.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-csv/xml-raw-csv-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  --data '<root><item><name>Apple</name><price>1.25</price></item></root>'

What you'll get back

Returns a JSON object with a data string field. The data value is a pre-signed S3 URI pointing to the converted CSV file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.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.

About this endpoint

What it does

Converts a raw XML request body into a CSV file and returns a pre-signed S3 URL for downloading the generated CSV. The output filename is controlled by the output query parameter.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename prefix or name to use for the generated CSV. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URI for the converted CSV file. The URL is valid for 5 minutes.

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

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

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