{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/karma-domains/main/json-schema/karma-domains-whois-lookup-result-schema-schema.json",
  "title": "WhoisLookupResultSchema",
  "description": "Structured WHOIS/RDAP result for a single domain",
  "x-generated": "2026-10-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/karma-domains-openapi.json#/components/schemas/WhoisLookupResultSchema",
  "properties": {
    "domain": {
      "type": "string",
      "title": "Domain",
      "description": "Normalized domain name"
    },
    "domain_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Domain Status",
      "description": "Registered | Available | Reserved | Unknown"
    },
    "created_ts": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created Ts",
      "description": "Creation unix timestamp (seconds)"
    },
    "updated_ts": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated Ts",
      "description": "Last updated unix timestamp (seconds)"
    },
    "expires_ts": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires Ts",
      "description": "Expiration unix timestamp (seconds)"
    },
    "status": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Status",
      "description": "EPP / registry status codes"
    },
    "name_servers": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Name Servers",
      "description": "Authoritative nameservers"
    },
    "dnssec": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Dnssec",
      "description": "DNSSEC status when known"
    },
    "registrar": {
      "$ref": "#/$defs/WhoisRegistrarSchema",
      "description": "Registrar information"
    },
    "contacts": {
      "$ref": "#/$defs/WhoisContactsSchema",
      "description": "Contact roles"
    },
    "privacy_masked": {
      "type": "boolean",
      "title": "Privacy Masked",
      "description": "True when contact data looks privacy-protected or redacted",
      "default": false
    },
    "raw": {
      "$ref": "#/$defs/WhoisRawSchema",
      "description": "Raw WHOIS text and RDAP JSON"
    }
  },
  "type": "object",
  "required": [
    "domain"
  ],
  "$defs": {
    "WhoisContactSchema": {
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "Contact name"
        },
        "organization": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Organization",
          "description": "Organization"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email",
          "description": "Email address"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone",
          "description": "Phone number"
        },
        "fax": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fax",
          "description": "Fax number"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address",
          "description": "Street address"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City",
          "description": "City"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "State",
          "description": "State / province"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code",
          "description": "Postal / ZIP code"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country",
          "description": "Country"
        }
      },
      "type": "object",
      "title": "WhoisContactSchema",
      "description": "Single WHOIS contact role (registrant / admin / tech / billing)"
    },
    "WhoisContactsSchema": {
      "properties": {
        "registrant": {
          "anyOf": [
            {
              "$ref": "#/$defs/WhoisContactSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "administrative": {
          "anyOf": [
            {
              "$ref": "#/$defs/WhoisContactSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "technical": {
          "anyOf": [
            {
              "$ref": "#/$defs/WhoisContactSchema"
            },
            {
              "type": "null"
            }
          ]
        },
        "billing": {
          "anyOf": [
            {
              "$ref": "#/$defs/WhoisContactSchema"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "WhoisContactsSchema",
      "description": "Contact roles present in the record"
    },
    "WhoisRawSchema": {
      "properties": {
        "whois_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Whois Text",
          "description": "Raw WHOIS response text"
        },
        "rdap": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Rdap",
          "description": "Parsed RDAP JSON object when available"
        }
      },
      "type": "object",
      "title": "WhoisRawSchema",
      "description": "Raw WHOIS text and RDAP JSON for power users"
    },
    "WhoisRegistrarSchema": {
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "Registrar name"
        },
        "iana_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Iana Id",
          "description": "IANA registrar ID"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "Registrar website URL"
        },
        "abuse_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Abuse Email",
          "description": "Abuse contact email"
        },
        "abuse_phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Abuse Phone",
          "description": "Abuse contact phone"
        },
        "whois_server": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Whois Server",
          "description": "Registrar WHOIS server"
        }
      },
      "type": "object",
      "title": "WhoisRegistrarSchema",
      "description": "Registrar block for WHOIS lookup"
    }
  }
}