{"uid":"cap_5kOH5dKc6weP7xSf6UWyt","slug":"one-engine-array-unique-6eaf1f1d","name":"ONE Engine Array Unique","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/array/unique?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"array","description":"JSON array, maximum 1000 items"}}},"responseSchema":{"type":"json","example":{"count":3,"values":[1,2,3]}},"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_yPzUDIn3Zx6oQ3COH9x66","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 duplicate values from a JSON array, returning only the unique elements and their count.","exampleAgentPrompt":"Can you deduplicate this list for me and tell me how many unique values there are? The array is [1, 2, 2, 3, 3, 3, 4].","exampleUseCases":[{"title":"Deduplicating pipeline output tags","prompt":"I have a list of tags generated by my pipeline and there are a bunch of repeats — can you remove the duplicates and tell me how many unique tags I actually have? Here's the array: [\"ai\",\"ml\",\"ai\",\"data\",\"ml\",\"nlp\"]."},{"title":"Counting distinct user IDs","prompt":"I've got an array of user IDs from our event log and need to know how many unique users showed up. Can you deduplicate this list: [101, 202, 101, 303, 202, 404]?"},{"title":"Cleaning up scraped category list","prompt":"I scraped a list of product categories from several pages and there are loads of duplicates. Can you give me just the unique categories from this array: [\"electronics\",\"clothing\",\"electronics\",\"furniture\",\"clothing\",\"toys\"]?"}],"resultDescription":"Returns a JSON object with two fields: 'count' (integer, the number of unique values) and 'values' (array containing only the distinct elements from the input, with duplicates removed).","failureModes":["Array exceeds 1000-item limit — request rejected","Malformed or non-array input in 'values' field — validation error","Payment failure via x402 — 402 response before processing begins","Empty array input — returns count 0 and empty values array"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call deduplication operation on arrays of up to 1000 items within an autonomous agent workflow on Base. It is ideal for pipelines where spinning up custom code is impractical and where a frictionless $0.001 USDC micro-payment via x402 is preferable to managing a full data processing service. Best for simple scalar or mixed-type arrays rather than complex object deduplication.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:55.868Z","isFirstParty":false,"canonicalSlug":"one-engine-array-unique-55684075"}