{"uid":"cap_N4cUaLiDSaQdpH5-cTGro","slug":"one-engine-array-difference-661cb002","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/t2?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.0007","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.0007/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_F4-P1z2YrG_tUIP4MeYxM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0007","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 first array but not in the second.","exampleAgentPrompt":"Find all the elements in [1, 2, 3, 4, 5] that are NOT in [3, 4, 5, 6, 7] — I need the array difference between those two lists.","exampleUseCases":[{"title":"Deduplicating new items from existing inventory","prompt":"I have a list of incoming product IDs [101, 102, 103, 104, 105] and my existing inventory already contains [103, 104]. Which product IDs are new and not yet in inventory?"},{"title":"Finding unprocessed records in a pipeline","prompt":"I have a batch of user IDs [200, 201, 202, 203, 204, 205] and the ones already processed are [201, 203, 205]. Which user IDs still need to be processed?"},{"title":"Comparing permission sets for access control","prompt":"I have a list of required permissions ['read', 'write', 'delete', 'admin'] and a user has ['read', 'write']. What permissions does the user still lack?"}],"resultDescription":"Returns a JSON object containing the array of elements that are present in the primary `values` array but absent from the `other` comparison array, effectively the set difference A minus B. May include metadata about the result size or offset if those parameters were provided.","failureModes":["Input array exceeds 1000 items — request rejected with validation error","Missing required `values` field — returns 400-level error","Payment not provided or insufficient — returns HTTP 402 requiring x402 USDC payment on Base","Malformed JSON array input — parse error returned","Network timeout on Cloudflare Workers edge — intermittent 5xx error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call set difference computation without spinning up local code, especially in autonomous agent pipelines running on Base that already use x402 micropayments. Ideal for quick one-off array diff operations on up to 1000 items where cost-per-call at $0.0007 USDC is acceptable. Prefer over custom code when the agent environment lacks a local runtime or when consistency and stateless execution are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:26.673Z","isFirstParty":false,"canonicalSlug":"one-engine-array-difference-777bd7ed"}