Docs · method · EVM

eth_getLogs

Facts for eth_getLogs
Units per call1 (standard)
Cachenever (range-relative)
RuleRanges up to 1000 blocks per call. Up to 128 blocks the call counts 1 unit, wider ranges count 2 (heavy). A blockHash filter always counts 1. Ranges above 1000 blocks are refused with -32602 — paginate.
ChainsEthereum Mainnet · Base Mainnet · Arbitrum One · OP Mainnet · Polygon PoS
Specificationhttps://ethereum.github.io/execution-apis/api-documentation/

Example

curl -s https://flexyield.io/rpc/eth_mainnet \
  -H "Authorization: Bearer $FLEXYIELD_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getLogs","params":[{"fromBlock":"0x1312D00","toBlock":"0x1312D64","address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}]}'

When the rule applies — the exact answer

HTTP 400, JSON-RPC code -32602. The body says what to do next and carries a request id you can file as a ticket.

{
  "error": {
    "code": -32602,
    "message": "eth_getLogs ranges above 1000 blocks aren't served — paginate the range, or if your project needs bigger scans, tell us what you're building and we'll enable or tailor it for your project, usually within a day: hello@flexyield.io",
    "data": {
      "contact": "hello@flexyield.io",
      "docs": "https://flexyield.io/docs",
      "request_id": "<uuid>",
      "support": "/support/new?request_id=<uuid>"
    }
  }
}

Questions

What is the maximum block range?

1000 blocks per call; wider scans are refused with -32602 and a hint to paginate.

How many units does eth_getLogs cost?

1 unit up to 128 blocks or with a blockHash filter, 2 units for wider ranges.

All methods: methods and limits · docs · AI agents: the same call is the rpc_call MCP tool.