{"uid":"cap_saGtRVOH5K1nsXo1EgEvB","slug":"json-array-to-csv-converter-f8e7b30f","name":"JSON Array to CSV Converter","description":"Writes a JSON array of flat objects as CSV, with a header of every key.","url":"https://centralcity.ai/api/public/x402/off_mkdyxiovyajmhexm?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"A JSON array of objects whose values are text, numbers, true, false or null, at most 64 KiB."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Dlw_BnymGbbJYDk1xoxXD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","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 flat objects into a CSV string with a header row containing every key.","exampleAgentPrompt":"Can you convert this JSON array into a CSV? Here's the data: [{\"name\":\"Alice\",\"age\":30,\"city\":\"New York\"},{\"name\":\"Bob\",\"age\":25,\"city\":\"London\"}]","exampleUseCases":[{"title":"Export API data for spreadsheet","prompt":"I pulled a list of products from our API as a JSON array — can you convert it to CSV so I can open it in Excel? Here's the JSON: [{\"id\":1,\"name\":\"Widget A\",\"price\":9.99,\"stock\":42},{\"id\":2,\"name\":\"Widget B\",\"price\":14.99,\"stock\":7}]"},{"title":"Prepare data report for stakeholders","prompt":"Turn this JSON array of monthly sales records into a CSV file with headers so I can share it with the finance team: [{\"month\":\"Jan\",\"revenue\":12000,\"units\":300},{\"month\":\"Feb\",\"revenue\":15000,\"units\":375}]"},{"title":"Log flattening for data pipeline","prompt":"I have a JSON array of log entries that I need as CSV for ingestion into our analytics tool — can you convert them? The data is: [{\"timestamp\":\"2024-01-01T00:00:00Z\",\"level\":\"INFO\",\"message\":\"Server started\"},{\"timestamp\":\"2024-01-01T00:01:00Z\",\"level\":\"ERROR\",\"message\":\"Disk full\"}]"}],"resultDescription":"A CSV-formatted string where the first row is a header containing all keys found across the objects, and subsequent rows contain the corresponding values for each object in the input array. All keys are included, with empty cells for missing values.","failureModes":["Input JSON is not an array — returns an error indicating expected array format","JSON array contains nested objects or arrays as values — not supported, as only flat values (text, numbers, booleans, null) are accepted","Input exceeds 64 KiB size limit — returns a size or payload error","Malformed JSON string — returns a parse error","Empty array input — may return only a header row or an empty response"],"whenToPreferThis":"Use this endpoint when you have a flat JSON array of objects that need to be serialized into CSV format quickly and reliably, especially when you need headers auto-detected from all keys. It handles mixed-key objects gracefully. Prefer this over manual CSV construction when dealing with dynamic schemas where keys may vary between objects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:10.873Z","isFirstParty":false,"canonicalSlug":"json-array-to-csv-converter-5da03b19"}