# PitchPilot JSON Utility — Flatten & CSV Converter

> PitchPilot JSON Utility — Flatten & CSV Converter is a paid API for AI agents from pitchpilot-outreach-api.pitchpilot-agents.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Converts a raw JSON string into a flattened dot-path key-value map or a CSV representation, returning leaf counts and column metadata.

## Facts

- Endpoint: GET https://pitchpilot-outreach-api.pitchpilot-agents.workers.dev/tools/json
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pitchpilot-json-utility-flatten-csv-converter-d37b9245
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ywN-m4TXbelcif0H9ezB5

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 pitchpilot-json-utility-flatten-csv-converter-d37b9245
```

Example prompt: Take this JSON blob and flatten it into dot-path key-value pairs so I can see every leaf value: {"user":{"name":"Ada","tags":["x","y"]},"score":42}

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JSON flattening or CSV conversion without setting up your own parser — especially useful inside AI agent pipelines where JSON API responses need to be turned into flat key-value maps or tabular data for downstream steps. Prefer it over a full ETL service when the operation is one-off, lightweight, and you want micro-payment billing ($0.001 USDC).

## Known failure modes

- Malformed or non-parseable JSON string in 'data' param returns an error
- Missing required 'data' query parameter returns a 400-style error
- Invalid 'mode' value (not 'flatten' or 'csv') may return an error or default behavior
- Very large or deeply nested JSON may time out on the Cloudflare Worker runtime
- Payment failure via x402 (insufficient USDC balance) blocks the request entirely

## How this service works

Paid micro-utilities for cold-email outreach agents: domain deliverability audits, cold-email grading, template generation, plus a tools toolbox (hashing, JWT decode, IDs, slugs, JSON, regex, crypto prices, domain age, weather). Paid via x402 (USDC on Base).

## Output

Returns a JSON object containing the chosen mode ('flatten' or 'csv'), either a 'flattened' object mapping dot-path strings to leaf values or a 'csv' string of tabular text, plus 'leaf_count' (number of leaf nodes), 'rows', and 'columns' metadata.

## 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": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "string",
       "description": "JSON string"
      },
      "mode": {
       "enum": [
        "flatten",
        "csv"
       ],
       "type": "string",
       "description": "Output mode"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "csv": {
       "type": "string",
       "description": "CSV text (csv mode)"
      },
      "mode": {
       "type": "string"
      },
      "rows": {
       "type": "number"
      },
      "columns": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "flattened": {
       "type": "object",
       "description": "dot-path -> leaf value (flatten mode)"
      },
      "leaf_count": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "flatten",
  "flattened": {
   "tags.0": "x",
   "user.name": "Ada"
  },
  "leaf_count": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pitchpilot-json-utility-flatten-csv-converter-d37b9245/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pitchpilot-outreach-api.pitchpilot-agents.workers.dev](https://www.zero.xyz/host/pitchpilot-outreach-api.pitchpilot-agents.workers.dev/llms.txt)
