{"uid":"cap_ywN-m4TXbelcif0H9ezB5","slug":"pitchpilot-json-utility-flatten-csv-converter-d37b9245","name":"PitchPilot JSON Utility — Flatten & CSV Converter","description":"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).","url":"https://pitchpilot-outreach-api.pitchpilot-agents.workers.dev/tools/json","method":"GET","headers":{},"bodySchema":{"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"}}}}}}},"responseSchema":{"type":"json","example":{"mode":"flatten","flattened":{"tags.0":"x","user.name":"Ada"},"leaf_count":2}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vA6rIyuCk5omNSFebXb1P","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a raw JSON string into a flattened dot-path key-value map or a CSV representation, returning leaf counts and column metadata.","exampleAgentPrompt":"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}","exampleUseCases":[{"title":"Flatten nested API response for inspection","prompt":"I got this deeply nested JSON back from an API — can you flatten it into dot-path keys so I can see every leaf value at a glance? Here's the JSON: {\"order\":{\"id\":\"abc123\",\"customer\":{\"name\":\"Jane\",\"email\":\"jane@example.com\"},\"items\":[{\"sku\":\"X1\",\"qty\":2}]}}"},{"title":"Convert config JSON to CSV for spreadsheet","prompt":"Convert this JSON array of user records into CSV so I can drop it into a spreadsheet: [{\"name\":\"Alice\",\"role\":\"admin\",\"active\":true},{\"name\":\"Bob\",\"role\":\"viewer\",\"active\":false}] — use csv mode please."},{"title":"Count leaf nodes in a complex JSON payload","prompt":"How many leaf-level values are in this JSON object? I want a flat view and a count: {\"company\":{\"name\":\"Acme\",\"address\":{\"city\":\"NYC\",\"zip\":\"10001\"},\"founded\":1990}}"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:37:27.125Z","isFirstParty":false}