# CSV to JSON / JSON to CSV Bidirectional Converter

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

Converts CSV data to JSON or JSON data to CSV, using the first row of CSV as headers

## Facts

- Endpoint: GET https://api.x402node.dev/convert/csv-json
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-9883499e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FyCvVwv0UPN2ccXl0EXpf

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-x402node-dev-9883499e
```

Example prompt: Convert this CSV data to JSON for me — the first row has headers: 'name,age,city\nAlice,30,New York\nBob,25,London'

## When to prefer this

Use this endpoint when you need a simple, stateless, bidirectional conversion between CSV and JSON with automatic header detection. Ideal for data pipeline preprocessing, exporting structured data to spreadsheet-friendly format, or importing CSV uploads into JSON-based systems. Prefer this over manual parsing when you need a reliable, consistent column-to-key mapping via the first-row header convention.

## Known failure modes

- Malformed CSV input with inconsistent column counts may return an error or produce misaligned JSON keys
- Invalid JSON input that is not an array of objects may fail to convert to CSV
- Empty input returns an error or zero-row result
- Ambiguous direction (neither valid CSV nor valid JSON) may result in a parse failure response

## How this service works

CSV to JSON, JSON to CSV, csv parser, csv to json converter, json to csv array, tabular data converter, spreadsheet to json, comma separated values parser, data transform. Bidirectional convert between CSV and JSON. CSV first row used as headers. Accepts payment on Base or Solana — either network works.

## Output

Returns an object with a 'result' field containing the converted string (JSON or CSV), a 'rowCount' integer indicating how many data rows were processed, and 'to'/'from' fields indicating the conversion direction performed.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "content"
     ],
     "properties": {
      "from": {
       "type": "string",
       "description": "Source format (optional)"
      },
      "content": {
       "type": "string",
       "description": "Content body (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-9883499e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
