---
title: "List contracts logs across many contracts on the network"
method: GET
path: "/api/v1/contracts/results/logs"
tags: ["contracts"]
---

# List contracts logs across many contracts on the network

`GET /api/v1/contracts/results/logs`

Search the logs across many contracts with multiple contract calls. Chained logs are not
included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`
or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied
and span a time range of at most seven days.

## Ordering
The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.

Note: The default order for this API is currently DESC

## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.

**The table below defines the restrictions and support for the endpoint**

| Query Param   | Comparison Operator | Support | Description           | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| index         | eq                  | Y       | Single occurrence only. Requires the presence of timestamp | ?index=X |
|               | ne                  | N       | | |
|               | lt(e)               | Y       | Single occurrence only. Requires the presence of timestamp | ?index=lte:X |
|               | gt(e)               | Y       | Single occurrence only. Requires the presence of timestamp | ?index=gte:X |
| timestamp     | eq                  | Y       | Single occurrence only. | ?timestamp=Y
|               | ne                  | N       | | |
|               | lt(e)               | Y       | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y
|               | gt(e)               | Y       | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y


Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.

## Query parameters

- `index` string
- `limit` integer
- `order` 'asc' | 'desc'
- `timestamp` string[]
- `topic0` string[]
- `topic1` string[]
- `topic2` string[]
- `topic3` string[]
- `transaction.hash` string

## Response `200`

OK

- ContractLogsResponse
  - `logs` ContractLog[]
    - `address` string — The hex encoded EVM address of the contract
    - `bloom` string, binary, nullable — The hex encoded bloom filter of the contract log
    - `contract_id` string, nullable — Network entity ID in the format of `shard.realm.num`
    - `data` string, nullable — The hex encoded data of the contract log
    - `index` integer — The index of the contract log in the chain of logs for an execution
    - `topics` string[] — A list of hex encoded topics associated with this log event
    - `block_hash` string — The hex encoded block (record file chain) hash
    - `block_number` integer — The block height calculated as the number of record files starting from zero since network start.
    - `root_contract_id` string, nullable — The executed contract that created this contract log
    - `timestamp` string — A Unix timestamp in seconds.nanoseconds format
    - `transaction_hash` string — A hex encoded transaction hash
    - `transaction_index` integer, nullable — The position of the transaction in the block
  - `links` Links
    - `next` string, nullable

## Other responses

- `400` — Invalid parameter

---

[API](https://skmtc.dev/hedera/apis/mirror-node-rest-api.md) · [All operations](https://skmtc.dev/hedera/apis/mirror-node-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hedera/mirror-node-rest-api/revisions/45f5ccac560c/schema)
