# GetLogs - Ethereum Event Logs by Address and Topics

> GetLogs - Ethereum Event Logs by Address and Topics is a paid API for AI agents from stablecrypto.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Fetches on-chain event logs for a contract address filtered by topics and block range across EVM-compatible chains

## Facts

- Endpoint: POST https://stablecrypto.dev/api/etherscan/logs/getLogs
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/getlogs-ethereum-event-logs-by-address-and-topics-2638f741
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__-DFD2IS1V6XqDzWaL2v3

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 getlogs-ethereum-event-logs-by-address-and-topics-2638f741 -d '<json body>'
```

Example prompt: Pull all Transfer event logs for the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet (chain ID 1) from block 19000000 to 19100000, filtering by topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

## When to prefer this

Use this endpoint when you need filtered on-chain event logs for a specific contract address on any supported EVM chain, especially when you want to narrow results by event signature (topic0) and additional indexed parameters. Prefer this over a generic RPC call when you want structured, paginated log results without managing raw JSON-RPC complexity. Ideal for DeFi analytics, contract debugging, and event-driven workflows.

## Known failure modes

- Invalid or unsupported chain ID returns an error
- Malformed contract address (non-checksummed or wrong length) causes rejection
- Block range too large may return truncated or paginated results
- Invalid topic hex string format causes query failure
- No logs found for the given filters returns an empty array
- Network congestion or upstream Etherscan API throttling may cause timeouts

## How this service works

Pay-per-request access to CoinGecko, DefiLlama, Alchemy, and Etherscan APIs. No auth, no subscriptions.

## Output

An array of event log entries for the specified contract, each containing the transaction hash, block number, log index, contract address, raw data field, and indexed topic values (topic0–topic3), paginated according to the page and offset parameters.

## Example request

```json
{
 "page": 1,
 "offset": 10,
 "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
 "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
 "chainid": 1,
 "toBlock": 19000100,
 "fromBlock": 19000000
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "page": {
   "type": "number"
  },
  "offset": {
   "type": "number"
  },
  "topic0": {
   "type": "string",
   "description": "Event topic 0"
  },
  "topic1": {
   "type": "string"
  },
  "topic2": {
   "type": "string"
  },
  "topic3": {
   "type": "string"
  },
  "address": {
   "type": "string",
   "description": "Contract address"
  },
  "chainid": {
   "type": "number",
   "description": "EVM chain ID (1=Ethereum, 137=Polygon, 8453=Base, etc.)"
  },
  "toBlock": {
   "type": "number"
  },
  "fromBlock": {
   "type": "number"
  },
  "topic0_1_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  },
  "topic0_2_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  },
  "topic0_3_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  },
  "topic1_2_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  },
  "topic1_3_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  },
  "topic2_3_opr": {
   "enum": [
    "and",
    "or"
   ],
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/getlogs-ethereum-event-logs-by-address-and-topics-2638f741/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablecrypto.dev](https://www.zero.xyz/host/stablecrypto.dev/llms.txt)
