# ONE Engine Array Index-Of

> ONE Engine Array Index-Of is a paid API for AI agents from one-search.one-engine.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Finds the index of a given value within an array, returning whether it was found and at what position.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/array/index-of?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/one-engine-array-index-of-fd8b9028
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2YYmKEPmz6nt8Jh46Bgvk

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability one-engine-array-index-of-fd8b9028 -d '<json body>'
```

Example prompt: Search this array ["apple", "banana", "cherry", "date"] for the value "cherry" and tell me its index position.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.

## Output

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}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {},
  "values": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "found": true,
  "index": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/one-engine-array-index-of-fd8b9028/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from one-search.one-engine.workers.dev](https://www.zero.xyz/host/one-search.one-engine.workers.dev/llms.txt)
