{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/domani-run/json-schema/domani-run-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/domani-run-openapi.json#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "available": {
      "type": "boolean",
      "description": "Whether the domain is available for registration"
    },
    "domain": {
      "type": "string",
      "description": "Full domain name including TLD"
    },
    "price": {
      "type": "number",
      "description": "Registration price in the specified currency. 0 when Domani does not sell the extension, or for a name outside public DNS (`tld_kind` `alt_root`): such a name was not checked, and `reason` says why."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code (always USD)"
    },
    "error": {
      "type": "boolean",
      "description": "True if RDAP lookup failed (availability unknown)"
    },
    "for_sale": {
      "type": "object",
      "description": "Present when the domain is listed for sale (either on Domani marketplace or detected on an external aftermarket)",
      "properties": {
        "price": {
          "type": "number",
          "description": "Listed sale price in USD"
        },
        "currency": {
          "type": "string",
          "description": "Price currency (always USD)"
        },
        "source": {
          "type": "string",
          "description": "Where the listing originates: 'domani' for Domani marketplace, or aftermarket name (e.g. 'Sedo', 'Afternic')"
        },
        "buyable": {
          "type": "boolean",
          "description": "Whether the domain can be purchased directly via the Domani API. true for Domani listings, false for external aftermarket and for a name outside public DNS (`tld_kind` `alt_root`)"
        },
        "url": {
          "type": "string",
          "description": "Direct link to external aftermarket listing (only present for external sources)"
        },
        "description": {
          "type": "string",
          "description": "Listing description (Domani marketplace listings only)"
        }
      },
      "required": [
        "price",
        "currency",
        "source",
        "buyable"
      ]
    },
    "tld_kind": {
      "type": "string",
      "enum": [
        "tld",
        "second_level",
        "alt_root"
      ],
      "description": "Root-zone kind of the domain's suffix: `tld`, `second_level`, or `alt_root`. An `alt_root` domain is outside the IANA root zone and does not resolve in public DNS: it is not checked, and `reason` says why."
    },
    "registry_status": {
      "type": "string",
      "enum": [
        "premium",
        "reserved"
      ],
      "description": "Set when the registry holds back a name that RDAP calls unregistered: `premium` (the registry sets its own price, see `registry_price`) or `reserved` (it cannot be registered). Such a result is `available: false`, since `POST /api/domains/buy` cannot register it, and `reason` says why."
    },
    "registry_price": {
      "type": "number",
      "description": "Present on `premium` results when the registrar quoted it: the registry's first-year price in USD. `price` stays the TLD's standard price, which does not apply to this name."
    },
    "renewal_price": {
      "type": "number",
      "description": "What each year after the first costs, in USD, at the registrar that would register the name: what renewing it is billed. Absent when unknown. On a `premium` result it is, like `price`, the TLD's standard price."
    },
    "reason": {
      "type": "string",
      "description": "Why the domain is not offered: a name outside public DNS (`tld_kind` `alt_root`), an extension Domani does not sell (`price` 0; `GET /api/tlds` lists the ones it sells), a name the registry holds back (`registry_status`), or, with `q`, a first-year price above `max_price` (the name was not checked)."
    }
  },
  "required": [
    "available",
    "domain",
    "price",
    "currency"
  ]
}