{"uid":"cap_yS2oUTinahQIVcU2viWtv","slug":"delx-commerce-list-length-utility-af083bcf","name":"Delx Commerce — List Length 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/list-len?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"ok":true,"empty":false,"length":3,"sample":["a","b","c"],"schema":"delx/util-list-len/v1"}},"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_3iHVE7hzcIhLsmqIni3JQ","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":"Returns the length and a sample of an array, plus whether it is empty, for a given list of items.","exampleAgentPrompt":"Can you check how many items are in this list — [\"apple\", \"banana\", \"cherry\"] — and tell me if it's empty or not, plus show me a quick sample?","exampleUseCases":[{"title":"Pre-processing array size check","prompt":"Before I send this batch of 50 product IDs to the next step, can you count how many are in the list and confirm it's not empty?"},{"title":"Debugging empty API response","prompt":"I got back a list from the search API — can you tell me how long it is and whether it's empty, and show me the first few items?"},{"title":"Validating user-submitted tag list","prompt":"A user submitted these tags: [\"urgent\", \"billing\", \"refund\"] — can you count them and give me a sample so I can verify the input looks right?"}],"resultDescription":"Returns a JSON object with: 'ok' (boolean success flag), 'empty' (whether the list has zero items), 'length' (integer count of items), 'sample' (first few elements from the list), and 'schema' (a versioned schema identifier 'delx/util-list-len/v1').","failureModes":["Missing or non-array 'items' field returns an error response","Empty or malformed JSON body may cause a 400-level error","Payment failure via x402 protocol prevents execution","Extremely large arrays may hit size limits"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call way to count and inspect an array without setting up any account or subscription. It is ideal for agent pipelines that need to gate downstream steps on list size or emptiness, and when verifiable, on-chain payment via USDC (Base or Solana) is preferred over API-key billing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:00.404Z","isFirstParty":false,"canonicalSlug":"delx-commerce-list-length-utility-af083bcf"}