# CSV to JSON Converter

> CSV to JSON Converter is a paid API for AI agents from tools.orchardshop.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-19).

Converts raw CSV data (with headers) into a structured JSON array of row objects, along with column names and row count

## Facts

- Endpoint: POST https://tools.orchardshop.xyz/t/csv-to-json?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-to-json-converter-d787aa61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GKsL5tAbVXNQfFcCj62bH

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

Example prompt: Can you convert this CSV data to JSON for me? The first row is headers: 'name,age,city\nAlice,30,"New York"\nBob,25,Chicago'

## When to prefer this

Choose this endpoint when you need a simple, low-cost, one-shot CSV-to-JSON conversion without setting up a local parser — especially useful for handling edge cases like quoted fields containing commas, embedded newlines, and escaped quotes that would trip up naive string-splitting approaches. Ideal for agents automating data pipelines, ETL steps, or one-off transformations where spinning up a full data-processing library is overkill.

## Known failure modes

- Malformed CSV with unclosed quotes may produce incorrect parsing or an error response
- Missing or empty first row (headers) may result in empty column names or an error
- Sending non-CSV binary or non-text content as the body may return a parsing error
- Very large CSV payloads may time out or be rejected due to request size limits
- Network errors or service unavailability return non-200 HTTP status codes

## How this service works

Small pay-per-call tools for AI agents. x402, USDC on Base.

## Output

A JSON object containing: a 'rows' array where each element is a key-value object mapping column names to cell values, a 'columns' array listing all header names, and a 'rowCount' integer indicating how many data rows were parsed.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "string",
     "description": "POST / with raw CSV text as the body"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "text"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "age": {
          "type": "string"
         },
         "name": {
          "type": "string"
         }
        }
       }
      },
      "rows": {
       "type": "integer"
      },
      "columns": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "age": "36",
    "name": "Ada"
   },
   {
    "age": "41",
    "name": "Alan"
   }
  ],
  "rows": 2,
  "columns": [
   "name",
   "age"
  ]
 }
}
```

## More

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