{"uid":"cap_2YYmKEPmz6nt8Jh46Bgvk","slug":"one-engine-array-index-of-fd8b9028","name":"ONE Engine Array Index-Of","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/index-of?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{},"values":{"type":"array"}}},"responseSchema":{"type":"json","example":{"found":true,"index":1}},"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_f5D-6KcReZ1Pm2gzvSsvS","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":"Finds the index of a given value within an array, returning whether it was found and at what position.","exampleAgentPrompt":"Search this array [\"apple\", \"banana\", \"cherry\", \"date\"] for the value \"cherry\" and tell me its index position.","exampleUseCases":[{"title":"Membership lookup in a list","prompt":"I have a list of approved user IDs like [\"u001\", \"u002\", \"u003\", \"u004\"] — check if \"u003\" is in there and tell me where it appears."},{"title":"Finding rank in a sorted leaderboard","prompt":"Here's my leaderboard array [\"Alice\", \"Bob\", \"Carol\", \"Dave\"] — what position is \"Carol\" at?"},{"title":"Validating enum membership","prompt":"I need to know if \"medium\" is a valid option in my sizes array [\"small\", \"medium\", \"large\", \"xlarge\"] and what index it falls at."}],"resultDescription":"Returns a JSON object with a boolean 'found' field indicating whether the value was present in the array, and an 'index' integer field indicating the zero-based position of the first match (e.g. {\"found\": true, \"index\": 1}).","failureModes":["Missing 'values' array returns an error or unexpected result","Non-comparable types (e.g. object vs primitive) may not match as expected","Payment failure via x402 if insufficient USDC balance on Base","Network timeout on Cloudflare Worker edge"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a lightweight, pay-per-call array search operation without spinning up its own compute. Ideal for agents that occasionally need to locate an element in a list and want a simple, cheap utility call rather than embedding array logic in the agent itself. Best for small-to-medium arrays where a real-time lookup costing $0.001 USDC is acceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:30.751Z","isFirstParty":false,"canonicalSlug":"one-engine-array-index-of-fd8b9028"}