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

# Query subnames

> Searches for subnames matching the provided criteria.



## OpenAPI

````yaml /openapi/offchain-openapi.json POST /api/v1/subnames/search
openapi: 3.0.0
info:
  title: Offchain Subnames API
  description: >-
    API for managing offchain subnames. Provides endpoints for authentication,
    subname management, and statistics.
  version: 1.0.0
  contact:
    name: Namespace
    url: https://namespace.ninja
    email: cap@namespace.ninja
  termsOfService: https://namespace.ninja/tos
servers:
  - url: https://offchain-manager.namespace.ninja
    description: Production
  - url: https://staging.offchain-manager.namespace.ninja
    description: Staging
security: []
tags:
  - name: Subnames
    description: ''
paths:
  /api/v1/subnames/search:
    post:
      tags:
        - Subnames
      summary: Query subnames
      description: Searches for subnames matching the provided criteria.
      operationId: SubnameNodeController_querySubnames
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuerySubnamesRequest'
            examples:
              minimal:
                summary: Minimal example
                value:
                  parentName: oppunk.eth
                  labelSearch: alice
      responses:
        '200':
          description: Paged list of matching subnames
          content:
            application/json:
              schema:
                example:
                  items:
                    - id: '123'
                      fullName: alice.oppunk.eth
                      parentName: oppunk.eth
                      label: alice
                  page: 1
                  size: 25
                  totalItems: 1
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                example:
                  statusCode: 400
                  message: >-
                    Validation failed: parentName or parentNames must be
                    provided
                  error: Bad Request
        '500':
          description: Unexpected error
components:
  schemas:
    QuerySubnamesRequest:
      type: object
      properties:
        parentName:
          type: string
          description: Subname parent name
          example: oppunk.eth
        parentNames:
          description: List of subname parent names
          example:
            - oppunk.eth
            - example.eth
          type: array
          items:
            type: string
        labelSearch:
          type: string
          description: Search subnames by label
          example: alice
        page:
          type: number
          description: Current page. Defaults to 1
          example: 1
        size:
          type: number
          description: Page size. Defaults to 25
          example: 25
        owner:
          type: string
          description: Search by subname ownership
          example: 0x1234...abcd
        metadata:
          type: object
          description: Search by metadata properties
          example:
            role: admin
            verified: 'true'
      required:
        - parentName

````