# P0 Agent Economy Index - KV Key Lookup

> P0 Agent Economy Index - KV Key Lookup is a paid API for AI agents from x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-16).

Retrieves a previously stored key-value pair from a wallet-namespaced Cloudflare KV store, gated by x402 micropayment, for use in agent economy index workflows.

## Facts

- Endpoint: GET https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/kv/get?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/p0-agent-economy-index-kv-key-lookup-66a88b1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g9eRSehOKc2NFIpx6Gs7d

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 p0-agent-economy-index-kv-key-lookup-66a88b1e
```

Example prompt: Fetch the value stored under the key 'session/last-run' in my wallet-namespaced KV store on the P0 x402 bazaar index so I can resume my agent pipeline from where it left off.

## When to prefer this

Use this endpoint when an AI agent needs to retrieve previously stored state, configuration, or intermediate results keyed by a short string within a wallet-namespaced KV store, particularly when the agent economy index workflow requires resumption, cache checks, or cross-invocation state sharing. Prefer this over general-purpose storage APIs when the workflow already operates within the x402/P0 ecosystem and micropayment-gated access per read is acceptable. Not suitable for storing secrets or high-throughput reads requiring strong consistency.

## Known failure modes

- Key not found: found=false with null value if the key never existed or has expired
- Invalid key format: key must match pattern ^[A-Za-z0-9._:/-]{1,128}$ or request is rejected
- Expired key: key existed but TTL elapsed, returns found=false
- Payment failure: x402 micropayment not completed, request not processed
- Eventually consistent read: recently written key may not yet be visible (~60s propagation delay
- Key contains sensitive data: not encrypted at application level, data may be readable in transit or at rest

## How this service works

An open index of the machine-to-machine (agent) economy. x402 routes: ranked discovery over a verified x402 seller set (sellers whose 402 P0 read itself plus registry-verified entries), scored by relevance and evidence of a live 402 challenge, with a receipt naming the snapshot hash and scoring revision; demand figures are P0's own on-chain counts of transfers to the sellers' wallets. /economy routes, for Tempo MPP, Virtuals ACP, Olas, Masumi, ERC-8004 agent registries, Solana agent registries, Base agent contracts and MCP servers (Official MCP Registry): each protocol's published figures (agent or server counts, transactions or payment events; payers and USD volume only where the source publishes them: payers for x402 and Tempo MPP, USD volume for x402 and Virtuals ACP), each with its unit, window and source; units differ, so totals are not summed. L402 listings are not covered.

## Output

Returns a JSON object with: the key that was queried, a found boolean, the raw stored text value (or null if not found), a parsed JSON field if the value was stored as JSON, the wallet address as the namespace, timestamps for storage and expiry, byte size, and an as_of ISO 8601 timestamp. Values are eventually consistent (visible globally within ~60 seconds) and not encrypted at the application level; expired keys return found=false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "key"
     ],
     "properties": {
      "key": {
       "type": "string",
       "pattern": "^[A-Za-z0-9._:/-]{1,128}$",
       "description": "Key, 1-128 characters from A-Z a-z 0-9 . _ : / -"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "namespace",
      "key",
      "found",
      "value",
      "as_of",
      "note"
     ],
     "properties": {
      "key": {
       "type": "string"
      },
      "json": {
       "description": "Parsed value when stored as JSON"
      },
      "note": {
       "type": "string",
       "description": "Fixed text: namespace, consistency, no secrets"
      },
      "as_of": {
       "type": "string",
       "description": "ISO 8601 UTC time of the reply"
      },
      "bytes": {
       "type": [
        "integer",
        "null"
       ]
      },
      "found": {
       "type": "boolean"
      },
      "value": {
       "type": [
        "string",
        "null"
       ],
       "description": "Stored text; null when not found"
      },
      "namespace": {
       "type": "string",
       "description": "The paying wallet, lowercased"
      },
      "stored_as": {
       "type": [
        "string",
        "null"
       ]
      },
      "stored_at": {
       "type": [
        "string",
        "null"
       ]
      },
      "expires_at": {
       "type": [
        "string",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "key": "session/last-run",
  "json": {
   "step": 3,
   "cursor": "abc"
  },
  "note": "Namespace = the wallet that paid for this call: only calls paid by the same wallet can read these keys. Stored in Cloudflare KV (eventually consistent, visible everywhere within about 60 s), plain text, not encrypted at the application level: do not store secrets. Expired keys disappear.",
  "as_of": "2026-10-19T12:00:00.000Z",
  "bytes": 26,
  "found": true,
  "value": "{\"step\":3,\"cursor\":\"abc\"}",
  "namespace": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
  "stored_as": "json",
  "stored_at": "2026-10-19T12:00:00.000Z",
  "expires_at": "2026-10-20T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/p0-agent-economy-index-kv-key-lookup-66a88b1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev](https://www.zero.xyz/host/x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/llms.txt)
