# Name service

> Sui gRPC NameService API reference

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

The `NameService` provides methods for resolving SuiNS names to addresses and vice versa.

## LookupName

Resolves a SuiNS name to its record, including the associated address.

**Request**:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The SuiNS name to look up (e.g., `example.sui`) |

**Response**:

| Field | Type | Description |
| --- | --- | --- |
| `record` | NameRecord | The name record including the resolved address |

```bash cURL
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/name_service.proto \
  -d '{"name": "example.sui"}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.NameService/LookupName
```

***

## ReverseLookupName

Resolves an address to its SuiNS name.

**Request**:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string | Yes | The address to reverse-lookup |

**Response**:

| Field | Type | Description |
| --- | --- | --- |
| `record` | NameRecord | The name record for the address |

```bash cURL
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/name_service.proto \
  -d '{"address": "0xYOUR_ADDRESS"}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.NameService/ReverseLookupName
```