{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/$defs/FullResponse",
  "$defs": {
    "FullResponse": {
      "type": "object",
      "properties": {
        "ip": {
          "type": "string"
        },
        "hostname": {
          "type": "string"
        },
        "network": {
          "$ref": "#/$defs/Network"
        },
        "organization": {
          "$ref": "#/$defs/Organization"
        },
        "asn": {
          "$ref": "#/$defs/ASN"
        },
        "connection": {
          "$ref": "#/$defs/Connection"
        },
        "abuse_contact": {
          "$ref": "#/$defs/AbuseContact"
        },
        "datacenter": {
          "$ref": "#/$defs/Datacenter"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Service"
          }
        },
        "location": {
          "$ref": "#/$defs/Location"
        },
        "registered_country": {
          "$ref": "#/$defs/RegisteredCountry"
        },
        "is_bogon": {
          "type": "boolean"
        },
        "is_datacenter": {
          "type": "boolean"
        },
        "is_anycast": {
          "type": "boolean"
        },
        "is_tor": {
          "type": "boolean"
        },
        "is_proxy": {
          "type": "boolean"
        },
        "is_vpn": {
          "type": "boolean"
        },
        "is_abuser": {
          "type": "boolean"
        },
        "is_mobile": {
          "type": "boolean"
        },
        "is_satellite": {
          "type": "boolean"
        },
        "is_crawler": {
          "type": "boolean"
        },
        "is_relay": {
          "type": "boolean"
        },
        "is_anonymous": {
          "type": "boolean"
        },
        "anonymous": {
          "$ref": "#/$defs/Anonymous"
        },
        "ip_risk": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 99
        },
        "ip_risk_reasons": {
          "type": "array",
          "items": {
            "enum": [
              "TOR_EXIT",
              "ANONYMOUS_VPN",
              "PUBLIC_PROXY",
              "PRIVACY_RELAY",
              "BLOCKLISTED_IP",
              "ABUSIVE_NETWORK",
              "ABUSIVE_ASN",
              "HOSTING_PROVIDER"
            ]
          }
        },
        "crawler": {
          "$ref": "#/$defs/Crawler"
        },
        "elapsed_ms": {
          "type": "number",
          "minimum": 0
        }
      },
      "required": [
        "ip",
        "services",
        "anonymous",
        "ip_risk",
        "ip_risk_reasons",
        "is_bogon",
        "is_datacenter",
        "is_anycast",
        "is_tor",
        "is_proxy",
        "is_vpn",
        "is_abuser",
        "is_mobile",
        "is_satellite",
        "is_crawler",
        "is_relay",
        "is_anonymous"
      ],
      "additionalProperties": false
    },
    "Network": {
      "type": "object",
      "properties": {
        "cidr": {
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "allocation",
                "assignment",
                "reallocation",
                "reassignment",
                "legacy"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "rir": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "rdap_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "abuse_score": {
          "anyOf": [
            {
              "$ref": "#/$defs/AbuseScore"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "cidr",
        "name",
        "type",
        "rir",
        "country_code",
        "rdap_url",
        "abuse_score"
      ],
      "additionalProperties": false
    },
    "AbuseScore": {
      "type": "object",
      "properties": {
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "level": {
          "enum": [
            "low",
            "medium",
            "high"
          ]
        }
      },
      "required": [
        "score",
        "level"
      ],
      "additionalProperties": false
    },
    "Organization": {
      "type": "object",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "name",
        "domain"
      ],
      "additionalProperties": false
    },
    "ASN": {
      "type": "object",
      "properties": {
        "number": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "route": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "rir": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "normalized_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "hosting",
                "isp",
                "education",
                "government",
                "business"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "last_changed": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "active": {
          "type": "boolean"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "abuse_score": {
          "$ref": "#/$defs/AbuseScore"
        }
      },
      "required": [
        "number",
        "name",
        "domain",
        "country_code",
        "route",
        "rir",
        "type",
        "normalized_type",
        "last_changed",
        "active",
        "updated_at",
        "abuse_score"
      ],
      "additionalProperties": false
    },
    "Connection": {
      "type": "object",
      "properties": {
        "isp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "connection_type": {
          "anyOf": [
            {
              "enum": [
                "Cable/DSL",
                "Cellular",
                "Corporate",
                "Satellite"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "user_type": {
          "anyOf": [
            {
              "enum": [
                "business",
                "cellular",
                "college",
                "consumer_privacy_network",
                "content_delivery_network",
                "government",
                "hosting",
                "library",
                "military",
                "residential",
                "school",
                "search_engine_spider",
                "traveler"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mobile_country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{3}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "mobile_network_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{2,3}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "isp",
        "connection_type",
        "user_type",
        "domain",
        "mobile_country_code",
        "mobile_network_code"
      ],
      "additionalProperties": false
    },
    "AbuseContact": {
      "type": "object",
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "emails": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "phones": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "name",
        "address",
        "country_code",
        "email",
        "emails",
        "phone",
        "phones"
      ],
      "additionalProperties": false
    },
    "Datacenter": {
      "type": "object",
      "properties": {
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "network": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "provider",
        "domain",
        "network",
        "country_code",
        "region",
        "city"
      ],
      "additionalProperties": false
    },
    "Service": {
      "type": "object",
      "properties": {
        "kind": {
          "enum": [
            "vpn",
            "proxy",
            "platform_egress"
          ]
        },
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "confidence": {
          "type": "string"
        },
        "last_seen": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit": {
          "$ref": "#/$defs/ServiceExit"
        }
      },
      "required": [
        "kind",
        "provider",
        "url",
        "role",
        "confidence",
        "last_seen",
        "exit"
      ],
      "additionalProperties": false
    },
    "ServiceExit": {
      "type": "object",
      "properties": {
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "region",
        "country_code",
        "city",
        "latitude",
        "longitude"
      ],
      "additionalProperties": false
    },
    "Location": {
      "type": "object",
      "properties": {
        "last_changed": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "continent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "continent_code": {
          "anyOf": [
            {
              "enum": [
                "AF",
                "AN",
                "AS",
                "EU",
                "NA",
                "OC",
                "SA"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "continent_geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "continent_names": {
          "$ref": "#/$defs/Names"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "country_names": {
          "$ref": "#/$defs/Names"
        },
        "country_confidence": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 99
            },
            {
              "type": "null"
            }
          ]
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region_code_raw": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,3}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "region_geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "subdivisions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Subdivision"
          }
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "city_geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "city_names": {
          "$ref": "#/$defs/Names"
        },
        "city_confidence": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 99
            },
            {
              "type": "null"
            }
          ]
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            {
              "type": "null"
            }
          ]
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            },
            {
              "type": "null"
            }
          ]
        },
        "accuracy_radius": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            {
              "type": "null"
            }
          ]
        },
        "zip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "local_time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "local_time_unix": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_dst": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "utcoffset": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_eu_member": {
          "type": "boolean"
        },
        "calling_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "currency_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "precision": {
          "enum": [
            "street",
            "city",
            "region",
            "country"
          ]
        },
        "basis": {
          "enum": [
            "operator_geofeed",
            "active_measurement",
            "geolocation_database",
            "registry_allocation"
          ]
        }
      },
      "required": [
        "last_changed",
        "continent",
        "continent_code",
        "continent_geoname_id",
        "continent_names",
        "country",
        "country_code",
        "country_geoname_id",
        "country_names",
        "country_confidence",
        "state",
        "region_code_raw",
        "region_code",
        "region_geoname_id",
        "subdivisions",
        "city",
        "city_geoname_id",
        "city_names",
        "city_confidence",
        "latitude",
        "longitude",
        "accuracy_radius",
        "zip",
        "timezone",
        "local_time",
        "local_time_unix",
        "is_dst",
        "utcoffset",
        "is_eu_member",
        "calling_code",
        "currency_code",
        "precision",
        "basis"
      ],
      "additionalProperties": false
    },
    "Names": {
      "type": "object",
      "properties": {
        "de": {
          "type": "string"
        },
        "en": {
          "type": "string"
        },
        "es": {
          "type": "string"
        },
        "fr": {
          "type": "string"
        },
        "ja": {
          "type": "string"
        },
        "pt-BR": {
          "type": "string"
        },
        "ru": {
          "type": "string"
        },
        "zh-CN": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Subdivision": {
      "type": "object",
      "properties": {
        "code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,3}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "names": {
          "$ref": "#/$defs/Names"
        },
        "confidence": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 99
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "code",
        "name",
        "geoname_id",
        "names",
        "confidence"
      ],
      "additionalProperties": false
    },
    "RegisteredCountry": {
      "type": "object",
      "properties": {
        "country_code": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "geoname_id": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "is_eu_member": {
          "type": "boolean"
        },
        "names": {
          "$ref": "#/$defs/Names"
        }
      },
      "required": [
        "country_code",
        "country",
        "geoname_id",
        "is_eu_member",
        "names"
      ],
      "additionalProperties": false
    },
    "Anonymous": {
      "type": "object",
      "properties": {
        "is_vpn": {
          "type": "boolean"
        },
        "is_proxy": {
          "type": "boolean"
        },
        "is_tor": {
          "type": "boolean"
        },
        "is_relay": {
          "type": "boolean"
        },
        "is_hosting": {
          "type": "boolean"
        },
        "provider_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "network_last_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "confidence": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 99
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "is_vpn",
        "is_proxy",
        "is_tor",
        "is_relay",
        "is_hosting",
        "provider_name",
        "network_last_seen",
        "confidence"
      ],
      "additionalProperties": false
    },
    "Crawler": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  }
}
