{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-top-ips-body-schema.json",
  "title": "TopIPsBody",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-stats-api-openapi.yml#/components/schemas/TopIPsBody",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "ips": {
      "description": "The ranked addresses, up to the requested limit per address family.",
      "items": {
        "$ref": "#/$defs/TopIPResult"
      },
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "ips"
  ],
  "type": "object",
  "$defs": {
    "TopIPResult": {
      "additionalProperties": false,
      "properties": {
        "first_seen": {
          "description": "Date the address was first observed in glue records. Absent when it was already present when tracking began.",
          "format": "date-time",
          "type": "string"
        },
        "ip": {
          "description": "IP address in canonical string form.",
          "type": "string"
        },
        "last_seen": {
          "description": "Date the address was last observed in glue records. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "ns_count": {
          "description": "Number of nameservers currently resolving to the address, leaving out zones we have not received in over six months (stale on /zones): the live count, which results are ranked by (most-used first).",
          "format": "int64",
          "type": "integer"
        },
        "stale_ns_count": {
          "description": "Number of nameservers resolving to the address in zones we have not received in over six months. They are left out of ns_count; ns_count + stale_ns_count is every current glue record.",
          "format": "int64",
          "type": "integer"
        },
        "version": {
          "description": "IP version: 4 or 6.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "ip",
        "version",
        "ns_count",
        "stale_ns_count"
      ],
      "type": "object"
    }
  }
}