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

# Check Availability

> Checks the availability of one or more domains. The search term is combined with the specified TLDs.



## OpenAPI

````yaml api-reference/openapi.json post /domains/lookup
openapi: 3.1.0
info:
  title: Domains Reseller API
  description: >-
    Domain name management API for resellers. Manage domains, renewals, billing,
    and other domain-related operations.
  version: 2.4.1
servers:
  - url: https://vicem.com/modules/addons/DomainsReseller/api/index.php
    description: Production server
security: []
paths:
  /domains/lookup:
    post:
      tags:
        - Domains
      summary: Check Availability
      description: >-
        Checks the availability of one or more domains. The search term is
        combined with the specified TLDs.
      operationId: checkDomainAvailability
      parameters:
        - $ref: '#/components/parameters/UsernameHeader'
        - $ref: '#/components/parameters/TokenHeader'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                searchTerm:
                  type: string
                  description: >-
                    Search term (e.g. 'example'). Use either searchTerm or
                    punyCodeSearchTerm.
                  example: example
                punyCodeSearchTerm:
                  type: string
                  description: >-
                    Punycode search term for internationalized domain names
                    (IDN). Takes priority over searchTerm if both are provided.
                tldsToInclude:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of TLDs to check. Format: `.extension` (with leading
                    dot, e.g. `.com`, `.net`). If empty, uses the group's
                    default TLDs.
                  example:
                    - .com
                    - .net
                isIdnDomain:
                  type: boolean
                  description: >-
                    Indicates whether the domain is an IDN (Internationalized
                    Domain Name)
                premiumEnabled:
                  type: boolean
                  description: Enable premium domain search
      responses:
        '200':
          description: Success - Returns domain availability results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DomainLookupResult'
        '400':
          description: Parameter validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    UsernameHeader:
      name: username
      in: header
      required: true
      description: Reseller email address registered in WHMCS
      schema:
        type: string
        format: email
        example: reseller@example.com
    TokenHeader:
      name: token
      in: header
      required: true
      description: >-
        HMAC-SHA256 authentication token.


        PHP formula: `base64_encode(hash_hmac('sha256', $apiKey, $email . ':' .
        gmdate('y-m-d H')))`


        **Important**: `hash_hmac` **without** the 3rd parameter `true` (returns
        hex, not binary), then `base64_encode` of the hex result. The token is
        88 characters long.


        An optional `timestamp` header (Unix timestamp, 60-second tolerance) can
        be sent to synchronize time.
      schema:
        type: string
        example: YTk4YjRmNjI...
  schemas:
    DomainLookupResult:
      type: object
      properties:
        domainName:
          type: string
          description: Full domain name
          example: example.com
        idnDomainName:
          type: string
          description: IDN domain name
        tld:
          type: string
          description: TLD without dot
          example: com
        tldNoDots:
          type: string
          description: TLD without dot
        sld:
          type: string
          description: Second Level Domain
          example: example
        idnSld:
          type: string
          description: IDN Second Level Domain
        status:
          type: string
          description: Availability status
          example: available for registration
        legacyStatus:
          type: string
          description: Legacy status (available/unavailable)
          example: available
        score:
          type: number
          description: Relevance score
        isRegistered:
          type: boolean
          description: Whether the domain is registered
        isAvailable:
          type: boolean
          description: Whether the domain is available
        isValidDomain:
          type: boolean
          description: Whether the domain is valid
        domainErrorMessage:
          type: string
          description: Error message if any
        pricing:
          type: object
          description: Pricing per period
        shortestPeriod:
          type: object
          description: Shortest available period
        group:
          type: string
          description: Domain group
        minLength:
          type: integer
          description: Minimum domain length
        maxLength:
          type: integer
          description: Maximum domain length
        isPremium:
          type: boolean
          description: Whether the domain is premium
        premiumCostPricing:
          type: array
          items: {}
          description: Premium domain pricing if applicable
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      example:
        error: Invalid API Token provided

````