{"uid":"cap_Ug2NogvilU2v2YNGT0Brp","slug":"coinslot-json-csv-converter-af768c2c","name":"Coinslot JSON↔CSV Converter","description":"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 }.","url":"https://coinslot.dev/api/convert","method":"POST","headers":{},"bodySchema":{"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"}}},"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_Qb-S0u8s9sR8VU_2QxlJ-","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 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.","exampleAgentPrompt":"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\"}}].","exampleUseCases":[{"title":"Export database records to spreadsheet","prompt":"I have an array of user records from our database as JSON — each has nested fields like profile.age and profile.location. Can you convert them to CSV so I can open it in Excel? Here's the data: [{\"name\":\"Alice\",\"profile\":{\"age\":30,\"location\":\"NYC\"}},{\"name\":\"Bob\",\"profile\":{\"age\":25,\"location\":\"LA\"}}]"},{"title":"Import CSV file into JSON pipeline","prompt":"I've got a CSV string from a data export and I need it as a JSON array so I can process it in my app. Can you convert this CSV to JSON for me? The CSV is: \"name,age,city\\nAlice,30,NYC\\nBob,25,LA\""},{"title":"Flatten nested API response for reporting","prompt":"I'm getting back a JSON array from an API where each object has nested keys like metrics.clicks and metrics.views. Convert it to CSV with dot-path column names so I can drop it into our reporting tool: [{\"campaign\":\"summer\",\"metrics\":{\"clicks\":500,\"views\":2000}},{\"campaign\":\"winter\",\"metrics\":{\"clicks\":300,\"views\":1500}}]"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:40:29.164Z","isFirstParty":false}