{"uid":"cap_nqeSbF28BQQ6uLSeYMeKO","slug":"one-engine-array-frequency-analysis-6ef87e36","name":"ONE Engine Array Frequency Analysis","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/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_7N5NXWGSR7dQIeKECmakQ","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 frequency distribution of elements in a JSON array, optionally comparing against a second array or windowed with size/offset parameters.","exampleAgentPrompt":"Count how many times each value appears in this array and give me the frequency distribution: [\"apple\", \"banana\", \"apple\", \"cherry\", \"banana\", \"apple\"].","exampleUseCases":[{"title":"Survey response tallying","prompt":"I have a list of survey responses from 500 users and need to know how often each answer option was chosen — can you run a frequency count on this array of responses?"},{"title":"Log error code analysis","prompt":"Here's an array of error codes from our server logs this week. Count how frequently each error code appears so I can see which ones are most common."},{"title":"A/B test variant comparison","prompt":"Compare the frequency of outcomes in group A versus group B — here are two arrays of result labels, one per test group. Tell me how the distribution differs between them."}],"resultDescription":"Returns an object containing frequency counts for each unique element in the input array, showing how many times each value appears. When an optional comparison array is provided, the response includes frequency data for both arrays enabling side-by-side comparison. Window parameters (size, offset) allow frequency analysis over a subset of the array.","failureModes":["Array exceeds 1000 items — request rejected with validation error","Missing required 'values' field — returns 400 bad request","Non-array value passed for 'values' — schema validation failure","Payment not provided or insufficient — 402 Payment Required response","Invalid offset or size causing out-of-bounds window — may return empty or partial result"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call frequency distribution over a JSON array without standing up your own data pipeline or statistical library. Particularly useful for autonomous agents that encounter array data dynamically and need quick occurrence counts at low cost ($0.01 USDC). Prefer this over full analytics platforms when the dataset is small (≤1000 items) and you want a serverless, no-auth-setup computation via x402 micropayments on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:05.192Z","isFirstParty":false,"canonicalSlug":"one-engine-array-frequency-analysis-06a367a0"}