> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# getPrimaryDomain

> Returns the primary .sol domain for a wallet (Solscan-style favourite domain). Resolves in a single RPC call instead of chaining getAccountInfo / getMultipleAccounts.

<Tip>
  **⚡ Powered by Solana Ridge DB**

  Resolve a wallet's primary `.sol` domain (Solscan-style favourite domain) in a single RPC call. Returns the display name with `.sol` suffix, or `null` if no primary domain is set or the favourite is no longer owned.

  Replaces the need to chain `getAccountInfo` and `getMultipleAccounts` for SNS resolution.
</Tip>

<Note>
  This method costs **1 credit** per call.
</Note>


## OpenAPI

````yaml getprimarydomain post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getPrimaryDomain
      description: >-
        Returns the primary .sol domain for a wallet (Solscan-style favourite
        domain). Resolves in a single RPC call instead of chaining
        getAccountInfo / getMultipleAccounts.
      operationId: getprimarydomain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                  description: The JSON-RPC protocol version.
                id:
                  type: string
                  example: '1'
                  default: '1'
                  description: A unique identifier for the request.
                method:
                  type: string
                  enum:
                    - getPrimaryDomain
                  example: getPrimaryDomain
                  default: getPrimaryDomain
                  description: The name of the RPC method to invoke.
                params:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                    description: Wallet public key.
                    example: 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
            examples:
              default:
                summary: Primary domain for wallet
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getPrimaryDomain
                  params:
                    - 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: object
                    properties:
                      context:
                        type: object
                        properties:
                          slot:
                            type: integer
                            example: 423867852
                          apiVersion:
                            type: string
                            example: 3.0.0
                      value:
                        type: object
                        properties:
                          wallet:
                            type: string
                          domain:
                            type: string
                            nullable: true
                            description: >-
                              Primary .sol domain, or null if none is set or no
                              longer owned.
              examples:
                found:
                  summary: Domain found
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 423867852
                        apiVersion: 3.0.0
                      value:
                        wallet: 9aoUCn5J4sxhvYERCVwVnakPQxyXTHQVXe86CUJYxY8p
                        domain: solanatracker.sol
                notFound:
                  summary: No domain
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 423867852
                        apiVersion: 3.0.0
                      value:
                        wallet: FMmaHPDL47V1gXsfh9WjgAT7Er3dfDvarQubTU1Jxc1r
                        domain: null
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
        '401':
          description: Unauthorized - Invalid or missing API key.
        '429':
          description: Too Many Requests - Rate limit exceeded.
        '503':
          description: Service Unavailable - The server is temporarily unavailable.
        '504':
          description: Gateway Timeout - The request timed out.
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````