> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.galleon8.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.galleon8.com/_mcp/server.

# Query API Overview

> Understand the Advanced API methods for indexed blocks, logs, interactions, and transactions.

**Query API** is the Advanced API method group for indexed blockchain query workflows. Use it when your application needs block data, logs, wallet interactions, or transaction details without running its own indexer.

> Query API usecases: best suited for explorers, analytics dashboards, monitoring services, compliance workflows, and backend systems that need normalized chain activity data.

---

## What You Can Build

Query API supports common indexed-data workflows used by production applications:

* **Inspect block ranges**: retrieve indexed block data for supported chains and ranges.
* **Read logs**: query event logs across block ranges for contracts and indexed workflows.
* **Analyze wallet activity**: discover chains and contracts an address has interacted with.
* **Look up transactions**: retrieve transaction details by hash for reconciliation, support, or analytics.

---

## Request Model

Query API uses JSON-RPC 2.0 over the Advanced API multichain HTTPS endpoint. A request includes the endpoint URL, method name, params object, and JSON-RPC metadata:

```json
{
  "jsonrpc": "2.0",
  "method": "ankr_getBlocks",
  "params": {
    "blockchain": "eth",
    "fromBlock": 19000000,
    "toBlock": 19000010
  },
  "id": 1
}
```

Successful responses include a `result` object. Failed responses include an `error` object with details, so clients should inspect the response body before treating a request as successful.

---

## Methods

* [`ankr_getBlocks`](/api-reference/advanced-api/api-endpoints/query-api/ankr-get-blocks): retrieves indexed block data for a supported chain and block range. Use it to inspect block metadata without querying each block individually.
* [`ankr_getInteractions`](/api-reference/advanced-api/api-endpoints/query-api/ankr-get-interactions): retrieves blockchain interactions for a wallet address. Use it to identify which chains or contracts an address has interacted with.
* [`ankr_getLogs`](/api-reference/advanced-api/api-endpoints/query-api/ankr-get-logs): retrieves logs for a supported chain and block range. Use it to build event-driven dashboards, index contract activity, or inspect historical logs.
* [`ankr_getTransactionsByHash`](/api-reference/advanced-api/api-endpoints/query-api/ankr-get-transactions-by-hash): retrieves transaction details for one or more transaction hashes. Use it to enrich transaction views or reconcile onchain activity.