{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-child-name-servers-body-schema.json",
  "title": "ChildNameServersBody",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-domains-api-openapi.yml#/components/schemas/ChildNameServersBody",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "active_count": {
      "description": "How many of those child nameservers are currently in use by a domain, address, or zone.",
      "format": "int64",
      "type": "integer"
    },
    "archive_count": {
      "description": "How many of those child nameservers we have seen but that are no longer in use.",
      "format": "int64",
      "type": "integer"
    },
    "count": {
      "description": "Total number of nameservers whose parent registered domain is this domain, active or not.",
      "format": "int64",
      "type": "integer"
    },
    "delegation_count": {
      "description": "Current domain delegations across every active child nameserver, leaving out zones we have not received in over six months: the sum of their live domains_count. This counts (domain, nameserver) pairs, so a domain delegated to two of this domain's nameservers counts twice; it is not a distinct-domain total.",
      "format": "int64",
      "type": "integer"
    },
    "has_more": {
      "description": "True when more child nameservers follow this page; repeat the request with cursor set to next_cursor to fetch them.",
      "type": "boolean"
    },
    "nameservers": {
      "description": "Child nameservers ranked by live domain count (domains_count), most-used first. The ranking is exact for every domain.",
      "items": {
        "$ref": "#/$defs/NameServerSearchResult"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "next_cursor": {
      "description": "Opaque cursor for the next page; pass it back as the cursor parameter. Absent on the last page.",
      "type": "string"
    },
    "stale_delegation_count": {
      "description": "Current domain delegations across the same child nameservers in zones we have not received in over six months: the sum of their stale_domains_count. delegation_count + stale_delegation_count is every current delegation.",
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "count",
    "active_count",
    "archive_count",
    "delegation_count",
    "stale_delegation_count",
    "nameservers",
    "has_more"
  ],
  "type": "object",
  "$defs": {
    "NameServerSearchResult": {
      "additionalProperties": false,
      "properties": {
        "active": {
          "description": "True when the nameserver is currently in use.",
          "type": "boolean"
        },
        "domains_count": {
          "description": "Number of domains using the nameserver, leaving out zones we have not received in over six months (stale on /zones): the live count. Lists are ranked by it, most-used first, unless their description says otherwise.",
          "format": "int64",
          "type": "integer"
        },
        "first_seen": {
          "description": "Date the nameserver was first observed. Absent when it was already present when tracking of its zone began.",
          "format": "date-time",
          "type": "string"
        },
        "last_seen": {
          "description": "Date the nameserver was last observed. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "The nameserver hostname.",
          "type": "string"
        },
        "stale_domains_count": {
          "description": "Number of domains using the nameserver in zones we have not received in over six months. They are left out of domains_count; domains_count + stale_domains_count is every current delegation.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "name",
        "active",
        "domains_count",
        "stale_domains_count"
      ],
      "type": "object"
    }
  }
}