{"uid":"cap_BMlPVf5oTlc4lBn64yI6m","slug":"delx-commerce-array-compact-utility-9ac75cd9","name":"Delx Commerce — Array Compact Utility","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/arr-compact?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"count":2,"items":[1,2],"schema":"delx/util-arr-compact/v1","removed":4}},"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_4xCWSbdrN-nQY-KQZTz8x","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 falsy/null/empty values from an input array and returns a compacted version with a count of removed items","exampleAgentPrompt":"Clean up this array by removing all null, false, and empty values: [1, null, 2, false, '', 3, undefined, 4] — I just want the non-empty items back with a count of how many were removed.","exampleUseCases":[{"title":"Pipeline data cleaning before storage","prompt":"I have an array coming out of my scraper that has nulls and empty strings mixed in: [42, null, 'hello', false, 99, '', 7] — can you compact it and tell me how many junk values got stripped?"},{"title":"Sanitizing user-submitted tag lists","prompt":"Users submitted a tag list that has empty entries and false values in it: ['travel', null, 'food', '', false, 'tech'] — clean it up so I only have the real tags left."},{"title":"Preparing numeric data for calculation","prompt":"Before I run stats on this dataset, I need to remove all the null and falsy placeholders from this array: [10, 0, null, 55, false, 22, null, 8] — give me just the valid numbers and tell me how many were removed."}],"resultDescription":"Returns a JSON object with the compacted array (items), the count of remaining items (count), the number of removed items (removed), and a schema identifier string (schema: 'delx/util-arr-compact/v1').","failureModes":["Missing or non-array 'items' field returns a 400 error","Payment not provided or insufficient USDC results in a 402 Payment Required response","Malformed JSON body causes parsing error","Empty input array returns count:0 and removed:0 with an empty items array"],"whenToPreferThis":"Choose this endpoint when you need a simple, pay-per-use, no-signup utility to strip falsy/null/empty values from an array and get back a clean list with removal metrics. Ideal for agent pipelines where lightweight, verifiable, metered utility calls are preferred over standing subscriptions or self-hosted logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:59.431Z","isFirstParty":false,"canonicalSlug":"delx-commerce-array-compact-utility-9ac75cd9"}