{"uid":"cap_5FCUBsYBkNXTSAtH_ZH-7","slug":"json-to-csv-converter-47710e12","name":"JSON to CSV Converter","description":"JSON to CSV. POST an array of objects; the response is a CSV file whose header row is the union of every record's keys in first-seen order, so a record missing a key gets an empty cell instead of a shifted row. One level of nesting flattens to dotted columns (user.id); deeper values and arrays are written as compact JSON in the cell. RFC 4180 quoting.","url":"https://toolshed.lemon-agent.dev/convert/json-csv","method":"POST","headers":{},"bodySchema":{"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","maxLength":262144,"description":"the raw JSON file as the request body, up to 256 KB"},"type":{"type":"string","const":"http"},"method":{"type":"string","const":"POST"},"bodyType":{"type":"string","const":"text"}},"additionalProperties":false},"output":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","const":"text"},"format":{"type":"string","const":"text/csv","description":"the converted CSV file as the response body (text/csv)"},"example":{"type":"string","description":"the sample request body above, converted — what a the converted CSV file as the response body (text/csv) looks like"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_teMhfIwX42IKCuZQJpav7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a JSON array of objects to a well-formed CSV file with dotted-key flattening and RFC 4180 quoting","exampleAgentPrompt":"Convert this JSON array to a CSV file — it has nested fields like user.id and user.email that should become dotted column headers, and any record missing a key should just get an empty cell rather than shifting the row.","exampleUseCases":[{"title":"Export API response data to spreadsheet","prompt":"I've got a JSON array back from our orders API with nested fields like customer.name and customer.email — can you convert it to a CSV so I can open it in Excel?"},{"title":"Flatten analytics events for data pipeline","prompt":"Here's a batch of analytics event objects in JSON, some have nested properties under 'meta' and others don't — convert it to CSV with dotted column headers so I can load it into our data warehouse."},{"title":"Prepare JSON report for non-technical stakeholder","prompt":"I need to share this JSON dataset of survey responses with a colleague who only knows spreadsheets — turn it into a properly quoted CSV file with a clean header row for me."}],"resultDescription":"A plain-text CSV file (text/csv) with a header row built from the union of all record keys in first-seen order. One level of JSON nesting is flattened to dotted column names (e.g. user.id). Deeper nesting and arrays are serialized as compact JSON strings within their cell. Missing keys produce empty cells rather than shifted columns. All values are RFC 4180 quoted as needed.","failureModes":["Input is not a valid JSON array — returns an error indicating invalid JSON","Body exceeds 256 KB limit — request rejected","Input is a JSON object rather than an array — may fail or return unexpected output","Deeply nested structures become unwieldy JSON blobs in cells rather than proper columns","Very wide records with many unique keys produce extremely wide CSV headers"],"whenToPreferThis":"Choose this endpoint when you need reliable tabular export of a JSON array with heterogeneous keys — especially when records have missing or inconsistent fields, since it fills empty cells rather than shifting columns. It handles one level of nesting via dotted headers automatically. Prefer it over generic converters when RFC 4180 quoting compliance and consistent column ordering matter. Part of the toolshed.lemon-agent.dev suite, so it pairs naturally with its YAML-to-CSV and NDJSON endpoints for multi-format pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T00:31:28.250Z","isFirstParty":false}