# Agent402 EVM Event Logs

> Agent402 EVM Event Logs is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Fetches raw on-chain event logs for a given contract address and block range across multiple EVM networks, optionally filtered by event signature topic.

## Facts

- Endpoint: POST https://agent402.tools/api/event-logs
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-evm-event-logs-f418df58
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KTPKTJ-9ZomzRvo8avG4J

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 agent402-evm-event-logs-f418df58 -d '<json body>'
```

Example prompt: Fetch the last 100 blocks of event logs for the contract 0x8335… on Base, filtered to ERC-20 Transfer events using topic0 0xddf252ad…

## When to prefer this

Use this endpoint when you need raw EVM event logs for a specific contract across major networks (Ethereum, Base, Polygon, Arbitrum, Optimism) without setting up your own RPC node or API key. It is ideal for pay-per-call agent workflows that need on-chain data on demand, especially when filtering by event signature (topic0) such as ERC-20 Transfers. Prefer this over full indexing services when you need a quick targeted block range query rather than historical indexing.

## Known failure modes

- Invalid or malformed contract address returns an error
- Unsupported network name results in a 400-level error
- Block range too large may return truncated results (truncated: true)
- Non-existent or zero-activity contract returns an empty logs array
- Invalid topic0 hash format may cause a parsing error
- Network congestion or RPC unavailability may cause timeout

## How this service works

Fetch contract event logs (eth_getLogs) on Ethereum, Base, Polygon, Arbitrum, or Optimism - bounded so it always answers: block range capped at 2000 blocks (default: the last 100, auto-narrowed for busy contracts), at most 200 logs returned (truncated flag set if more matched). Filter by contract address and optional topic0 (event signature hash). Keyless multi-endpoint failover.

## Output

A JSON object containing an array of raw event logs (each with data, topics array, txHash, and blockNumber), plus metadata: total count, queried address, network, fromBlock, toBlock, and a truncated flag indicating whether results were capped.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "topic0": {
   "type": "string",
   "description": "Optional event signature hash (32-byte 0x hex), e.g. the ERC-20 Transfer topic."
  },
  "address": {
   "type": "string",
   "description": "Contract address to read logs from (0x…)."
  },
  "network": {
   "type": "string",
   "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
  },
  "toBlock": {
   "type": "string",
   "description": "End block (decimal, 0x hex, or \"latest\"). Default latest."
  },
  "fromBlock": {
   "type": "string",
   "description": "Start block (decimal or 0x hex). Default: toBlock - 100."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "logs": [
   {
    "data": "0x…",
    "topics": [
     "0xddf2…"
    ],
    "txHash": "0x…",
    "blockNumber": 26999512
   }
  ],
  "count": 87,
  "address": "0x8335…",
  "network": "base",
  "toBlock": 27000000,
  "fromBlock": 26999500,
  "truncated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-evm-event-logs-f418df58/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
