> For the complete documentation index, see [llms.txt](https://docs.suins.io/llms.txt)

Use the `SuinsClient` that you previously created to query onchain data.

## Query a name record

You can query a name record's latest state by calling the `getNameRecord` method on the `SuinsClient` instance.

```js
const nameRecord = await suinsClient.getNameRecord('demo.sui');
console.log(nameRecord);

// Example output
// {
//   name: 'demo.sui',
//   nftId: '0xMyNftId',
//   targetAddress: '0xTargetAddress',
//   expirationTimestampMs: '1746018571863',
//   data: {
//      avatar: '0xAvatarObjectId',
//      contentHash: 'content',
//      walrusSiteId: '0xWalrusSiteId',
//   },
//   avatar: '0xAvatarObjectId',
//   contentHash: 'content',
//   walrusSiteId: '0xWalrusSiteId',
// }
```

## Query active pricing

Call the `getPriceList` method on the `SuinsClient` instance to query the active names price list.

```js
const priceList = await suinsClient.getPriceList();
console.log(priceList);

// ([domain_length_from, domain_length_to]: price. Prices are in USDC MIST; 1 USDC = 1_000_000 MIST)
// Example output:
// {
// 	[ 3, 3 ] => 500000000,
// 	[ 4, 4 ] => 100000000,
// 	[ 5, 63 ] => 20000000
// }
```

## Query active renewal pricing

Call the `getRenewalPricelist` method on the `SuinsClient` instance to query the active renewal price list.

```js
const renewalPriceList = await suinsClient.getRenewalPricelist();
console.log(renewalPriceList);

// ([domain_length_from, domain_length_to]: price. Prices are in USDC MIST; 1 USDC = 1_000_000 MIST)
// Example output:
// {
// 	[ 3, 3 ] => 500000000,
// 	[ 4, 4 ] => 100000000,
// 	[ 5, 63 ] => 20000000
// }
```