# CoCo XML-to-JSON Converter

> CoCo XML-to-JSON Converter is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Converts XML text to a JSON object via a simple GET request with the XML passed as a query parameter

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/xml-to-json?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-xml-to-json-converter-ddf8e102
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7mNIMm5FZkV8MPSBoPWMo

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 coco-xml-to-json-converter-ddf8e102
```

Example prompt: Can you convert this XML string to JSON for me: '<user><name>Alice</name><age>30</age></user>'?

## When to prefer this

Choose this endpoint when you have an XML string that needs to be quickly converted to a JSON object without setting up a local XML parser. Ideal for agents handling legacy API responses, configuration files, or data feeds that return XML but downstream processing requires JSON. Useful for lightweight, one-off conversions within a pay-per-call micro-service pattern.

## Known failure modes

- Malformed or invalid XML input may produce an error or unexpected JSON structure
- Very large XML payloads passed as a query parameter may hit URL length limits
- Deeply nested or attribute-heavy XML may not convert perfectly to a flat JSON structure
- Missing 'text' query parameter may result in an error response

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns a JSON object that mirrors the structure of the input XML, with XML elements mapped to JSON keys and values. The response wraps the converted data under a 'json' key in the response body.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": {
   "example": "value"
  }
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-xml-to-json-converter-ddf8e102/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
