# Delx Commerce — JSON Array Index By Key

> Delx Commerce — JSON Array Index By Key is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Indexes an array of JSON objects by a specified key field, returning a dictionary keyed by each object's key value, with duplicate key detection.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-array-index-by-key?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-json-array-index-by-key-f513eee7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R6KvL2L2Myy_AV1-_oAtz

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

Example prompt: I have a list of product objects like [{"id":"a","value":1},{"id":"b","value":2}] — index them by the 'id' field so I can do fast lookups by product ID.

## When to prefer this

Choose this endpoint when you need a fast, verifiable, pay-per-call utility to convert a JSON array into a key-indexed dictionary without setting up any account or SDK. It is ideal for AI agents that need deterministic data restructuring with cryptographic evidence of processing (SHA-256 input hash, no-retention confirmation), priced at a fixed $0.001 USDC per call on Base or Solana. Prefer it over writing custom indexing logic inline when auditability or reproducibility of the transformation matters.

## Known failure modes

- Key field not present in one or more objects — missing keys may be omitted from index or cause an error
- Array exceeds 256 items — request rejected
- Object exceeds 128 properties — request rejected
- Key string exceeds 8192 characters — rejected
- Payment not included or insufficient USDC — 402 response blocking execution
- Malformed JSON input — parsing error returned

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with an 'index' property containing the key-indexed dictionary (each unique key maps to its corresponding object), a 'duplicate_keys' array listing any keys that appeared more than once, a status field ('pass'), evidence metadata including input SHA-256 hash and a flag confirming no data retention, and an operation identifier.

## 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/delx-commerce-json-array-index-by-key-f513eee7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
