{"uid":"cap_xub-hORRgefIzGzGnpogc","slug":"delx-commerce-array-take-first-n-elements-073b8cc5","name":"Delx Commerce — Array Take (First N Elements)","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-take?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","description":"Input field: n."},"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"count":2,"items":[1,2],"schema":"delx/util-arr-take/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_9KmqRXfYp80kc7WnrcyTT","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 first N elements from an input array, paid per-call via USDC on Base or Solana using x402.","exampleAgentPrompt":"Take the first 3 items from this array: [10, 20, 30, 40, 50].","exampleUseCases":[{"title":"Limit search results to top N","prompt":"I have a list of 50 product results — can you grab just the first 5 items from that array for me?"},{"title":"Preview first entries of a dataset","prompt":"Here's a big array of log entries — take the first 10 so I can preview what the data looks like."},{"title":"Paginate agent output slice","prompt":"I've got an array of 200 user records and I only want to process the first 25 right now — can you slice it down to those first 25 items?"}],"resultDescription":"A JSON object containing the count of returned items, the sliced sub-array of the first N elements, and a schema identifier string ('delx/util-arr-take/v1') confirming the response format.","failureModes":["n exceeds array length — may return all items or an error","missing required fields (n or items) — likely a 400 bad request","payment not accepted or insufficient USDC balance — 402 Payment Required","n is zero or negative — returns empty array or validation error","non-integer value for n — schema validation failure"],"whenToPreferThis":"Choose this endpoint when you need a simple, stateless, pay-per-call array head-slice with verifiable on-chain payment via x402 (USDC on Base or Solana), and no signup or API key overhead. Prefer it in agent workflows where billing transparency and micro-payment settlement per operation are required. It is best for lightweight utility operations rather than complex data processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:54.421Z","isFirstParty":false,"canonicalSlug":"delx-commerce-array-take-first-n-elements-073b8cc5"}