{"uid":"cap_RTDD0W1abWRdOLlS5HzE-","slug":"delx-commerce-json-empty-prune-de161d4b","name":"Delx Commerce — JSON Empty Prune","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/json-empty-prune?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"object":{"type":"object","description":"Object supplied to JSON Empty Prune; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true}}},"responseSchema":{"type":"json","example":{"result":{"object":{"d":1},"removed_keys":["a","b","c"]},"schema":"delx/util-json-empty-prune/v1","status":"pass","evidence":{"retained":false,"input_sha256":"f9cf0bb18905a0dc7f01e28106ee0e0ef53cb457dc27e0691f35144835ca7c57","external_calls":0},"operation":"data_batch:json_empty_prune"}},"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_OWhll91dzes8F8wMDjy0q","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":"Removes keys with empty or null values from a JSON object and returns the pruned result with evidence of what was removed.","exampleAgentPrompt":"Can you clean up this JSON object by removing all the empty and null keys from it? Here it is: {\"name\":\"Alice\",\"age\":null,\"email\":\"\",\"city\":\"New York\"}","exampleUseCases":[{"title":"Sanitize API payload before sending","prompt":"I need to clean up this JSON payload before I send it to the partner API — strip out any keys that have null or empty values: {\"order_id\":\"123\",\"notes\":\"\",\"discount\":null,\"amount\":49.99}"},{"title":"Compact noisy LLM output object","prompt":"The LLM returned a JSON object with a bunch of empty fields mixed in. Can you prune all the empty and null keys out of this so I only have the ones that actually have values? Object: {\"title\":\"Report Q1\",\"summary\":\"\",\"tags\":null,\"author\":\"Bob\",\"draft\":false}"},{"title":"Normalize scraped data before storage","prompt":"I scraped some structured data from a webpage and the resulting JSON has lots of empty strings and nulls. Please remove all the empty keys from this object before I store it: {\"product\":\"Widget\",\"sku\":\"W-001\",\"description\":\"\",\"weight\":null,\"price\":12.5}"}],"resultDescription":"Returns a JSON object with the pruned result (object with empty/null keys removed), a list of the removed key names, a status of 'pass', and an evidence block containing whether the input was retained, the SHA-256 hash of the input, and the number of external calls made (always 0).","failureModes":["Input object exceeds 128 properties — rejected with a schema validation error","Malformed JSON body — returns a parse error","Network or payment processing failure — returns a 402 or 5xx error","Object has no empty keys — returns the original object unchanged with an empty removed_keys list"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call, no-signup utility to strip empty and null values from a JSON object in a verifiable, auditable way. It is ideal for agents that need to clean up LLM outputs, API responses, or scraped data on the fly without maintaining infrastructure. The built-in SHA-256 evidence and no-retention guarantee make it suitable for privacy-conscious pipelines. Prefer this over custom preprocessing code when you want deterministic, verifiable pruning with cryptographic proof of what was processed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:41.301Z","isFirstParty":false,"canonicalSlug":"delx-commerce-json-empty-prune-de161d4b"}