# JSON Array to CSV Converter

> JSON Array to CSV Converter is a paid API for AI agents from centralcity.ai, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-19).

Converts a JSON array of flat objects into a CSV string with a header row containing every key.

## Facts

- Endpoint: POST https://centralcity.ai/api/public/x402/off_mkdyxiovyajmhexm?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-array-to-csv-converter-f8e7b30f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_saGtRVOH5K1nsXo1EgEvB

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 json-array-to-csv-converter-f8e7b30f -d '<json body>'
```

Example prompt: Can you convert this JSON array into a CSV? Here's the data: [{"name":"Alice","age":30,"city":"New York"},{"name":"Bob","age":25,"city":"London"}]

## When to prefer this

Use this endpoint when you have a flat JSON array of objects that need to be serialized into CSV format quickly and reliably, especially when you need headers auto-detected from all keys. It handles mixed-key objects gracefully. Prefer this over manual CSV construction when dealing with dynamic schemas where keys may vary between objects.

## Known failure modes

- Input JSON is not an array — returns an error indicating expected array format
- JSON array contains nested objects or arrays as values — not supported, as only flat values (text, numbers, booleans, null) are accepted
- Input exceeds 64 KiB size limit — returns a size or payload error
- Malformed JSON string — returns a parse error
- Empty array input — may return only a header row or an empty response

## How this service works

Writes a JSON array of flat objects as CSV, with a header of every key.

## Output

A CSV-formatted string where the first row is a header containing all keys found across the objects, and subsequent rows contain the corresponding values for each object in the input array. All keys are included, with empty cells for missing values.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "A JSON array of objects whose values are text, numbers, true, false or null, at most 64 KiB."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-array-to-csv-converter-f8e7b30f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from centralcity.ai](https://www.zero.xyz/host/centralcity.ai/llms.txt)
