apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert XML to JSON API

Hosted on ApyHub

What it does

XML to JSON Converter turns XML documents into JSON in one step. Send raw XML, an XML file upload, or a public XML URL, and get the converted data back as inline JSON, a downloadable JSON file, or a pre-signed S3 URL depending on the endpoint you choose.

Use it when you need to move XML into a JSON-based workflow without writing parsing code. The service accepts raw XML in the request body, XML files in binary upload form, or a url pointing to a publicly accessible XML file. For file- and URL-based flows, you can also pass an optional output query value to name the generated file.

The response format stays simple: either an object containing JSON data, a binary JSON download, or an object with a data field that contains a pre-signed S3 URL valid for 5 minutes. That makes it easy to plug into import jobs, ETL pipelines, document processing systems, or automation that needs JSON artifacts instead of XML.

Choose XML to JSON Converter when you are normalizing supplier feeds, converting legacy exports, or exposing XML content to services that expect JSON.

▣ ENDPOINT 01 / 09
POST
Convert raw XML body → inline JSON
http://localhost:8080/apyhub/convert-xml-to-json/xml-raw-json-raw
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-raw-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  --data '<note><to>Alice</to><from>Bob</from><message>Hello!</message></note>'

What you'll get back

Returns a JSON object. The output schema does not declare any specific top-level fields, so the exact response shape may vary.

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 JSON. The endpoint accepts the XML as a string in the request body and returns a JSON object on success.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert into JSON.

Response

The endpoint returns a JSON object. The output schema does not define any fixed top-level fields, so the exact response shape is not yet captured in the schema.

Body

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

Quickstart

Send the XML content in the request body to convert it into a JSON file.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-raw-json-url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  --data '<root><name>Hello</name></root>'

What you'll get back

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

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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 JSON and returns a pre-signed S3 URL where the converted JSON file can be downloaded. The output query parameter controls the output filename stem used in the generated URL.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename stem. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert to JSON.

Response

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

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

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
▣ ENDPOINT 03 / 09
POST
Convert XML at URL → downloadable JSON file
http://localhost:8080/apyhub/convert-xml-to-json/xml-url-json-file
QUICKSTARTGUIDE

Quickstart

Convert an XML file from a public URL into a downloadable JSON file.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-url-json-file?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 binary JSON file download 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*
Publicly accessible URL pointing to an XML file.

About this endpoint

What it does

Converts the XML file available at the provided URL into a downloadable JSON file. The request takes an XML file URL in the body and returns the converted file as binary content.

Query Parameter(s)

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

Request Body

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

Response

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

ParameterTypeMandatoryDescription
binaryStringYesDownloadable JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

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

Quickstart

Convert an XML file to a JSON file by uploading it as multipart form data.

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

What you'll get back

Returns a downloadable JSON file as binary 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.
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. Accepted MIME types: `text/xml`, `application/xml`, `text/plain`, `application/octet-stream`, `binary/octet-stream`.

About this endpoint

What it does

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

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoDefault: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Format: binary. Accepted MIME types: text/xml, application/xml, text/plain, application/octet-stream, binary/octet-stream.

Response

Returns a binary JSON file as the success response. The response body is a downloadable file containing the converted data.

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 05 / 09
POST
Convert uploaded XML file → S3 signed URL
http://localhost:8080/apyhub/convert-xml-to-json/xml-file-json-url
QUICKSTARTGUIDE

Quickstart

Upload an XML file to convert it to JSON and save the result under the default output name.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-file-json-url?output=sample-output" \
  -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 JSON file, valid for 5 minutes.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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. Accepted MIME types: `text/xml`, `application/xml`, `text/plain`, `application/octet-stream`, `binary/octet-stream`.

About this endpoint

What it does

Converts an uploaded XML file into JSON and returns a pre-signed S3 URL where the converted JSON file can be downloaded. The file upload is sent in the request body, and the response contains the URL in a data string field.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename suffix or label used when generating the converted JSON file name. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Accepted MIME types: text/xml, application/xml, text/plain, application/octet-stream, binary/octet-stream.

Response

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

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL pointing to the converted JSON 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 06 / 09
POST
Convert raw XML body → downloadable JSON file
http://localhost:8080/apyhub/convert-xml-to-json/xml-raw-json-file
QUICKSTARTGUIDE

Quickstart

Convert XML text to a downloadable JSON file with a single POST request.

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-raw-json-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/xml" \
  -H "Accept: application/json" \
  --data '<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Meeting at 3 PM</body></note>'

What you'll get back

Returns a binary file response containing the converted JSON data. The output schema is a downloadable JSON file (string with format: binary), so the response body is the file itself rather than a JSON object.

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 JSON file. The XML is sent in the request body, and the response is a binary file containing the converted JSON data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name/label. Default: sample-output.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw XML content to convert into JSON.

Response

Returns a binary response containing a downloadable JSON file with the converted data.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable JSON file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

Name
Type
Description
bodyREQUIRED
string
▣ ENDPOINT 07 / 09
POST
Convert XML at URL → inline JSON
http://localhost:8080/apyhub/convert-xml-to-json/xml-url-json-raw
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-url-json-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 JSON object with additional properties; the response shape is not fixed by the schema.

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 supplied URL into JSON and returns the converted content inline. The request sends a URL to a publicly accessible XML file.

Request Body

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

Response

The endpoint returns a JSON object with an unspecified top-level shape, because the output schema only declares an object with additionalProperties: true. The exact fields in the success response are not defined in the schema.

Body

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

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/convert-xml-to-json/xml-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.xml"
  }'

What you'll get back

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

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.json?..."
}
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 a public URL into JSON and returns a pre-signed S3 URL for the generated JSON file. The request takes the source XML URL in the body and can optionally use a query parameter to set the output name.

Query Parameter(s)

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

Request Body

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

Response

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

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

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output

Body

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

Quickstart

Upload one XML file to convert it into raw JSON output.

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

What you'll get back

Returns a JSON object. The output schema does not declare any specific top-level fields, so the exact response shape depends on the endpoint behavior.

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. Accepted MIME types: `text/xml`, `application/xml`, `text/plain`, `application/octet-stream`, `binary/octet-stream`.

About this endpoint

What it does

Converts an uploaded XML file into JSON and returns the converted result inline in the response. The request uploads a single XML file; the response schema is not yet defined beyond a JSON object.

Request Body

ParameterTypeMandatoryDescription
fileStringYesXML file to convert. Accepted MIME types: text/xml, application/xml, text/plain, application/octet-stream, binary/octet-stream.

Response

Returns a JSON object. The output schema is not yet defined beyond an object with additional properties, so the exact response fields are not specified.

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.

▣ 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.