# CoCo JSON to CSV Converter

> CoCo JSON to CSV 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 a JSON data string into CSV format, returning the CSV text, row count, and column names.

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/json-to-csv?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-json-to-csv-converter-2a28aa02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HYLsUeD0vq35su5zjHjGU

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-json-to-csv-converter-2a28aa02
```

Example prompt: Can you convert this JSON data into CSV for me? Here's the data: [{"name":"Alice","value":42},{"name":"Bob","value":7}]

## When to prefer this

Choose this endpoint when you need a simple, lightweight, pay-per-call JSON-to-CSV conversion without setting up a local library or running code. Ideal for AI agents in automated pipelines that receive JSON from one tool and need CSV output for another (e.g. spreadsheet uploads, reporting tools, flat-file consumers). Best for flat JSON arrays; not ideal for deeply nested structures.

## Known failure modes

- Malformed or non-array JSON input may produce empty or incorrect output
- Missing 'data' query parameter may result in an error or empty response
- Nested JSON objects may not be flattened correctly — only flat key-value structures are reliably supported
- Very large JSON payloads passed as a query parameter may hit URL length limits

## 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 containing: 'csv' (the full CSV text as a string with headers and rows), 'rows' (integer count of data rows), and 'columns' (array of column name strings derived from the JSON keys).

## 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": {
      "data": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "columns"
     ],
     "properties": {
      "columns": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "csv": "name,value\r\nexample,1\r\n",
  "rows": 1,
  "columns": [
   "name",
   "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-json-to-csv-converter-2a28aa02/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)
