---
title: QueryService
description: QueryService defines unary RPCs for accessing blockchain data.
source_url:
  html: https://thru.org/docs/api-ref/grpc/services/query-service/
  md: https://thru.org/docs/api-ref/grpc/services/query-service.md
---

# QueryService

QueryService defines unary RPCs for accessing blockchain data.

**Package:** `thru.services.v1`

## RPCs

### `GetHeight`

Get block heights

- **Request:** [`GetHeightRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-height-request.md)
- **Response:** [`GetHeightResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-height-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetHeight`) with request body:

```json
{}
```

### `GetChainInfo`

Get chain-level information including chain ID.

- **Request:** [`GetChainInfoRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-chain-info-request.md)
- **Response:** [`GetChainInfoResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-chain-info-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetChainInfo`) with request body:

```json
{}
```

### `GetAccount`

Get account information.

- **Request:** [`GetAccountRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-account-request.md)
- **Response:** [`thru.core.v1.Account`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/account.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetAccount`) with request body:

```json
{
"address": { "value": "tz1X8LkZq4SVPGH0Jrb9B8yeOPKfTOMJ/rSbs70D5XU=" }
}
```

### `GetRawAccount`

Get account raw bytes.

- **Request:** [`GetRawAccountRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-raw-account-request.md)
- **Response:** [`thru.core.v1.RawAccount`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/raw-account.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetRawAccount`) with request body:

```json
{
"address": { "value": "tz1X8LkZq4SVPGH0Jrb9B8yeOPKfTOMJ/rSbs70D5XU=" }
}
```

### `GetTransaction`

Get transaction by signature.

- **Request:** [`GetTransactionRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-transaction-request.md)
- **Response:** [`thru.core.v1.Transaction`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/transaction.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetTransaction`) with request body:

```json
{
"signature": { "value": "2Jqjbuct1yuDSIsJJlol3NG1MvvBtsiETcSXopHFOPC7QaD0DnqBbUceMnCxd8ItFrQFOK1iLXDFl0w2GYZlDw==" }
}
```

### `GetRawTransaction`

Get raw transaction by signature.

- **Request:** [`GetRawTransactionRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-raw-transaction-request.md)
- **Response:** [`thru.core.v1.RawTransaction`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/raw-transaction.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetRawTransaction`) with request body:

```json
{
"signature": { "value": "2Jqjbuct1yuDSIsJJlol3NG1MvvBtsiETcSXopHFOPC7QaD0DnqBbUceMnCxd8ItFrQFOK1iLXDFl0w2GYZlDw==" }
}
```

### `GetBlock`

Get block by slot or hash.

- **Request:** [`GetBlockRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-block-request.md)
- **Response:** [`thru.core.v1.Block`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/block.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetBlock`) with request body:

```json
{
"slot": "80200"
}
```

### `GetRawBlock`

Get raw block bytes.

- **Request:** [`GetRawBlockRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-raw-block-request.md)
- **Response:** [`thru.core.v1.RawBlock`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/raw-block.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetRawBlock`) with request body:

```json
{
"slot": "80200"
}
```

### `ListAccounts`

List accounts using CEL-based filtering.

- **Request:** [`ListAccountsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-accounts-request.md)
- **Response:** [`ListAccountsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-accounts-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListAccounts`) with request body:

```json
{
"filter": { "expression": "account.meta.balance > uint(0)" },
"page": { "pageSize": 5 }
}
```

### `ListBlocks`

List blocks using pagination and filtering. By default returns blocks ordered from latest slot to the first one.

- **Request:** [`ListBlocksRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-blocks-request.md)
- **Response:** [`ListBlocksResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-blocks-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListBlocks`) with request body:

```json
{
"page": { "pageSize": 5 }
}
```

### `ListTransactionsForAccount`

List executed transaction signatures involving an account.

- **Request:** [`ListTransactionsForAccountRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-for-account-request.md)
- **Response:** [`ListTransactionsForAccountResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-for-account-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListTransactionsForAccount`) with request body:

```json
{
"account": { "value": "tz1X8LkZq4SVPGH0Jrb9B8yeOPKfTOMJ/rSbs70D5XU=" },
"page": { "pageSize": 5 }
}
```

### `GetEvent`

Get a specific event by ID.

- **Request:** [`GetEventRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-event-request.md)
- **Response:** [`Event`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/event.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetEvent`) with request body:

```json
{
"eventId": "tse_4tl2wZSKaw5boRQe_JaZuEyNvXKbC5FAOxeUaG3VT3Bo0n1jQQn30TuZMphjB3NDN7jkUaFDSMcAzvNE99CByN:80255:4:0"
}
```

### `ListEvents`

List events with CEL filtering and pagination. Returns events ordered from most recent to older.

- **Request:** [`ListEventsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-events-request.md)
- **Response:** [`ListEventsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-events-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListEvents`) with request body:

```json
{
"page": { "pageSize": 5 }
}
```

### `ListTransactions`

List executed transactions with CEL filtering and pagination. Returns transactions ordered from most recent to older.

- **Request:** [`ListTransactionsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-request.md)
- **Response:** [`ListTransactionsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListTransactions`) with request body:

```json
{
"page": { "pageSize": 5 }
}
```

### `GetTransactionStatus`

Get derived transaction status metadata.

- **Request:** [`GetTransactionStatusRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-transaction-status-request.md)
- **Response:** [`TransactionStatus`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/transaction-status.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetTransactionStatus`) with request body:

```json
{
"signature": { "value": "2Jqjbuct1yuDSIsJJlol3NG1MvvBtsiETcSXopHFOPC7QaD0DnqBbUceMnCxd8ItFrQFOK1iLXDFl0w2GYZlDw==" }
}
```

### `GenerateStateProof`

Generate an account state proof snapshot.

- **Request:** [`GenerateStateProofRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/generate-state-proof-request.md)
- **Response:** [`GenerateStateProofResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/generate-state-proof-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GenerateStateProof`) with request body:

```json
{
"request": {
  "address": { "value": "tz1X8LkZq4SVPGH0Jrb9B8yeOPKfTOMJ/rSbs70D5XU=" },
  "targetSlot": "80200"
}
}
```

### `GetVersion`

Get component version strings.

- **Request:** [`GetVersionRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-version-request.md)
- **Response:** [`GetVersionResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-version-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetVersion`) with request body:

```json
{}
```

### `GetStateRoots`

Get state roots for a range of slots. Used for transaction replay to verify state proofs against historical roots.

- **Request:** [`GetStateRootsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-state-roots-request.md)
- **Response:** [`GetStateRootsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-state-roots-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetStateRoots`) with request body:

```json
{
"slot": "80200"
}
```

### `GetActiveStateHashes`

Get active state hashes for a range of slots.

- **Request:** [`GetActiveStateHashesRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-active-state-hashes-request.md)
- **Response:** [`GetActiveStateHashesResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-active-state-hashes-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetActiveStateHashes`) with request body:

```json
{
"endSlot": "80200",
"startSlot": "80190"
}
```

### `GetSlotMetrics`

Get slot-level metrics including state counters and collected fees.

- **Request:** [`GetSlotMetricsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-slot-metrics-request.md)
- **Response:** [`GetSlotMetricsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-slot-metrics-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetSlotMetrics`) with request body:

```json
{
"slot": "80200"
}
```

### `ListSlotMetrics`

List slot metrics for a range of slots.

- **Request:** [`ListSlotMetricsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-slot-metrics-request.md)
- **Response:** [`ListSlotMetricsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-slot-metrics-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/ListSlotMetrics`) with request body:

```json
{
"startSlot": "80190",
"endSlot": "80200"
}
```

### `GetNodePubkey`

Get the node’s own ED25519 public key.

- **Request:** [`GetNodePubkeyRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-pubkey-request.md)
- **Response:** [`GetNodePubkeyResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-pubkey-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetNodePubkey`) with request body:

```json
{}
```

### `GetNodeRecords`

Get all known node records from the gossip network.

- **Request:** [`GetNodeRecordsRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-records-request.md)
- **Response:** [`GetNodeRecordsResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-records-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetNodeRecords`) with request body:

```json
{}
```

### `GetNodeStatus`

Get the node’s operational status including consensus readiness.

- **Request:** [`GetNodeStatusRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-status-request.md)
- **Response:** [`GetNodeStatusResponse`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/get-node-status-response.md)

**Try it live:** gRPC-Web `POST https://grpc-web.alphanet.thruput.org` (`thru.services.v1.QueryService/GetNodeStatus`) with request body:

```json
{}
```
