Returns an array of all logs matching filter with given id.

The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely.

  • The number of maximum returned results in a single query (Default: 10,000).
  • The execution duration limit of a single query (Default: 10 seconds).


Supported on Klaytn (mainnet) only.



QUANTITYstringThe filter id


Array - Array of log objects, or an empty array if nothing has changed since last poll.

  • For filters created with klay_newBlockFilter, the return are block hashes (32-byte DATA),
    e.g., ["0x3454645634534..."].
  • For filters created with klay_newPendingTransactionFilter, the return are transaction
    hashes (32-byte DATA), e.g., ["0x6345343454645..."].
  • For filters created with klay_newFilter, logs are objects with following parameters:
removedTAGtrue when the log was removed, due to a chain reorganization. false if it is a valid log.
logIndexQUANTITYInteger of the log index position in the block. null when it is a pending log.
transactionIndexQUANTITYInteger of the transactions index position log was created from. null when pending.
transactionHash32-byte DATAHash of the transactions this log was created from. null when pending.
blockHash32-byte DATAHash of the block where this log was in. null when pending.
blockNumberQUANTITYThe block number where this log was in. null when pending.
address20-byte DATAAddress from which this log originated.
dataDATAContains the non-indexed arguments of the log.
topicsArray of DATAArray of 0 to 4 32-byte 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 declared the event with the anonymous specifier.).

API Endpoint

The format of a Klaytn API endpoint is

Here is an example:


// Request
curl https://open-platform.nodereal.io/{{apiKey}}/klaytn/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"klay_getFilterLogs","params":["0xd32fd16b6906e67f6e2b65dcf48fc272"],"id":1}' 

// Result