> For the complete documentation index, see [llms.txt](https://docs.mercurydata.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mercurydata.app/~/changes/KX2wpglbthtd9RsHwz3R/mercury-classic/queries/contract-events.md).

# Contract Events

Start querying contract events

For contract events, there are n queries, all with the same body:

* `eventByTopic`
* `eventByContractId`
* `eventByContractIds`
* `allContractEvents`

Below is an example of using `eventByContractId` :

```graphql
query MyQuery {
  eventByContractId(searchedContractId: "CONTRACT_ID") {
    nodes {
      contractId
      data
      topic1
      topic2
      topic3
      topic4
      txInfoByTx {
        ledgerByLedger {
          closeTime
          sequence
        }
        memo
        txHash
        opCount
        fee
      }
    }
  }
}

```

We suggest fiddling with the GraphiQL endpoint (see [Endpoints](/~/changes/KX2wpglbthtd9RsHwz3R/get-started-with-mercury/endpoints.md)) to build the most appropriate queries for your needs.
