# chain.openverbs.com – eth_getLogs Contract Event Logs

> chain.openverbs.com – eth_getLogs Contract Event Logs is a paid API for AI agents from chain.openverbs.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-14).

Fetches raw and auto-decoded event logs for a specific contract address over a bounded block range on EVM chains, with optional topic filtering.

## Facts

- Endpoint: POST https://chain.openverbs.com/v1/logs
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chain-openverbs-com-eth-getlogs-contract-event-logs-e0727f8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Jyk1IgTRPeqiT3bkKb9rL

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 chain-openverbs-com-eth-getlogs-contract-event-logs-e0727f8e -d '<json body>'
```

Example prompt: Pull the last 500 Transfer event logs from the USDC contract (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) on Ethereum, filtering by the Transfer event signature hash as topic0.

## When to prefer this

Choose this endpoint when you need to retrieve historical or recent on-chain event logs for a specific contract on EVM chains (Ethereum, Base, Arbitrum, Optimism, Polygon), especially when you want automatic decoding of ERC-20/721 Transfer events. Prefer this over general blockchain APIs when you need topic-filtered, bounded log queries with automatic endpoint fallback and a simple REST interface rather than a full RPC node.

## Known failure modes

- Invalid or missing contract address returns a validation error
- Block range exceeding the cap is clamped silently — results may not cover the full requested range
- No logs found in range returns an empty array
- Invalid topic hex format (not 0x + 64 hex chars) causes a schema validation error
- Unsupported chain name causes an enumeration error
- Very high limit values are capped at 5000
- RPC endpoint failures trigger automatic fallback but may cause latency spikes

## How this service works

Query a contract's event logs over a bounded block range via `eth_getLogs`: filter by `address` (required) and optional `topics`, get back raw logs (topics, data, block, tx hash, log index) with ERC-20/721 Transfer logs auto-decoded to `{from, to, value}`. Block span is capped (large windows are clamped); results are capped by `limit`. Reads live on-chain data with automatic endpoint fallback.

## Output

Returns an array of log objects, each containing: topics array (raw 32-byte hex), data field, block number, transaction hash, log index, and contract address. ERC-20/721 Transfer logs are automatically decoded into a structured {from, to, value} object alongside the raw data. Results are capped by the limit parameter and block span is clamped to a maximum window.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string",
       "description": "EVM chain to query. One of: ethereum, base, arbitrum, optimism, polygon. Default \"ethereum\"."
      },
      "limit": {
       "type": "integer",
       "maximum": 5000,
       "minimum": 1,
       "description": "Max logs to return (default 1000)."
      },
      "topics": {
       "type": "array",
       "items": {
        "type": [
         "string",
         "null"
        ],
        "pattern": "^0x[0-9a-fA-F]{64}$"
       },
       "maxItems": 4,
       "description": "Optional topic filters (topic0 = event signature hash). Up to 4; null matches any."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Contract address to query logs for (required — bounds the query)."
      },
      "toBlock": {
       "type": [
        "string",
        "integer"
       ],
       "description": "End block (decimal or 0x-hex) or \"latest\" (default). Max 5000-block span."
      },
      "fromBlock": {
       "type": [
        "string",
        "integer"
       ],
       "description": "Start block (decimal or 0x-hex; not a tag)."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chain-openverbs-com-eth-getlogs-contract-event-logs-e0727f8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.openverbs.com](https://www.zero.xyz/host/chain.openverbs.com/llms.txt)
