# How to make queries with parameters · Chromia Docs (concept)

> This recipe demonstrates how to perform queries with parameters using the postchain-client against a Chromia blockchain.

Source: https://docs.chromia.com/build/cookbook/query-creation/make-query/

# How to make queries with parameters

On this page

* [Prerequisites](#prerequisites)
* [Demo script](#demo-script)
* [Key Features](#key-features)
* [Common Query Examples](#common-query-examples)
* [Parameter Types](#parameter-types)
* [Learn more](#learn-more)

This recipe demonstrates how to perform queries with parameters using the `postchain-client` against a Chromia
blockchain. This is the fundamental pattern for retrieving data from blockchain queries.

JS/TS client

## Prerequisites

* **Node.js**
* **Postchain client:** `npm install postchain-client`

## Demo script

* [Make query demo](https://bitbucket.org/chromawallet/recipes/src/main/make_query/)

## Key Features

This recipe includes examples for:

* **Parameterized queries** - Using the `client.query()` method with custom parameters
* **Buffer handling** - Working with hex-encoded Buffer parameters for blockchain data
* **Query configuration** - Adapting query names and parameters for different blockchains
* **Result handling** - Processing and displaying query results

## Common Query Examples

This pattern works for various blockchain queries:

* **Account balances** - `get_balance` with account ID parameter
* **Transaction history** - Query transactions for specific accounts
* **Asset information** - Retrieve details about blockchain assets
* **Custom dapp queries** - Any query defined in your dapp's Rell code

## Parameter Types

Queries can accept various parameter types:

* **Buffer/Hex data** - Account IDs, transaction IDs, asset IDs
* **Strings** - Text-based identifiers or search terms
* **Numbers** - Amounts, timestamps, pagination limits
* **Objects** - Complex structured data for advanced queries

## Learn more

* [JavaScript/TypeScript client](https://docs.chromia.com/build/clients/postchain-clients/javascript-typescript/reference/) — covers setup, connection,
  and usage patterns.
* [Rell language](https://docs.chromia.com/rell/rell-intro/) — understanding how to create custom queries in your dapp.

[View this page on docs.chromia.com](https://docs.chromia.com/build/cookbook/query-creation/make-query/)Content mirrored from the live docs
