# JSON to CSV Converter

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

Converts a JSON array of objects into CSV format, with optional custom delimiter support

## Facts

- Endpoint: GET https://api.strale.io/x402/json-to-csv
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-3e5f882c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__ZgOvF-2J5oFXLSvXJc4Z

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 api-strale-io-3e5f882c
```

Example prompt: Convert this JSON array to CSV using a semicolon as the delimiter: [{"name":"Alice","age":30,"city":"Paris"},{"name":"Bob","age":25,"city":"Lyon"}]

## When to prefer this

Choose this endpoint when you need a pure, instant, cheap algorithmic conversion of a JSON array of objects to CSV with no external dependencies. Ideal for preparing API response data for spreadsheet download, data pipeline output, or human-readable tabular exports. Prefer this over general-purpose code-execution endpoints when the task is purely JSON-to-CSV formatting.

## Known failure modes

- Input array is empty — may return empty CSV or error
- Array elements have inconsistent keys — missing fields may produce blank columns
- Invalid JSON passed in data param — returns parse error
- Non-array value passed as data — schema validation error
- Unsupported delimiter characters may cause malformed CSV output

## How this service works

Convert a JSON array of objects to CSV format. Supports custom delimiters. Pure algorithmic — instant and cheap.

## Output

A CSV-formatted string with a header row derived from the JSON object keys and one data row per object in the input array, columns separated by the specified delimiter (default: comma).

## Example request

```json
{
 "data": [
  {
   "age": 30,
   "city": "Paris",
   "name": "Alice"
  },
  {
   "age": 25,
   "city": "Lyon",
   "name": "Bob"
  }
 ],
 "delimiter": ";"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "array",
       "description": "Array of objects to convert"
      },
      "delimiter": {
       "type": "string",
       "description": "Column delimiter (default: comma)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-3e5f882c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
