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

# eth\_getLogs

### Parameters

`Object` - filter options:

1.  `fromBlock`: `Quantity` or `tag` (optional, default is `"latest"` if not specified)&#x20;

    \- choose 1 of the following options:

    * A hexadecimal block number.
    * `"earliest"` - the earliest/genesis block.
    * `"latest"` - the latest mined block.
    * `"finalized"` - the latest finalized block.
    * `"pending"` - the pending state/transactions.
2.  `toBlock`: `Quantity` or `tag` (optional, default is `"latest"` if not specified)&#x20;

    \- choose 1 of the following options:

    * A hexadecimal block number.
    * `"earliest"` - the earliest/genesis block.
    * `"latest"` - the latest mined block.
    * `"finalized"` - the latest finalized block.
    * `"pending"` - the pending state/transactions.
3. `address`:  (optional) Contract address or a list of addresses from which logs should originate.
4. `topics`: (optional) Array of `DATA` topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.
5. `blockhash`: (optional) restricts the logs returned to the given block. is equivalent to setting `fromBlock` and `toBlock` to the block number referenced in the `blockhash` If `blockhash` is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed.

#### Sample Request

{% code overflow="wrap" %}
```
curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x90e62c",
      "toBlock": "0x90e62e"
    }
  ],
  "id": 1
}'
```
{% endcode %}

#### Sample Response

{% code overflow="wrap" %}
```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0x8ee180756e6bf12cb6e6d9786fa0dce9808771aa",
      "topics": [
        "0xb20f83d7fca2253dd4a37d0ee1922398cbbecf5a89899514947161ae70c0037f",
        "0x000000000000000000000000000000000000000000000000000000000000b54d",
        "0x00000000000000000000000000000000000000000000000000000000008da428"
      ],
      "data": "0x8a78568ea2ed3a0626d3b2b707e10cdd2ec4594b8786813cb77b0dfa101079d59364575ef3cb4d02c60ba2dc22da4b8d104aba7b49f9884cddc76b5b530faa46",
      "blockNumber": "0x90e62d",
      "transactionHash": "0x6875c16ee7346936e8309085998b8d56a1cc6b32ffbcf257d61a94c7b74ca1ab",
      "transactionIndex": "0x0",
      "blockHash": "0x2aa337d5eb58a06ca266f920fbd7cec2f5e97fff5e896e87f182a5c485fd6f4f",
      "logIndex": "0x0",
      "removed": false
    },
    {
      "address": "0xf53c7ee9a4665446445c38103662cf68f69aa502",
      "topics": [
        "0xa3fa2e60f4d1c7f6bd60da77a4be0625773dfb6b22c54fe77e725d03e49cdf2e"
      ],
      "data": "0x00000000000000000000000000000000000000000000000000000000008f421d657ddb5a901d18ccfaa0fe9fc6fff79be4dc43ef2b3a55bfe33eecf381a8cf74162bc83d25e2b1a0f72cd28e1ce7074cfa9450a586f505b2db917229e72dc06d",
      "blockNumber": "0x90e62e",
      "transactionHash": "0xe3ed74b51fb7b9bb95bcb39154a9b19b0d75c1266d52ac84a7ed84cf92c6520e",
      "transactionIndex": "0x0",
      "blockHash": "0x40f600c0286546d01836675df3ddba3ad812a2b84d56bb02b2ce5f01ebd5b9bd",
      "logIndex": "0x0",
      "removed": false
    }
  ]
}
```
{% endcode %}
