# Coinslot JSON↔CSV Converter

> Coinslot JSON↔CSV Converter is a paid API for AI agents from coinslot.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Converts an array of JSON objects to CSV (with nested keys flattened to dot-path column headers) or converts a CSV string back to an array of JSON objects.

## Facts

- Endpoint: POST https://coinslot.dev/api/convert
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coinslot-json-csv-converter-af768c2c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ug2NogvilU2v2YNGT0Brp

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 coinslot-json-csv-converter-af768c2c -d '<json body>'
```

Example prompt: Convert this JSON array to CSV for me — the objects have nested fields like address.city and address.zip, so make sure those become dot-path columns: [{"name":"Alice","address":{"city":"NYC","zip":"10001"}},{"name":"Bob","address":{"city":"LA","zip":"90001"}}].

## When to prefer this

Choose this endpoint when you need a simple, stateless JSON↔CSV conversion that correctly handles nested object keys via dot-path flattening, without setting up a local library or runtime. Ideal for agents processing data pipelines, generating spreadsheet exports from API responses, or ingesting CSV uploads into JSON workflows.

## Known failure modes

- Invalid direction value (not 'json-to-csv' or 'csv-to-json') returns an error
- Malformed JSON array (not an array of objects) causes a parse error
- Malformed CSV string (inconsistent columns, unclosed quotes) causes a parse error
- Empty data input may return an empty result or error
- Deeply nested objects may produce very long dot-path column names

## How this service works

Convert an array of JSON objects to CSV (nested keys become dot-path columns) or CSV back to JSON. POST { direction: 'json-to-csv'|'csv-to-json', data }.

## Output

For json-to-csv: a CSV string where each JSON object becomes a row and nested keys are flattened to dot-path column headers (e.g. address.city). For csv-to-json: an array of JSON objects parsed from the CSV rows, with column headers as keys.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "Array of objects (json-to-csv) or CSV string (csv-to-json)"
  },
  "direction": {
   "enum": [
    "json-to-csv",
    "csv-to-json"
   ],
   "type": "string"
  }
 }
}
```

## More

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