JSON-RPCMethods
eth_getLogs: block range limit, parameters and CU
Query event logs with eth_getLogs: filter parameters, return values, CU weights, per-chain block range limits, and handling logs_range_too_large.
Summary
Query event logs within a block range that match a filter.
Compute units (CU) and pricing
CU per call
30 CU
Price per 1M calls (USD)
$3.00
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | object | Filter object: fromBlock and toBlock (block number or tag, default latest), address (one address or an array of addresses), topics (an array where each item is null, a 32-byte topic, or an array of topics), or blockHash to target a single block. |
Returns
- Type:
ARRAY - Description: Array of log objects in block order; an empty array when nothing matches.
Notes
blockHash is mutually exclusive with fromBlock/toBlock; topics match by position, and null means any value at that position. A block range wider than the chain's max_logs_block_range (see GET /v1/chains) returns -32602.
Request example
export BLOCKVECTRA_API_KEY=rgw_your_api_key
curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H "x-api-key: $BLOCKVECTRA_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"address": "0x0000000000000000000000000000000000000000",
"fromBlock": "latest",
"toBlock": "latest"
}
],
"id": 1
}'Supported chains
Available on all 29 supported chains.
Related references
For wide queries, follow the eth_getLogs block range limit and chunked queries guide. Error details and recommended actions are in the logs_range_too_large reference.
Last updated: