> For a complete page index, fetch https://docs.conduit.xyz/llms.txt

# eth_getLogs

POST https://rpc.plume.org/YOUR_API_KEY
Content-Type: application/json

Returns an array of all logs matching a given filter object. The filter object can contain `address`, `topics`, `fromBlock`, `toBlock`, and `blockHash` parameters (`blockHash` is mutually exclusive with `fromBlock`/`toBlock`).

**Provider limits:** Conduit-hosted RPCs enforce a maximum block range of **2,000 blocks** per `eth_getLogs` call and a maximum of **10,000 log events** per response. Requests exceeding either limit are rejected. To work with large historical ranges, chunk the request into smaller windows. For single-block queries, use `blockHash` instead of `fromBlock`/`toBlock` — it has no range limit and is reorg-safe (the request will fail rather than return stale logs if the block has been re-orged out).

⚡ Compute Units: [75 CU](https://docs.conduit.xyz/rpc-nodes/information/compute-units)

Reference: https://docs.conduit.xyz/rpc-nodes/json-rpc-reference/eth-get-logs

## Request

### Body (application/json)

This endpoint expects an object.

- `filter` (Filter, required) — Filter options object

## Response

### 200

Array of log objects

- `list of Log`

## Types

### Filter

Filter options. All fields are optional. Note that blockHash is mutually exclusive with fromBlock/toBlock: if blockHash is provided, fromBlock and toBlock must be omitted.

- `address` (FilterAddress, optional) — Contract address or array of addresses from which logs should originate
- `topics` (list of FilterTopicsItems, optional) — Array of topic specifiers
- `fromBlock` (BlockNumberOrTag, optional) — Starting block number for search
- `toBlock` (BlockNumberOrTag, optional) — Ending block number for search
- `blockHash` (string, optional) — Restricts the logs to the single block with this hash. Mutually exclusive with fromBlock/toBlock.

### Log

- `transactionHash` (string, required)
- `removed` (boolean, optional)
- `logIndex` (string, optional)
- `transactionIndex` (string, optional)
- `blockHash` (string, optional)
- `blockNumber` (string, optional)
- `blockTimestamp` (string, optional)
- `address` (string, optional)
- `data` (string, optional)
- `topics` (list of string, optional)

### FilterAddress

Contract address or array of addresses from which logs should originate

### FilterTopicsItems

### BlockNumberOrTag

## Examples

**Request**

```json
[
  {
    "address": "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
    "fromBlock": "latest",
    "toBlock": "latest"
  }
]
```

**Response**

```json
{
  "id": "1",
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
      "blockHash": "0x7b99b97aa538547a6e4e38f011f250da6d05675461e92d25819f08c756872f83",
      "blockNumber": "0x28401d2",
      "blockTimestamp": "0x693b7000",
      "data": "0x000000000000000000000000000000000000000000000000000000000000c351",
      "logIndex": "0x1",
      "removed": false,
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000ee03f376ad26948d24c2e3ae76c8d95c77930763",
        "0x00000000000000000000000042b18785ce0aed7bf7ca43a39471ed4c0a3e0bb5"
      ],
      "transactionHash": "0x85681434491f687150b2ff934554f149b284839eafc579b6abffb54f7df3b42c",
      "transactionIndex": "0x1"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://rpc.plume.org/YOUR_API_KEY"

payload = [
    {
        "address": "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
        "fromBlock": "latest",
        "toBlock": "latest"
    }
]
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://rpc.plume.org/YOUR_API_KEY';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '[{"address":"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f","fromBlock":"latest","toBlock":"latest"}]'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rpc.plume.org/YOUR_API_KEY"

	payload := strings.NewReader("[\n  {\n    \"address\": \"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f\",\n    \"fromBlock\": \"latest\",\n    \"toBlock\": \"latest\"\n  }\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://rpc.plume.org/YOUR_API_KEY")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"address\": \"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f\",\n    \"fromBlock\": \"latest\",\n    \"toBlock\": \"latest\"\n  }\n]"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rpc.plume.org/YOUR_API_KEY")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"address\": \"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f\",\n    \"fromBlock\": \"latest\",\n    \"toBlock\": \"latest\"\n  }\n]")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rpc.plume.org/YOUR_API_KEY', [
  'body' => '[
  {
    "address": "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
    "fromBlock": "latest",
    "toBlock": "latest"
  }
]',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://rpc.plume.org/YOUR_API_KEY");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"address\": \"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f\",\n    \"fromBlock\": \"latest\",\n    \"toBlock\": \"latest\"\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  [
    "address": "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
    "fromBlock": "latest",
    "toBlock": "latest"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://rpc.plume.org/YOUR_API_KEY")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```