Skip to main content
POST
/
eth-rpc#eth_getLogs
Get Event Logs
curl --request POST \
  --url 'https://eth.blockscout.com/api/eth-rpc?apikey=#eth_getLogs' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
      "fromBlock": "0x1234567",
      "toBlock": "latest",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
      ]
    }
  ],
  "id": 1
}
'
{
  "jsonrpc": "2.0",
  "result": [],
  "id": 1
}

Authorizations

apikey
string
query
required

Optional API key for increased rate limits.

Without API key:

  • 5 requests per second (shared pool)
  • No registration required

With API key:

  • 10 requests per second per key
  • Up to 3 free keys per account
  • Get your API key at https://blockscout.com (login required)

Usage: Add apikey=YOUR_KEY to any request query string.

Body

application/json
jsonrpc
enum<string>
required
Available options:
2.0
Example:

"2.0"

method
enum<string>
required
Available options:
eth_getLogs
Example:

"eth_getLogs"

params
(string | boolean | object | integer)[]
required
Example:
[
{
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"fromBlock": "0x1234567",
"toBlock": "latest",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
id
required
Example:

1

Response

200 - application/json

Successful JSON-RPC response

jsonrpc
string
Example:

"2.0"

result
any

Method result (varies by method)

id
Example:

1