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

# Get Event Logs by Address and Topics

> Retrieves event logs from a specified address, filtered by topics and block range.

export const chain = '1';

<ResponseExample>
  ```json Example response theme={null}
  {
    "status": "1",
    "message": "OK",
    "result": [
      {
        "address": "0x59728544b08ab483533076417fbbb2fd0b17ce3a",
        "topics": [
          "0x27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d",
          "0x00000000000000000000000023581767a106ae21c074b2276d25e5c3e136a68b",
          "0x000000000000000000000000000000000000000000000000000000000000236d",
          "0x000000000000000000000000c8a5592031f93debea5d9e67a396944ee01bb2ca"
        ],
        "data": "0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000f207539952d0000",
        "blockNumber": "0xe60262",
        "blockHash": "0xb40d77b4ffba5ae2a38cbc87a65a6c9b56f9af5d8bf320aa1f1b6af00b850778",
        "timeStamp": "0x62c26caf",
        "gasPrice": "0x5e2d742c9",
        "gasUsed": "0xfb7f8",
        "logIndex": "0x4b",
        "transactionHash": "0x26fe1a0a403fd44ef11ee72f3b4ceff590b6ea533684cb279cb4242be463304c",
        "transactionIndex": "0x39"
      },
      {
        "address": "0x59728544b08ab483533076417fbbb2fd0b17ce3a",
        "topics": [
          "0x27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d",
          "0x00000000000000000000000023581767a106ae21c074b2276d25e5c3e136a68b",
          "0x0000000000000000000000000000000000000000000000000000000000002261",
          "0x000000000000000000000000c8a5592031f93debea5d9e67a396944ee01bb2ca"
        ],
        "data": "0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000",
        "blockNumber": "0xe6035b",
        "blockHash": "0x5a46aeca5eaf8af1fbf56439b12dfea8fb27d18ca31020cc723271e119cffc04",
        "timeStamp": "0x62c27ab1",
        "gasPrice": "0x27e523173",
        "gasUsed": "0x3b86e",
        "logIndex": "0x1d7",
        "transactionHash": "0x3a299413cf2c91e376e542efcf3fc308c562da79af6e992401217cc6208c7f74",
        "transactionIndex": "0x92"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi/api-reference/endpoint/getlogs-address-topics.json GET /v2/api
openapi: 3.1.0
info:
  title: Get Event Logs by Address and Topics
  version: 2.0.0
  description: >-
    Retrieves event logs from a specified address, filtered by topics and block
    range.
  license:
    name: Etherscan API Terms
    url: https://etherscan.io/terms
servers:
  - url: https://api.etherscan.io
    description: Etherscan API.
security:
  - apiKey: []
paths:
  /v2/api:
    get:
      summary: Get Event Logs by Address and Topics
      description: >-
        Retrieves event logs from a specified address, filtered by topics and
        block range.
      operationId: getGetlogsAddressTopics
      parameters:
        - name: chainid
          in: query
          required: true
          description: >-
            Chain ID to query, eg 1 for Ethereum, 42161 for Arbitrum from our
            [supported chains](/supported-chains).
          schema:
            type: string
          example: '1'
        - name: module
          in: query
          required: true
          description: Set to logs for this endpoint.
          schema:
            type: string
            default: logs
          example: logs
        - name: action
          in: query
          required: true
          description: Set to getLogs for this endpoint.
          schema:
            type: string
            default: getLogs
          example: getLogs
        - name: fromBlock
          in: query
          required: true
          description: Starting block number to search from.
          schema:
            type: integer
          example: 15073139
        - name: toBlock
          in: query
          required: true
          description: Ending block number to search to.
          schema:
            type: integer
          example: 15074139
        - name: address
          in: query
          required: true
          description: Address to check for logs.
          schema:
            type: string
          example: '0x59728544b08ab483533076417fbbb2fd0b17ce3a'
        - name: topic0
          in: query
          required: false
          description: First topic to filter by, such as an event signature.
          schema:
            type: string
          example: '0x27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d'
        - name: topic0_1_opr
          in: query
          required: false
          description: Topic operator between topic0 and topic1, either and or or.
          schema:
            type: string
          example: and
        - name: topic1
          in: query
          required: false
          description: Second topic to filter by.
          schema:
            type: string
          example: '0x00000000000000000000000023581767a106ae21c074b2276d25e5c3e136a68b'
        - name: page
          in: query
          required: false
          description: Page number for pagination.
          schema:
            type: integer
          example: 1
        - name: offset
          in: query
          required: false
          description: >-
            Number of records per page. Use the page parameter for subsequent
            records.
          schema:
            type: integer
          example: 100
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      1 if the request returned data, 0 otherwise. A status of 0
                      can indicate an error or a valid request that returned no
                      records.
                  message:
                    type: string
                    description: >-
                      OK on success, otherwise an error description such as
                      NOTOK. See [common error
                      messages](/common-error-messages).
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: Address of the contract that emitted the log.
                        topics:
                          type: array
                          description: >-
                            Array of indexed log topics. The first topic is the
                            event signature hash.
                        data:
                          type: string
                          description: Non-indexed event data, as a hex string.
                        blockNumber:
                          type: string
                          description: >-
                            Block number in which the log was recorded, in
                            hexadecimal.
                        blockHash:
                          type: string
                          description: Hash of the block containing the log.
                        timeStamp:
                          type: string
                          description: >-
                            Time the block was mined, as a UNIX timestamp in
                            hexadecimal.
                        gasPrice:
                          type: string
                          description: >-
                            Gas price of the transaction that produced the log,
                            in wei (hexadecimal).
                        gasUsed:
                          type: string
                          description: >-
                            Gas used by the transaction that produced the log,
                            in hexadecimal.
                        logIndex:
                          type: string
                          description: >-
                            Index position of the log within the block, in
                            hexadecimal.
                        transactionHash:
                          type: string
                          description: Hash of the transaction that produced the log.
                        transactionIndex:
                          type: string
                          description: >-
                            Index of the transaction within the block, in
                            hexadecimal.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Enter your Etherscan API key, or [set one up](/set-up-your-api-key) if
        you don't have one.

````