---
title: "Get logs by contract"
method: GET
path: "/{chainId}/events/{contract}"
tags: ["events"]
---

# Get logs by contract

`GET /{chainId}/events/{contract}`

Retrieve logs for a specific contract

## Path parameters

- `chainId` string, required
- `contract` string, required

## Query parameters

- `filter` string
- `group_by` string
- `sort_by` string
- `sort_order` string
- `page` integer
- `limit` integer
- `aggregate` string[]
- `force_consistent_data` boolean

## Response `200`

OK

- object — QueryResponse represents the response structure for a query
  - `aggregations` object[] — @Description Aggregation results
  - `data` CommonLogModel[] — @Description Query result data
    - `address` string
    - `block_hash` string
    - `block_number` integer
    - `block_timestamp` integer
    - `chain_id` string
    - `data` string
    - `log_index` integer
    - `topics` string[]
    - `transaction_hash` string
    - `transaction_index` integer
  - `meta` ApiMeta — Meta represents metadata for a query response
    - `address` string — @Description Contract address
    - `chain_id` integer — @Description Chain ID of the blockchain
    - `limit` integer — @Description Number of items per page
    - `page` integer — @Description Current page number
    - `signature` string — @Description Function or event signature
    - `total_items` integer — @Description Total number of items
    - `total_pages` integer — @Description Total number of pages

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2025-02-26** `e62eb392955d` — 1 info
  - added the new optional `query` request parameter `force_consistent_data`
- **2024-10-01** `8b52267689cc` — 1 warning
  - deleted the `query` request parameter `force_consistent_data`

[Change history](https://skmtc.dev/thirdweb/apis/thirdweb-insight/changes/:chainId/events/:contract/get.md)

---

[API](https://skmtc.dev/thirdweb/apis/thirdweb-insight.md) · [All operations](https://skmtc.dev/thirdweb/apis/thirdweb-insight/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thirdweb/thirdweb-insight/revisions/a0a466ab88d5/schema)
