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

# Get contract events

Get contract events

` GET /insights/v1/events/{contractAddress} `

Get contract events

Get contract events

## Servers

- ` https://data-api.b3.fun/ ` — B3 Data API - Multi-Chain Proxy

## Parameters

### ` contract_address ` (path, required)

- ` value `: type ` string `

  - Title: address (hex or ENS)

  - example: ` "vitalik.eth" `

Example:

```json
"vitalik.eth"
```

### ` chain ` (query, optional)

Use chain_id instead

- ` value `: type ` array `

  - example: ` [20,56,1] `

  - ` array item `: type ` number `

Example:

```json
[
  20,
  56,
  1
]
```

### ` chain_id ` (query, optional)

The chain ID(s) to request the data for. You can specify multiple chain IDs, up to a maximum of 55. Use repeated query parameters, e.g., `?chain_id=20&chain_id=56`. Optional, because a single chain can as well be specified as a subdomain

- ` value `: type ` array `

  - example: ` [20,56,1] `

  - ` array item `: type ` number `

Example:

```json
[
  20,
  56,
  1
]
```

### ` filter_block_number ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block number

  - example: ` 1000000 `

Example:

```json
1000000
```

### ` filter_block_number_gte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block number greater than or equal to

  - example: ` 1000000 `

Example:

```json
1000000
```

### ` filter_block_number_gt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block number greater than

  - example: ` 1000000 `

Example:

```json
1000000
```

### ` filter_block_number_lte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block number less than or equal to

  - example: ` 1000000 `

Example:

```json
1000000
```

### ` filter_block_number_lt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block number less than

  - example: ` 1000000 `

Example:

```json
1000000
```

### ` filter_block_hash ` (query, optional)

- ` value `: type ` string ` — Filter by block hash

  - example: ` "0x3a1fba5abd9d41457944e91ed097e039b7b12d3d7ba324a3f422db2277a48e28" `

Example:

```json
"0x3a1fba5abd9d41457944e91ed097e039b7b12d3d7ba324a3f422db2277a48e28"
```

### ` filter_block_timestamp ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block timestamp

  - example: ` 1715222400 `

Example:

```json
1715222400
```

### ` filter_block_timestamp_gte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block timestamp greater than or equal to

  - example: ` 1715222400 `

Example:

```json
1715222400
```

### ` filter_block_timestamp_gt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block timestamp greater than

  - example: ` 1715222400 `

Example:

```json
1715222400
```

### ` filter_block_timestamp_lte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block timestamp less than or equal to

  - example: ` 1715222400 `

Example:

```json
1715222400
```

### ` filter_block_timestamp_lt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by block timestamp less than

  - example: ` 1715222400 `

Example:

```json
1715222400
```

### ` sort_by ` (query, optional)

- ` value `: type ` unknown ` — Field to sort results by

  - example: ` "block_number" `

  - ` anyOf alternative 1 `: type ` string `

    - Title: constant

    - enum: ` ["block_number"] `

  - ` anyOf alternative 2 `: type ` string `

    - Title: string

Example:

```json
"block_number"
```

### ` sort_order ` (query, optional)

- ` value `: type ` string ` — Sort order (asc or desc)

  - enum: ` ["asc","desc"] `

  - example: ` "desc" `

Example:

```json
"desc"
```

### ` group_by ` (query, optional)

- ` value `: type ` string `; nullable — Field(s) to group by. You can specify multiple with repeated query parameters, e.g., ?group_by=chain_id&group_by=block_number

### ` aggregate ` (query, optional)

- ` value `: type ` string `; nullable — Aggregation(s). You can specify multiple with repeated query parameters, e.g., ?aggregate=count()&aggregate=sum(gas_used)

  - example: ` "count() as count" `

Example:

```json
"count() as count"
```

### ` filter_transaction_index ` (query, optional)

- ` value `: type ` number `; nullable — Filter by transaction index

  - example: ` 5 `

Example:

```json
5
```

### ` filter_transaction_index_gte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by transaction index greater than or equal to

  - example: ` 5 `

Example:

```json
5
```

### ` filter_transaction_index_gt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by transaction index greater than

  - example: ` 5 `

Example:

```json
5
```

### ` filter_transaction_index_lte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by transaction index less than or equal to

  - example: ` 5 `

Example:

```json
5
```

### ` filter_transaction_index_lt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by transaction index less than

  - example: ` 5 `

Example:

```json
5
```

### ` decode ` (query, optional)

- ` value `: type ` boolean `; nullable — Enable ABI decoding of the transactions/events data

  - example: ` true `

Example:

```json
true
```

### ` filter_transaction_hash ` (query, optional)

- ` value `: type ` string ` — Filter by transaction hash

  - example: ` "0x218b632d932371478d1ae5a01620ebab1a2030f9dad6f8fba4a044ea6335a57e" `

Example:

```json
"0x218b632d932371478d1ae5a01620ebab1a2030f9dad6f8fba4a044ea6335a57e"
```

### ` filter_log_index ` (query, optional)

- ` value `: type ` number `; nullable — Filter by log index

  - example: ` 5 `

Example:

```json
5
```

### ` filter_log_index_gte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by log index greater than or equal to

  - example: ` 5 `

Example:

```json
5
```

### ` filter_log_index_gt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by log index greater than

  - example: ` 5 `

Example:

```json
5
```

### ` filter_log_index_lte ` (query, optional)

- ` value `: type ` number `; nullable — Filter by log index less than or equal to

  - example: ` 5 `

Example:

```json
5
```

### ` filter_log_index_lt ` (query, optional)

- ` value `: type ` number `; nullable — Filter by log index less than

  - example: ` 5 `

Example:

```json
5
```

### ` filter_topic_1 ` (query, optional)

- ` value `: type ` string ` — Filter by topic 1

  - example: ` "0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc" `

Example:

```json
"0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc"
```

### ` filter_topic_2 ` (query, optional)

- ` value `: type ` string ` — Filter by topic 2

  - example: ` "0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc" `

Example:

```json
"0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc"
```

### ` filter_topic_3 ` (query, optional)

- ` value `: type ` string ` — Filter by topic 3

  - example: ` "0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc" `

Example:

```json
"0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc"
```

### ` filter_topic_0 ` (query, optional)

- ` value `: type ` string ` — Filter by topic 0

  - example: ` "0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc" `

Example:

```json
"0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc"
```

### ` limit ` (query, optional)

- ` value `: type ` integer ` — The number of items to return

  - default: ` 20 `

  - example: ` 20 `

  - minimum: ` 0 `

  - maximum: ` 1000 `

Example:

```json
20
```

### ` page ` (query, optional)

- ` value `: type ` integer `; nullable — Page number (0-indexed). Maximum value depends on query parameters: 20 for regular queries, 500 when using aggregate or group_by parameters.

  - default: ` 0 `

  - example: ` 0 `

  - minimum: ` 0 `

Example:

```json
0
```

## Responses

### ` 200 ` — Successful response

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` meta `

  - ` data `: type ` array `

    - ` array item `: type ` object `

      - Required fields: ` chain_id `, ` block_number `, ` block_hash `, ` block_timestamp `, ` transaction_hash `, ` transaction_index `, ` log_index `, ` address `, ` data `, ` topics `

      - ` chain_id `: type ` string `

      - ` block_number `: type ` number `

      - ` block_hash `: type ` string `

      - ` block_timestamp `: type ` number `

      - ` transaction_hash `: type ` string `

      - ` transaction_index `: type ` number `

      - ` log_index `: type ` number `

      - ` address `: type ` string `

      - ` data `: type ` string `

      - ` topics `: type ` array `

        - ` array item `: type ` string `

      - ` decoded `: type ` object `

        - Required fields: ` name `, ` signature `, ` indexed_params `, ` non_indexed_params `

        - ` name `: type ` string `

        - ` signature `: type ` string `

        - ` indexed_params `: type ` object `

        - ` non_indexed_params `: type ` object `

  - ` aggregations `: type ` unknown `; nullable

  - ` meta `: type ` object `

    - Required fields: ` chain_ids `, ` page `, ` limit_per_chain `, ` total_items `, ` total_pages `

    - ` chain_ids `: type ` array `

      - ` array item `: type ` number `

    - ` address `: type ` string `

    - ` signature `: type ` string `

    - ` page `: type ` number `

    - ` limit_per_chain `: type ` number `

    - ` total_items `: type ` number `

    - ` total_pages `: type ` number `

### ` 400 ` — Bad request

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 500 ` — Internal server error

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://data-api.b3.fun//insights/v1/events/{contractAddress}'
```

### JavaScript

```javascript
const response = await fetch('https://data-api.b3.fun//insights/v1/events/{contractAddress}', {
  method: 'GET'
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.get('https://data-api.b3.fun//insights/v1/events/{contractAddress}')
print(response.json())
```