{"uid":"cap_KFsLpKNAu12qrso35cXb2","slug":"one-engine-array-frequency-counter-8384bd0e","name":"ONE Engine Array Frequency Counter","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/frequency/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_jwOeAgikegE3WXzWftcEI","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 frequency (occurrence count) of each element in a JSON array, optionally comparing against a second array or applying an offset.","exampleAgentPrompt":"Count how many times each value appears in this array: [\"apple\",\"banana\",\"apple\",\"cherry\",\"banana\",\"apple\"] — give me the full frequency breakdown.","exampleUseCases":[{"title":"Survey response tally","prompt":"I have a list of 500 survey answers like ['yes','no','maybe','yes','yes','no'] — can you count how many times each answer appears so I can see the distribution?"},{"title":"Duplicate detection in logs","prompt":"Here's an array of error codes from our logs: ['E404','E500','E404','E403','E500','E500'] — tell me how frequently each error code occurs so I know which ones to prioritize."},{"title":"Two-array frequency comparison","prompt":"Compare the frequency of values in my baseline array [1,2,2,3,3,3] against a new sample array [1,1,2,3,3] and show me how the counts differ between the two."}],"resultDescription":"A JSON object mapping each unique element in the input array to its occurrence count, potentially including comparison deltas if a second array is provided. The response may include a frequency map, ranked list, or histogram-style breakdown depending on request parameters.","failureModes":["Array exceeds 1000-item limit — request rejected with validation error","Malformed or non-array values input — schema validation failure","Payment not included or insufficient — 402 Payment Required response","Empty array input — may return empty frequency map or error","Network timeout on large arrays near the size limit"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, pay-per-call frequency count or value tally on an array of up to 1000 items, especially in autonomous agent workflows using x402 micropayments on Base. Prefer it over general-purpose code execution when you want a lightweight, no-infrastructure utility call without spinning up compute.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:45.505Z","isFirstParty":false,"canonicalSlug":"one-engine-array-frequency-counter-8384bd0e"}