{"uid":"cap_iti_bY_6HYwhO0f_tKnyB","slug":"one-engine-array-difference-379d89dd","name":"ONE Engine Array Difference","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/array/difference/t8?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["values"],"properties":{"size":{"type":"integer"},"other":{"type":"array","description":"Optional comparison array"},"offset":{"type":"integer"},"values":{"type":"array","description":"JSON array with at most 1000 items"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0__17vn2iCzMeE7Z45PrA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the difference between two arrays, returning elements present in the input array but not in the comparison array.","exampleAgentPrompt":"I have two lists of user IDs — [101, 202, 303, 404] and [202, 404] — can you compute the difference and give me back only the IDs from the first list that don't appear in the second?","exampleUseCases":[{"title":"Filtering sold-out inventory items","prompt":"I have a list of all product SKUs we stock — [SKU001, SKU002, SKU003, SKU004, SKU005] — and a list of ones that sold out today — [SKU002, SKU004]. Can you compute the difference so I only see the SKUs still available?"},{"title":"Identifying new subscribers since last sync","prompt":"Here are all current subscribers: [alice@ex.com, bob@ex.com, carol@ex.com, dave@ex.com]. My last export had [alice@ex.com, dave@ex.com]. Give me the difference — who's new since then?"},{"title":"Removing processed task IDs from a queue","prompt":"My task queue has IDs [1001, 1002, 1003, 1004, 1005] and these have already been processed: [1002, 1005]. Can you run array difference to give me just the unprocessed ones?"}],"resultDescription":"Returns a JSON object containing the array of elements that are present in the `values` input array but absent from the `other` comparison array, effectively the set difference A minus B. Supports optional pagination via `size` and `offset` parameters.","failureModes":["Input array exceeds 1000 items — rejected with validation error","Missing required `values` field — returns 400-level error","Payment not included or insufficient — returns HTTP 402 requiring x402 payment on Base","Malformed JSON body — parse error response","Network timeout on Cloudflare Worker edge"],"whenToPreferThis":"Use this endpoint when you need a quick, cheap ($0.01 USDC), pay-per-call array difference computation without standing up your own infrastructure. Ideal for autonomous agents that occasionally need set subtraction on moderate-sized arrays (up to 1000 items) as part of a larger workflow, without needing a full database or compute environment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:59.408Z","isFirstParty":false,"canonicalSlug":"one-engine-array-difference-777bd7ed"}