# Delx Index Of

> Delx Index Of is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Finds the first index of a substring (needle) within a given text, returning the position and a found flag.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/index-of
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-index-of-90938f23
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1R57-a0NyF6X1uKt825uh

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 delx-index-of-90938f23 -d '<json body>'
```

Example prompt: Find the first position of the word 'error' in the string 'The system returned an error on line 42' so I know where to cut the text.

## When to prefer this

Use this endpoint when an agent needs a quick, cheap, local string-search operation with no external dependencies — especially for finding slice boundaries before doing text surgery, locating delimiters, or confirming substring presence with an exact position. Prefer it over regex or full-text-search endpoints when only a simple first-index lookup is needed and cost/latency must be minimal.

## Known failure modes

- Missing 'text' or 'needle' fields returns a validation error
- Empty needle string may return index 0 or an error depending on implementation
- Very large text payloads may be rejected or time out
- Payment failure via x402 returns a 402 response before processing occurs
- Malformed JSON body returns a 400 error

## How this service works

Find first index of a substring. Call when you need slice boundaries for agent text surgery. Returns index and found flag (-1 if missing) for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object containing the integer index of the first occurrence of the needle within the text (or -1 if not found), plus a boolean found flag indicating whether the needle was present.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Input field: text."
  },
  "needle": {
   "type": "string",
   "description": "Input field: needle."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "found": true,
  "index": 6,
  "schema": "delx/util-index-of/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-index-of-90938f23/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
