> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moralis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getLogs

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

#### Path parameters

<ResponseField name="apiKey" type="string" required>
  Your API key for authentication
</ResponseField>

#### Request

<ResponseField name="fromBlock" type="string">
  Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
</ResponseField>

<ResponseField name="toBlock" type="string">
  Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions
</ResponseField>

<ResponseField name="address" type="string">
  Contract address or a list of addresses from which logs should originate
</ResponseField>

<ResponseField name="topics" type="array">
  Array of 32 Bytes DATA topics. Topics are order-dependent
</ResponseField>

<ResponseField name="blockhash" type="string">
  Using blockhash is equivalent to fromBlock = toBlock = the block number with hash blockhash
</ResponseField>

#### Example request `params`

```javascript theme={null}
[
  {
    "fromBlock": "0x1",
    "toBlock": "0x2",
    "address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
    "topics": [
      "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
      null,
      [
        "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
        "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"
      ]
    ]
  }
]
```

<RequestExample>
  ```shellscript curl theme={null}
  curl https://site1.moralis-nodes.com/arbitrum/:apiKey \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]]}], "id": 1}'
  ```
</RequestExample>

<ResponseExample>
  ```json JSON theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      {
        "logIndex": "0x1",
        "blockNumber": "0x1b4",
        "blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
        "transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
        "transactionIndex": "0x0",
        "address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
        "data": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "topics": [
          "0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
        ]
      }
    ]
  }
  ```
</ResponseExample>
