Skip to main content

eth_getLogs RPC Method

Returns an array of all logs matching a given filter object.

Updated on
Jan 21, 2026
Please be aware that the block range limit for this RPC method is 5 blocks for users on the Free Trial plan and 10,000 blocks for those on paid plans. Consider dividing your queries into smaller segments to enhance response times and manage errors more effectively. For further details on the block range limit and strategies for mitigating it, please consult the FAQ

Parameters

object
object

The filter object which contains the following fields:

fromBlock
string

The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

toBlock
string

The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

address
string

The contract address or a list of addresses from which logs should originate

topics
array

An array of DATA topics and also, the topics are order-dependent. Visit this official page to learn more about topics

blockHash
string

With the addition of EIP-234, blockHash is a new filter option that restricts the logs returned to the block number referenced in the blockHash. Using the blockHash field is equivalent to setting the fromBlock and toBlock to the block number the blockHash references. If blockHash is present in the filter criteria, neither fromBlock nor toBlock is allowed

Returns

array
array

An array of log objects, or an empty array if nothing has changed since last poll:

address
string

An address from which this log originated

topics
array

An array of zero to four 32 Bytes DATA of indexed log arguments. In Solidity, the first topic is the hash of the signature of the event (e.g. Deposit(address, bytes32, uint256)), except you declare the event with the anonymous specifier

data
string

It contains one or more 32 Bytes non-indexed arguments of the log

blockNumber
string | null

The block number where this log was in. null when it's a pending log

transactionHash
string | null

The hash of the transactions this log was created from. null when its a pending log

transactionIndex
string | null

The integer of the transaction's index position that the log was created from. null when it's a pending log

blockHash
string | null

The hash of the block where this log was in. null when it's a pending log

logIndex
string | null

The integer of the log index position in the block. null when it's a pending log

removed
boolean

It is true when the log was removed due to a chain reorganization, and false if it's a valid log

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": "1",
4
"result": [
5
{
6
"logIndex": "0x0",
7
"removed": false,
8
"blockNumber": "0x233",
9
"blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
10
"transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
11
"transactionIndex": "0x0",
12
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
13
"data": "0x0000000000000000000000000000000000000000000000000000000000000004",
14
"topics": [
15
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
16
]
17
},
18
{
19
"logIndex": "0x0",
20
"removed": false,
21
"blockNumber": "0x238",
22
"blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
23
"transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
24
"transactionIndex": "0x0",
25
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
26
"data": "0x0000000000000000000000000000000000000000000000000000000000000007",
27
"topics": [
28
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
29
]
30
}
31
]
32
}
1
{
2
"jsonrpc": "2.0",
3
"id": "1",
4
"result": [
5
{
6
"logIndex": "0x0",
7
"removed": false,
8
"blockNumber": "0x233",
9
"blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
10
"transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
11
"transactionIndex": "0x0",
12
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
13
"data": "0x0000000000000000000000000000000000000000000000000000000000000004",
14
"topics": [
15
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
16
]
17
},
18
{
19
"logIndex": "0x0",
20
"removed": false,
21
"blockNumber": "0x238",
22
"blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
23
"transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
24
"transactionIndex": "0x0",
25
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
26
"data": "0x0000000000000000000000000000000000000000000000000000000000000007",
27
"topics": [
28
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
29
]
30
}
31
]
32
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free