# Agent Exchange — EVM Chain Logs Query

> Agent Exchange — EVM Chain Logs Query is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.09/call, status unknown (last checked 2026-10-09).

Fetches filtered EVM event logs from a specified blockchain by contract address and/or event topic, returning matching log entries with metadata

## Facts

- Endpoint: GET https://store.agentexchange.work/chain/logs?utm_source=zero.xyz
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-exchange-evm-chain-logs-query-90264631
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9xZ2QBdSmCbMd48HP-OhV

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 agent-exchange-evm-chain-logs-query-90264631
```

Example prompt: Fetch me the recent ERC-20 Transfer event logs (topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f2) for the USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base for the last 500 blocks.

## When to prefer this

Choose this endpoint when you need raw EVM event logs filtered by contract address and/or event topic signature across major EVM chains. It is ideal for agents performing on-chain monitoring, DeFi analytics, contract event history retrieval, or smart contract auditing. Prefer it over a full node RPC setup when you want a simple pay-per-call API without infrastructure overhead. It covers Base, Ethereum, Optimism, Arbitrum, Polygon, and Gnosis chains.

## Known failure modes

- Missing required filter (no address or topic0 provided) — API returns an error since unfiltered scans are not servable
- Invalid contract address format — malformed 0x address rejected
- Unsupported chain name — only base, ethereum, optimism, arbitrum, polygon, gnosis are valid
- Block range too large or fromBlock in the future — may return empty results or an error
- Payment failure (insufficient USDC or invalid card) — 402 response, no data returned
- Result truncation — if total_matched > count, truncated_logs is true and only partial results are returned

## How this service works

Live data APIs for AI agents and analysts. Buy an all-access API key for $29/month with a credit card, or pay per call in USDC. No sales call.

## Output

A JSON object containing an array of log entries (each with address, topics array, data, tx_hash, log_index, block_number), the chain name, from_block, to_block, count of returned logs, total_matched count, and boolean flags indicating whether the result set was truncated due to log count or block range limits.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "topic0": {
       "type": "string",
       "description": "Event signature topic (32-byte 0x...)"
      },
      "topic1": {
       "type": "string"
      },
      "topic2": {
       "type": "string"
      },
      "topic3": {
       "type": "string"
      },
      "address": {
       "type": "string",
       "description": "Contract address to filter on (0x...)"
      },
      "toBlock": {
       "type": "string",
       "description": "End block or latest (default latest)"
      },
      "fromBlock": {
       "type": "string",
       "description": "Start block (decimal or 0x hex); defaults to 500 blocks back"
      }
     },
     "description": "address or topic0 is required — an unfiltered scan is not servable."
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "logs": {
       "type": "array"
      },
      "count": {
       "type": "number"
      },
      "total_matched": {
       "type": "number"
      },
      "truncated_logs": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "logs": [
   {
    "data": "0x...",
    "topics": [
     "0x..."
    ],
    "address": "0x...",
    "tx_hash": "0x...",
    "log_index": 12,
    "block_number": 49464700
   }
  ],
  "chain": "base",
  "count": 200,
  "to_block": 49464704,
  "from_block": 49464205,
  "total_matched": 517,
  "truncated_logs": true,
  "truncated_range": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exchange-evm-chain-logs-query-90264631/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
