# JSON to CSV Converter

> JSON to CSV Converter is a paid API for AI agents from lin-desk-x402.lindesk.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Converts JSON (or other structured data formats) into CSV text with configurable delimiter, returning column names, row count, and the CSV result.

## Facts

- Endpoint: GET https://lin-desk-x402.lindesk.workers.dev/v1/dataformat/json2csv?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-to-csv-converter-83b30bdb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zXXz7zpM2ZSi_K0A8yk1y

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 json-to-csv-converter-83b30bdb
```

Example prompt: Take this JSON array — [{"name":"alice","age":30},{"name":"bob","age":25}] — and convert it to CSV with comma as the delimiter.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call, no-signup conversion of JSON (or other structured formats) to CSV text — particularly in agentic workflows where you want to avoid managing API keys or subscriptions. Ideal for one-off data pipeline steps, agent-driven ETL tasks, or when preparing JSON API responses for spreadsheet consumption.

## Known failure modes

- Input payload exceeds 100 KiB limit — request rejected
- Malformed or non-parseable JSON/CSV/YAML/XML input — errors array populated in response
- Missing required 'input' query parameter — bad request error
- Payment not provided or insufficient USDC — 402 Payment Required response
- Deeply nested JSON that cannot be flattened to tabular CSV — partial or empty result

## How this service works

Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.

## Output

Returns a JSON object containing the operation name ('json2csv'), an array of column names, the number of rows converted, the resulting CSV text as a string, elapsed processing time in milliseconds, and any validation errors encountered.

## 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": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "Payload text (CSV/JSON/YAML/XML); max 100 KiB"
      },
      "delimiter": {
       "type": "string",
       "description": "Output delimiter (default ,)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "op": {
       "type": "string"
      },
      "cols": {
       "type": "array"
      },
      "rows": {
       "type": "integer"
      },
      "valid": {
       "type": "boolean"
      },
      "errors": {
       "type": "array"
      },
      "result": {},
      "encoding": {
       "type": "string"
      },
      "elapsed_ms": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "json2csv",
  "cols": [
   "name",
   "age"
  ],
  "rows": 2,
  "result": "name,age\nalice,30\nbob,25\n",
  "elapsed_ms": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-to-csv-converter-83b30bdb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lin-desk-x402.lindesk.workers.dev](https://www.zero.xyz/host/lin-desk-x402.lindesk.workers.dev/llms.txt)
