# agent402.tools JSON to CSV Converter

> agent402.tools JSON to CSV Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Converts a JSON array of objects to CSV format, flattening nested objects into dot-path columns

## Facts

- Endpoint: POST https://agent402.tools/api/json-to-csv
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-json-to-csv-converter-d94102e9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PG39xlqT1WaGY_94c48lq

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 agent402-tools-json-to-csv-converter-d94102e9 -d '<json body>'
```

Example prompt: Convert this JSON array to CSV for me — it has nested objects I need flattened into dot-path columns: [{"name":"Alice","address":{"city":"NYC","zip":"10001"}},{"name":"Bob","address":{"city":"LA","zip":"90001"}}] — use a comma delimiter.

## When to prefer this

Use this endpoint when you have a JSON array of objects — possibly with nested sub-objects — and need a flat CSV representation suitable for spreadsheets or downstream data pipelines, especially when dot-path flattening of nested keys is desired.

## Known failure modes

- Invalid or non-array JSON input returns an error
- Malformed JSON string fails to parse
- Deeply nested or circular references may cause unexpected column naming
- Empty array input returns only headers or an empty response
- Delimiter value not accepted if multi-character or special character

## How this service works

Convert a JSON array of objects to CSV. Nested objects are flattened to dot-path columns.

## Output

Returns a CSV-formatted string with headers derived from the JSON object keys (nested keys expressed as dot-path columns like 'address.city'), and one row per object in the input array.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Array of objects (or a JSON string of one)"
  },
  "delimiter": {
   "type": "string",
   "description": "Default ,"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "csv": "name,role.title\nAda,Engineer\n",
  "rows": 1,
  "columns": 2
 }
}
```

## More

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