Skip to main content

Don't have an RPC Node yet?

Start using RPC Nodes in your project today.

Get your free RPC Node

eth_getLogs

Get Logs

POSThttps://site1.moralis-nodes.com/:chain/:apiKey

Returns an array of logs matching a specified filter condition. This can include logs for specific addresses, block number ranges, or topics. Logs are used by smart contracts to record events and can be queried to retrieve historical state or transaction outcomes.

Note

Please refer to RPC schema page for more details on the RPC params and RPC response definitions of the RPC method.

PATH PARAMS
chainstringrequired
The blockchain to interact with.
apiKeystringrequired
Your API key for authentication.
BODY PARAM
Request Bodyobjectrequired
The request payload for retrieving logs based on a filter.
Responses
200Returns logs matching the filter condition.
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
curl --request POST \
--url 'https://site1.moralis-nodes.com/eth/YOUR_API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs"
}
'
Response Example
[
{
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x...",
"blockNumber": "0x1a4",
"transactionHash": "0x...",
"transactionIndex": "0x3",
"blockHash": "0x...",
"logIndex": "0x1",
"removed": ""
}
]