# XML to JSON Converter API

> XML to JSON Converter API is a paid API for AI agents from lin-desk-x402.lindesk.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Converts XML-formatted text into a structured JSON object via a GET request with query parameter input

## Facts

- Endpoint: GET https://lin-desk-x402.lindesk.workers.dev/v1/dataformat/xml2json?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xml-to-json-converter-api-23aea1c0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7KOCulQljBbV1Dp6OXyV8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability xml-to-json-converter-api-23aea1c0
```

Example prompt: Convert this XML snippet to JSON for me: '<user><name>alice</name><age>30</age></user>'

## When to prefer this

Choose this endpoint when you need a simple, no-signup, pay-per-call XML-to-JSON conversion without maintaining API keys. Ideal for agents that occasionally need to normalize XML data from legacy APIs, RSS feeds, or configuration files into JSON. Prefer this over self-hosted parsers when you want stateless, serverless conversion billed by the call.

## Known failure modes

- Malformed or invalid XML input may return validation errors in an 'errors' array
- Input exceeding 100 KiB limit may be rejected
- Non-XML input passed to the endpoint will fail parsing
- Missing required 'input' query parameter returns a 400-level error
- Payment failure via x402 may block the request before processing

## How this service works

Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.

## Output

Returns a JSON object with fields: 'op' (operation name, 'xml2json'), 'result' (the parsed JSON representation of the input XML), and 'elapsed_ms' (processing time in milliseconds). The result field contains the XML data mapped to nested JSON key-value pairs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "Payload text (CSV/JSON/YAML/XML); max 100 KiB"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "op": {
       "type": "string"
      },
      "cols": {
       "type": "array"
      },
      "rows": {
       "type": "integer"
      },
      "valid": {
       "type": "boolean"
      },
      "errors": {
       "type": "array"
      },
      "result": {},
      "encoding": {
       "type": "string"
      },
      "elapsed_ms": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "xml2json",
  "result": {
   "user": {
    "age": "30",
    "name": "alice"
   }
  },
  "elapsed_ms": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xml-to-json-converter-api-23aea1c0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lin-desk-x402.lindesk.workers.dev](https://www.zero.xyz/host/lin-desk-x402.lindesk.workers.dev/llms.txt)
