{"uid":"cap_4uamOBaBlcy1LhONjV4xc","slug":"json-format-pretty-print-api-9d7071bf","name":"JSON Format / Pretty-Print API","description":"Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.","url":"https://lin-desk-x402.lindesk.workers.dev/v1/dataformat/json_format?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"Payload text (CSV/JSON/YAML/XML); max 100 KiB"},"indent":{"type":"string","pattern":"^-?\\d+$","description":"Indent; 0 = minify (default 2)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"op":{"type":"string"},"cols":{"type":"array"},"rows":{"type":"integer"},"valid":{"type":"boolean"},"errors":{"type":"array"},"result":{},"encoding":{"type":"string"},"elapsed_ms":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"op":"json_format","mode":"pretty","result":"{\n  \"b\": 1,\n  \"a\": [\n    1,\n    2\n  ]\n}","elapsed_ms":0}},"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_F0PXthT5WLJWX6_mSDVTI","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":"Formats, minifies, or pretty-prints JSON, CSV, YAML, or XML payload text into clean JSON output","exampleAgentPrompt":"Can you pretty-print this JSON for me with 2-space indentation so it's easier to read: {\"b\":1,\"a\":[1,2]}?","exampleUseCases":[{"title":"Pretty-print API response for debugging","prompt":"I just got this raw JSON back from an API and it's all on one line — can you format it with 4-space indentation so I can read it properly: {\"user\":{\"id\":123,\"name\":\"Alice\",\"roles\":[\"admin\",\"editor\"]}}?"},{"title":"Minify JSON for production payload","prompt":"Take this nicely formatted JSON and minify it into a single line for me so I can embed it in a request body: {\n  \"key\": \"value\",\n  \"count\": 42\n}"},{"title":"Convert CSV data to formatted JSON","prompt":"I have this CSV data and I need it converted to clean, indented JSON with 2-space indent: name,age\nAlice,30\nBob,25"}],"resultDescription":"Returns a JSON object containing the operation name ('json_format'), the formatted result string (pretty-printed or minified JSON), and elapsed processing time in milliseconds. The result field holds the reformatted text output.","failureModes":["Input payload exceeds 100 KiB limit — request rejected","Malformed or unparseable input text — errors array returned with validation details","Invalid indent parameter (non-integer string) — may return error or default behavior","Unsupported input format — conversion may fail with error details"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call (no API key) JSON/data formatting or conversion utility, especially in agentic pipelines that already use x402 micropayment infrastructure on Base. Ideal for formatting debug output, normalizing API responses, or converting CSV/YAML/XML to JSON on demand without setting up a dedicated service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:39:02.183Z","isFirstParty":false,"canonicalSlug":"json-format-pretty-print-api-9d7071bf"}