# Swift Bot Labs Toolbox – JSON to CSV Converter

> Swift Bot Labs Toolbox – JSON to CSV Converter is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Converts a JSON array of objects into a CSV string, with optional nested-key flattening and configurable delimiter, paid per-call via x402/USDC.

## Facts

- Endpoint: POST https://x402-toolbox.swiftbotlab.workers.dev/v1/json/to-csv?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-json-to-csv-converter-041b4e11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wC6K_dl6PeoBe4d_VizeG

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 swift-bot-labs-toolbox-json-to-csv-converter-041b4e11 -d '<json body>'
```

Example prompt: Convert this JSON array into a CSV using a comma delimiter and flatten any nested keys — the data is [{"id":1,"user":{"name":"Ann"},"tags":[]},{"id":2,"user":{"name":"Bo"},"tags":["x"]}].

## When to prefer this

Choose this endpoint when you need a quick, serverless, no-account JSON-to-CSV conversion with optional nested-key flattening and configurable delimiters, and you want to pay per call in USDC without API key management. Prefer it over custom code or heavyweight ETL services for simple one-off or agent-driven tabular export tasks.

## Known failure modes

- Input is not a valid JSON array of objects — returns error
- JSON string cannot be parsed — returns parse error
- Unsupported delimiter value — returns validation error
- Payment not included or insufficient USDC — returns 402 Payment Required
- Empty array input — may return headers-only CSV with zero rows

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok:true, the tool name, and a result object containing: the full CSV string (with headers and rows, RFC 4180-compliant quoting), the number of data rows, and an array of column names (using dot-notation for flattened nested keys).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Array of objects (a JSON value, or a string containing JSON)"
  },
  "flatten": {
   "type": "boolean",
   "default": true
  },
  "delimiter": {
   "enum": [
    ",",
    ";",
    "\t",
    "|"
   ],
   "type": "string",
   "default": ","
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "json-to-csv",
  "result": {
   "csv": "id,user.name,tags\r\n1,Ann,\r\n2,Bo,\"[\"\"x\"\"]\"\r\n",
   "rows": 2,
   "columns": [
    "id",
    "user.name",
    "tags"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-json-to-csv-converter-041b4e11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
