# JSON Array Index By Key

> JSON Array Index By Key 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-15).

Indexes an array of JSON objects by a specified top-level key, returning a keyed map with duplicate detection and counts

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-array-index-by-key
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-array-index-by-key-78c7b360
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z0FDiUW-SvQRFAOQawIQe

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 json-array-index-by-key-78c7b360 -d '<json body>'
```

Example prompt: Index this array of product objects by their 'sku' field and tell me if there are any duplicate SKUs — here's the list: [{"sku":"A1","name":"Widget"},{"sku":"B2","name":"Gadget"},{"sku":"A1","name":"WidgetDupe"}].

## When to prefer this

Use this endpoint when you need to convert a flat JSON array into a keyed lookup map before handing data to a downstream tool that requires a dictionary structure, or when you need to detect and report duplicate keys in a bounded dataset. It is deterministic, stateless, and cheap ($0.001 USDC) making it ideal as a preprocessing step in agentic pipelines. Prefer it over custom agent-side code when you want a versioned, auditable transformation contract rather than an ad-hoc implementation.

## Known failure modes

- Key field not present in all objects — returns error or partial index with missing-key report
- Duplicate items exceeding expected uniqueness — reported in duplicate count but not an error
- Input array exceeds 256 items — request rejected with validation error
- Key string exceeds 8192 characters — rejected with schema validation error
- Malformed JSON body — returns 400-level parse error
- Objects with more than 128 properties — rejected per schema constraint

## How this service works

JSON Array Index By Key: JSON Array Index By Key indexes object rows by a unique top-level key and reports duplicates from bounded caller-supplied values without an external provider. Call JSON Array Index By Key before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Array Index By Key as versioned deterministic JSON. Pri…

## Output

Returns a versioned deterministic JSON object containing: a map of objects keyed by the specified field, duplicate key counts and which entries collided, normalized values, and metadata including a versioned result contract. The transformation is computed in-memory with no data retention.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string",
   "maxLength": 8192,
   "description": "Key supplied to JSON Array Index By Key; used only for this bounded calculation and processed in memory without retention."
  },
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "maxProperties": 128,
    "additionalProperties": true
   },
   "maxItems": 256,
   "description": "Items supplied to JSON Array Index By Key; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "index": {
    "\"a\"": {
     "id": "a",
     "value": 1
    },
    "\"b\"": {
     "id": "b",
     "value": 2
    }
   },
   "duplicate_keys": []
  },
  "schema": "delx/util-json-array-index-by-key/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "3ba5729409fe1785540d75284648b16e6e90027012b970c2a4b84dc9207b7c6b",
   "external_calls": 0
  },
  "operation": "data_batch:json_array_index_by_key"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-array-index-by-key-78c7b360/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)
