{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cheapest-domains/json-schema/cheapest-domains-popularity-schema.json",
  "title": "Popularity",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cheapest-domains-openapi.json#/components/schemas/Popularity",
  "type": "object",
  "required": [
    "service",
    "apiVersion",
    "domain",
    "status",
    "reason",
    "message",
    "rank",
    "bucket",
    "reportedBucket",
    "categories",
    "topLocations",
    "dataPeriod",
    "fetchedAt",
    "expiresAt",
    "source",
    "limits"
  ],
  "properties": {
    "service": {
      "$ref": "#/$defs/ServiceInformation"
    },
    "apiVersion": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ranked",
        "not_listed",
        "unknown"
      ]
    },
    "reason": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "rank": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 100,
      "description": "Exact global DNS popularity rank, only for the top 100. Not a Google rank."
    },
    "reportedBucket": {
      "type": [
        "string",
        "null"
      ],
      "description": "Provider bucket as supplied, including lower-bound markers such as >200000. A lower bound is not an exact rank or proof of traffic."
    },
    "bucket": {
      "type": [
        "integer",
        "null"
      ],
      "enum": [
        null,
        200,
        500,
        1000,
        2000,
        5000,
        10000,
        20000,
        50000,
        100000,
        200000,
        500000,
        1000000
      ],
      "description": "Top-N popularity group, without an exact position inside it. Null does not mean zero competition."
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "topLocations": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "code",
          "name",
          "rank"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rank": {
            "type": "integer",
            "minimum": 1
          }
        }
      }
    },
    "dataPeriod": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "fetchedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Six-hour application cache expiry, not the dataset publication date."
    },
    "source": {
      "type": "object",
      "required": [
        "id",
        "name",
        "url",
        "documentation",
        "license",
        "licenseUrl",
        "attribution"
      ],
      "properties": {
        "id": {
          "const": "cloudflare-radar"
        },
        "name": {
          "const": "Cloudflare Radar"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "documentation": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "const": "CC BY-NC 4.0"
        },
        "licenseUrl": {
          "const": "https://creativecommons.org/licenses/by-nc/4.0/"
        },
        "attribution": {
          "type": "string"
        }
      }
    },
    "limits": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "ServiceInformation": {
      "type": "object",
      "required": [
        "name",
        "url",
        "setupUrl",
        "pluginUrl"
      ],
      "description": "Cheapest Domains identity and optional setup links, separate from upstream evidence. Does not establish client installation or provider health.",
      "properties": {
        "name": {
          "const": "Cheapest Domains"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "setupUrl": {
          "type": "string",
          "format": "uri"
        },
        "pluginUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}