> For the complete documentation index, see [llms.txt](https://thehemera.gitbook.io/explorer-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thehemera.gitbook.io/explorer-api/api-endpoints/logs.md).

# Logs

## Compare With EtherScan

<table><thead><tr><th width="498">EndPoint</th><th width="116" align="center">EtherScan</th><th align="center">SocialScan</th></tr></thead><tbody><tr><td>Get Event Logs by Address</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Get Event Logs by Topics</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Get Event Logs by Address filtered by Topics</td><td align="center">✅</td><td align="center">✅</td></tr></tbody></table>

{% hint style="info" %}
Please note that the Logs API endpoints may not retain complete historical data for high-performance EVM chains. For access to data older than one month, kindly contact our customer support team.
{% endhint %}

## Get Event Logs by Address

\[<https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address>]

Returns the event logs from an address, with optional filtering by block range.

{% tabs %}
{% tab title="Mantle" %}

```
https://api.w3w.ai/mantle/v1/developer/api
   ?module=logs
   &action=getLogs
   &address=0x201eba5cc46d216ce6dc03f6a759e8e766e956ae
   &fromBlock=19999000
   &toBlock=20000000
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken
```

> Try this endpoint in your [**browser**](https://api.w3w.ai/mantle/v1/developer/api?module=logs\&action=getLogs\&address=0x201eba5cc46d216ce6dc03f6a759e8e766e956ae\&fromBlock=19999000\&toBlock=20000000\&page=1\&offset=1000\&apikey=YourApiKeyToken) :link:
> {% endtab %}

{% tab title="Monad Testnet" %}

```
https://api.socialscan.io/monad-testnet/v1/developer/api
   ?module=logs
   &action=getLogs
   &address=0x34d1ae6076aee4072f54e1156d2e507dd564a355
   &fromBlock=0
   &toBlock=20000000
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b
```

> Try this endpoint in your [**browser**](https://api.socialscan.io/monad-testnet/v1/developer/api?module=logs\&action=getLogs\&address=0x34d1ae6076aee4072f54e1156d2e507dd564a355\&fromBlock=0\&toBlock=20000000\&page=1\&offset=100\&apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b) :link:
> {% endtab %}
> {% endtabs %}

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table><thead><tr><th width="239">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>the <code>string</code> representing the address to check for logs</td></tr><tr><td>fromBlock</td><td>the <code>integer</code> block number to start searching for logs eg. <code>12878196</code></td></tr><tr><td>toBlock</td><td>the <code>integer</code> block number to stop searching for logs eg. <code>12879196</code></td></tr><tr><td>page</td><td>the <code>integer</code> page number, if pagination is enabled</td></tr><tr><td>offset</td><td>the number of transactions displayed per page<br><br>limited to <strong>1000 records</strong> per query, use the <code>page</code> parameter for subsequent records</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}
Sample response

```
{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0x7fbafdc48171a5fea4253e877af8a1f1c8fd571e4c400fe6c1bf58ae58adaaa0",
            "logIndex": "0",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0x000000000000000000000000000000000000000000000000000000000007e1c9",
            "blockNumber": "19999000",
            "timeStamp": "1699389429",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a",
                "0x000000000000000000000000a53efa35eaed44014a0530894beeea93dabe6f83"
            ]
        },
        {
            "transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
            "logIndex": "1",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0x0000000000000000000000000000000000000000000000000000000000076688",
            "blockNumber": "19999001",
            "timeStamp": "1699389429",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
                "0x0000000000000000000000006488f911c6cd86c289aa319c5a826dcf8f1ca065"
            ]
        },
        {
            "transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
            "logIndex": "2",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffff570247f",
            "blockNumber": "19999001",
            "timeStamp": "1699389429",
            "topics": [
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421"
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get Event Logs by Topics

\[<https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-topics>]

Returns the events log in a block range, filtered by topics.&#x20;

{% tabs %}
{% tab title="Mantle" %}

```
https://api.w3w.ai/mantle/v1/developer/api
   ?module=logs
   &action=getLogs
   &fromBlock=19999900
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken
```

Usage:

* For a single topic, specify the topic number such as `topic0`, `topic1`, `topic2`, `topic3`
* For multiple topics, specify the topic numbers **and** topic operator either `and` or `or` such as below\
  \
  topic0\_1\_opr (and|or between topic0 & topic1), topic1\_2\_opr (and|or between topic1 & topic2) topic2\_3\_opr (and|or between topic2 & topic3), topic0\_2\_opr (and|or between topic0 & topic2) topic0\_3\_opr (and|or between topic0 & topic3), topic1\_3\_opr (and|or between topic1 & topic3)

> Try this endpoint in your [**browser**](https://api.w3w.ai/mantle/v1/developer/api?module=logs\&action=getLogs\&fromBlock=19999900\&toBlock=20000000\&topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83\&topic0_1_opr=and\&topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421\&page=1\&offset=1000\&apikey=YourApiKeyToken) :link:
> {% endtab %}

{% tab title="Monad Testnet" %}

```
https://api.socialscan.io/monad-testnet/v1/developer/api
   ?module=logs
   &action=getLogs
   &fromBlock=0
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b
```

Usage:

* For a single topic, specify the topic number such as `topic0`, `topic1`, `topic2`, `topic3`
* For multiple topics, specify the topic numbers **and** topic operator either `and` or `or` such as below\
  \
  topic0\_1\_opr (and|or between topic0 & topic1), topic1\_2\_opr (and|or between topic1 & topic2) topic2\_3\_opr (and|or between topic2 & topic3), topic0\_2\_opr (and|or between topic0 & topic2) topic0\_3\_opr (and|or between topic0 & topic3), topic1\_3\_opr (and|or between topic1 & topic3)

> Try this endpoint in your [**browser**](https://api.socialscan.io/monad-testnet/v1/developer/api?module=logs\&action=getLogs\&fromBlock=0\&toBlock=20000000\&topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83\&topic0_1_opr=and\&topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421\&page=1\&offset=100\&apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b) :link:
> {% endtab %}
> {% endtabs %}

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table><thead><tr><th width="239">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>fromBlock</td><td>the <code>integer</code> block number to start searching for logs eg. <code>12878196</code></td></tr><tr><td>toBlock</td><td>the <code>integer</code> block number to stop searching for logs eg. <code>12879196</code></td></tr><tr><td>topic</td><td>the topic numbers to search for<br><br>limited to<code>topic0</code>, <code>topic1</code>, <code>topic2</code>, <code>topic3</code></td></tr><tr><td>topicOperator</td><td>the topic operator when multiple topic combinations are used<br><br>limited to <code>and</code> or <code>or</code></td></tr><tr><td>page</td><td>the <code>integer</code> page number, if pagination is enabled</td></tr><tr><td>offset</td><td>the number of transactions displayed per page<br><br>limited to <strong>1000 records</strong> per query, use the <code>page</code> parameter for subsequent records</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}
Sample response

```
{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0x308dedbaad3a9f38bb1afde34c5480840677ecb82ba69886b4d81bb188d2ef08",
            "logIndex": "3",
            "address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9adca0000000000000000000000000000000000000000000000000000c816bdd9c00000000000000000000000000000000000000059ff130ccbb39daea570acc00e9200000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008b536b600",
            "blockNumber": "19999901",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000728011d2bd2f25fa6998b773e9508156caaaf281"
            ]
        },
        {
            "transactionHash": "0xa44d26e33815278af7973c3dc68dd719ad0f4898e95f0c1cc521a306b70e7596",
            "logIndex": "3",
            "address": "0x6488f911c6cd86c289aa319c5a826dcf8f1ca065",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6898a00000000000000000000000000000000000000000000000000000000000975e00000000000000000000000000000000000000000fff4cb636f2ba2daaf0d4d590000000000000000000000000000000000000000000000000000c62e03e2f8cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014",
            "blockNumber": "19999903",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000387d5210595e95f41649209f3c4cc5c459ac83cd"
            ]
        },
        {
            "transactionHash": "0x905825b9bc452114c2ec784ad1cd1ca4674e9f4ebed27de49610bef9ccac651e",
            "logIndex": "3",
            "address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff425db0000000000000000000000000000000000000000000000000001772aa3f8480000000000000000000000000000000000000059ff1488f3ac76f03e606d8c8e1c00000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001053c69540",
            "blockNumber": "19999904",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x00000000000000000000000095898dcb11b7ee61d20d440178f0b491e3aae006"
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get Event Logs by Address filtered by Topics

\[<https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address-filtered-by-topics>]

Returns the event logs from an address, filtered by topics and block range.

{% tabs %}
{% tab title="Mantle" %}

```
https://api.w3w.ai/mantle/v1/developer/api?module=logs
   &action=getLogs
   &address=0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a
   &fromBlock=19999900
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken
```

> Try this endpoint in your [**browser**](https://api.w3w.ai/mantle/v1/developer/api?module=logs\&action=getLogs\&address=0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a\&fromBlock=19999900\&toBlock=20000000\&topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83\&topic0_1_opr=and\&topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421\&page=1\&offset=1000\&apikey=YourApiKeyToken) :link:
> {% endtab %}

{% tab title="Monad Testnet" %}

```
https://api.socialscan.io/monad-testnet/v1/developer/api?module=logs
   &action=getLogs
   &address=0x34d1ae6076aee4072f54e1156d2e507dd564a355
   &fromBlock=0
   &toBlock=20000000
   &topic0=0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000a92428608032f189a0b5576093d98416fd3e9418
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b
```

> Try this endpoint in your [**browser**](https://api.socialscan.io/monad-testnet/v1/developer/api?module=logs\&action=getLogs\&address=0x34d1ae6076aee4072f54e1156d2e507dd564a355\&fromBlock=0\&toBlock=20000000\&topic0=0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\&topic0_1_opr=and\&topic1=0x000000000000000000000000a92428608032f189a0b5576093d98416fd3e9418\&page=1\&offset=100\&apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b) :link:
> {% endtab %}
> {% endtabs %}

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table><thead><tr><th width="239">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>fromBlock</td><td>the <code>integer</code> block number to start searching for logs eg. <code>12878196</code></td></tr><tr><td>toBlock</td><td>the <code>integer</code> block number to stop searching for logs eg. <code>12879196</code></td></tr><tr><td>address</td><td>the <code>string</code> representing the address to check for logs</td></tr><tr><td>topic</td><td>the topic numbers to search for<br><br>limited to<code>topic0</code>, <code>topic1</code>, <code>topic2</code>, <code>topic3</code></td></tr><tr><td>topicOperator</td><td>the topic operator when multiple topic combinations are used<br><br>limited to <code>and</code> or <code>or</code></td></tr><tr><td>page</td><td>the <code>integer</code> page number, if pagination is enabled</td></tr><tr><td>offset</td><td>the number of transactions displayed per page<br><br>limited to <strong>1000 records</strong> per query, use the <code>page</code> parameter for subsequent records</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}
Sample response

```
{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0xa1ec08e21896b510ca7f1ade9221ea136000edea92beea757c5965263627ad95",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3a40000000000000000000000000000000000000000000000000d7621dc58210000000000000000000000000000000000000017809b862193550103f74bf56bd1110000000000000000000000000000000000000000000000005f00d2fec24cd7c800000000000000000000000000000000000000000000000000000000000459230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095f9c5ec6800",
            "blockNumber": "19999923",
            "timeStamp": "1699389797",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x0000000000000000000000006658a52627f055c8ee1813da497256a87e283cc7"
            ]
        },
        {
            "transactionHash": "0xbd52e6d7109a6518cc98913206d0ccfdf5dc1b720538f05826f16112becb1b5b",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7e661000000000000000000000000000000000000000000000000117c6b5300fe0000000000000000000000000000000000000017809bb539e849e13c3cd656d595280000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2d052e93000",
            "blockNumber": "19999928",
            "timeStamp": "1699389797",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x0000000000000000000000006ac3c5b517c0a9024d8a6ff48c0d3977ae7993af"
            ]
        },
        {
            "transactionHash": "0xab21ef4b1a6a18f17b5543f3245a46ec3d526c4ec64f56b4c81bb20639e235a8",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff817c00000000000000000000000000000000000000000000000001111d67bb1bb0000000000000000000000000000000000000017809be3332f0829d4b17be6b0a3d10000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000be2ce338f800",
            "blockNumber": "19999930",
            "timeStamp": "1699389802",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x00000000000000000000000036bee9554fa814799054dfc6658c789416ee4ed7"
            ]
        },
        {
            "transactionHash": "0x1a640471e7699b5230283c69159de5c4f3576525d324d1f4f37511fb78ea7063",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff992450000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000017809c0893b3793d4e8f472ff043810000000000000000000000000000000000000000000000005f00d2fec24cd7c80000000000000000000000000000000000000000000000000000000000045923000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a9d359ca000",
            "blockNumber": "19999931",
            "timeStamp": "1699389802",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000fd97098bac2ea76e1d1c39ea32b0c5b023fe761e"
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thehemera.gitbook.io/explorer-api/api-endpoints/logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
