{
  "openapi": "3.1.0",
  "info": {
    "title": "iplover API",
    "version": "1.3.0",
    "summary": "Free IP address, network type and bot verification API. No key.",
    "description": "Free and without a key. Limits per visitor (one IPv4 address or one IPv6 /64): 30 requests a minute per endpoint, and 60 a minute in total across the endpoints that contact other servers (/json/{ip}, /api/check, /api/verify-bot with an address). Errors are JSON {\"error\", \"message\"}; match on `error`. New fields can appear at any time; documented fields are not removed or renamed without a new version and a note on https://iplover.com/api-docs. Nothing you send is stored or logged.",
    "termsOfService": "https://iplover.com/api-docs#terms",
    "contact": {
      "name": "iplover",
      "url": "https://iplover.com/contact"
    },
    "license": {
      "name": "Responses include data under the licences listed at https://iplover.com/sources",
      "url": "https://iplover.com/sources"
    }
  },
  "servers": [
    {
      "url": "https://iplover.com"
    }
  ],
  "externalDocs": {
    "url": "https://iplover.com/api-docs"
  },
  "tags": [
    {
      "name": "Your connection"
    },
    {
      "name": "Addresses"
    },
    {
      "name": "Bots"
    },
    {
      "name": "Network table"
    }
  ],
  "paths": {
    "/ip": {
      "get": {
        "operationId": "getMyIp",
        "summary": "Your public IP address as plain text",
        "description": "Also served on / to curl, Wget, HTTPie, xh and PowerShell. Not rate limited.",
        "tags": [
          "Your connection"
        ],
        "responses": {
          "200": {
            "description": "The address and a newline.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "203.0.113.7\n"
              }
            }
          }
        }
      }
    },
    "/json": {
      "get": {
        "operationId": "getMyInfo",
        "summary": "Your address, approximate location and network",
        "description": "Not rate limited. Nothing is stored.",
        "tags": [
          "Your connection"
        ],
        "responses": {
          "200": {
            "description": "Information about your connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          }
        }
      }
    },
    "/json/{ip}": {
      "get": {
        "operationId": "lookupIp",
        "summary": "Registry record and reverse DNS of an address",
        "description": "Asks the regional registry (RDAP) and a public DNS resolver. Cached for an hour when complete.",
        "tags": [
          "Addresses"
        ],
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "An IPv4 or IPv6 address (URL-encode the colons if your client needs it).",
            "example": "8.8.8.8"
          }
        ],
        "responses": {
          "200": {
            "description": "The record. Parts that failed are null, with the reason in `status` and `errors`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lookup"
                }
              }
            }
          },
          "400": {
            "description": "invalid_ip: not an IPv4 or IPv6 address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "not_public: a private, reserved or special-use address. Also has `kind`.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/check/{ip}": {
      "get": {
        "operationId": "checkIp",
        "summary": "Who is behind an address, from published lists",
        "description": "Cloud, company, crawler, scanner, Tor, VPN and blocklist sources (listed at /sources), plus the registry and forward-confirmed reverse DNS. Add .txt (or ?format=text) for plain text, .json for JSON. Private and reserved addresses get a 200 with category \"reserved\".",
        "tags": [
          "Addresses"
        ],
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "An IPv4 or IPv6 address (URL-encode the colons if your client needs it).",
            "example": "8.8.8.8"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "it",
                "de",
                "es",
                "fr",
                "pt"
              ],
              "default": "en"
            },
            "description": "Language of the readable text (verdict, labels, notes). Field names and codes never change."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "text"
              ]
            },
            "description": "Plain text instead of JSON."
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Check"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "invalid_ip",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/verify-bot": {
      "get": {
        "operationId": "verifyBot",
        "summary": "Is this really Googlebot (or GPTBot, Bingbot…)?",
        "description": "Give ip, ua or both. The user agent is cut to 1000 characters. /api/verify-bot.txt returns plain text. Only requests with an address count against the rate limit.",
        "tags": [
          "Bots"
        ],
        "parameters": [
          {
            "name": "ip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The address that made the request.",
            "example": "66.249.66.1"
          },
          {
            "name": "ua",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1000
            },
            "description": "The User-Agent it sent.",
            "example": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "it",
                "de",
                "es",
                "fr",
                "pt"
              ],
              "default": "en"
            },
            "description": "Language of the readable text (verdict, labels, notes). Field names and codes never change."
          }
        ],
        "responses": {
          "200": {
            "description": "The verdict and its evidence.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyBot"
                }
              }
            }
          },
          "400": {
            "description": "empty (neither ip nor ua) or invalid_ip",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/classify": {
      "post": {
        "operationId": "classifyAddresses",
        "summary": "Network types of up to 100 addresses",
        "description": "From our copies of the published lists only: no registry, DNS or other server is asked. Body at most 16 KB. Duplicates are merged; entries that aren't addresses come back in `invalid`.",
        "tags": [
          "Addresses"
        ],
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "it",
                "de",
                "es",
                "fr",
                "pt"
              ],
              "default": "en"
            },
            "description": "Language of the readable text (verdict, labels, notes). Field names and codes never change."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ips": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Addresses."
                  }
                },
                "required": [
                  "ips"
                ]
              },
              "example": {
                "ips": [
                  "8.8.8.8",
                  "185.220.101.1"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per valid address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassifyResult"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json, no_ips or invalid_ip (none valid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: use POST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "too_large (body over 16 KB) or too_many (over 100 addresses)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "no_public_ips: only private or reserved addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "unavailable: try again in a minute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/asn/index": {
      "get": {
        "operationId": "asnIndex",
        "summary": "Index of the address → network (ASN) table",
        "description": "The table is split into shards so a browser can look an address up without sending it anywhere. Rebuilt daily from iptoasn.com (public domain, PDDL 1.0). Cached for 10 minutes.",
        "tags": [
          "Network table"
        ],
        "responses": {
          "200": {
            "description": "Where each shard starts and its hash.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsnIndex"
                }
              }
            }
          },
          "404": {
            "description": "not_found: the table isn't built yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/asn/{gen}/v{family}/{shard}/{hash}": {
      "get": {
        "operationId": "asnShard",
        "summary": "One shard of the table (binary)",
        "description": "Little-endian. Header: \"ASN2\", family (u8: 4 or 6), one zero byte, shard (u16), row count (u32). Then rows sorted by start: IPv4 start u32, end u32, asn u32; IPv6 (first 64 bits) start hi u32, start lo u32, end hi u32, end lo u32, asn u32. A reader is in /js/asnmap.js. Immutable for a day when the hash matches the index.",
        "tags": [
          "Network table"
        ],
        "parameters": [
          {
            "name": "gen",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [
                4,
                6
              ]
            }
          },
          {
            "name": "shard",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The shard.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/asn/n/{shard}/{hash}": {
      "get": {
        "operationId": "asnNames",
        "summary": "Network names and countries (text)",
        "description": "One line per network: asn, a tab, the country code, a tab, the name. Network n is in shard n % 256. Immutable for a day when the hash matches `hn` in the index.",
        "tags": [
          "Network table"
        ],
        "parameters": [
          {
            "name": "shard",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 255
            }
          },
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The names.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "15169\tUS\tGOOGLE\n"
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Wait for the number of seconds in Retry-After.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait (60)."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable error code; see the error table on /api-docs.",
            "examples": [
              "invalid_ip",
              "rate_limited"
            ]
          },
          "message": {
            "type": "string",
            "description": "A short sentence for people. May change; match on `error`, not on this."
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "Visitor": {
        "type": "object",
        "description": "From Cloudflare's own location estimate for the connection. Approximate: VPNs, mobile networks and corporate gateways move it.",
        "properties": {
          "ip": {
            "type": "string",
            "description": "Your public address, as Cloudflare received it."
          },
          "ip_version": {
            "type": [
              "integer",
              "null"
            ],
            "enum": [
              4,
              6,
              null
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country name (English)."
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 3166-1 alpha-2 code."
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "Region or state."
          },
          "city": {
            "type": [
              "string",
              "null"
            ],
            "description": "City."
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Postal code."
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Approximate latitude of the city, not of you."
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Approximate longitude of the city."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA time zone."
          },
          "asn": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Network number (ASN) announcing the address."
          },
          "as_organization": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of that network."
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The User-Agent header you sent."
          }
        },
        "required": [
          "ip",
          "ip_version",
          "country",
          "country_code",
          "region",
          "city",
          "postal_code",
          "latitude",
          "longitude",
          "timezone",
          "asn",
          "as_organization",
          "user_agent"
        ]
      },
      "Lookup": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "The address, normalised (lower-case, shortest IPv6 form)."
          },
          "ip_version": {
            "type": "integer",
            "enum": [
              4,
              6
            ]
          },
          "summary": {
            "type": "string",
            "description": "One English sentence describing the result."
          },
          "network": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Network name in the registry."
              },
              "handle": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Registry handle of the network."
              },
              "range": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "First and last address, e.g. \"8.8.8.0 - 8.8.8.255\"."
              },
              "cidr": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The range as CIDR blocks."
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Country name (English)."
              },
              "country_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO 3166-1 alpha-2 code."
              },
              "country_source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "registry",
                  "address",
                  null
                ],
                "description": "registry: the record's country field; address: the last line of the registrant's postal address."
              }
            },
            "required": [
              "name",
              "handle",
              "range",
              "cidr",
              "country",
              "country_code",
              "country_source"
            ]
          },
          "owner": {
            "type": "object",
            "properties": {
              "organization": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Registrant organization."
              },
              "abuse_email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Abuse contact from the registry."
              }
            },
            "required": [
              "organization",
              "abuse_email"
            ]
          },
          "registration": {
            "type": "object",
            "properties": {
              "registered": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Date registered (YYYY-MM-DD)."
              },
              "last_changed": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Date last changed."
              },
              "registry": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Regional registry, e.g. ARIN, RIPE NCC."
              }
            },
            "required": [
              "registered",
              "last_changed",
              "registry"
            ]
          },
          "hosting_network": {
            "type": "boolean",
            "description": "The organization name matches a known hosting, cloud or VPN company. A name match only; use /api/check for list-based results."
          },
          "reverse_dns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "PTR names, not forward-confirmed (see /api/check)."
          },
          "status": {
            "type": "object",
            "properties": {
              "rdap": {
                "type": "string",
                "enum": [
                  "ok",
                  "not_found",
                  "timeout",
                  "error",
                  "invalid"
                ]
              },
              "reverse_dns": {
                "type": "string",
                "enum": [
                  "ok",
                  "none",
                  "timeout",
                  "error"
                ]
              },
              "rdap_via": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "rdap.org, or \"registry\" when the registry was asked directly."
              }
            },
            "required": [
              "rdap",
              "reverse_dns",
              "rdap_via"
            ]
          },
          "errors": {
            "type": "object",
            "properties": {
              "rdap": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the registry part is missing."
              },
              "reverse_dns": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the reverse DNS part is missing."
              }
            },
            "required": [
              "rdap",
              "reverse_dns"
            ]
          },
          "sources": {
            "type": "object",
            "properties": {
              "rdap": {
                "type": "string",
                "description": "The RDAP URL asked."
              },
              "reverse_dns": {
                "type": "string",
                "description": "The DNS-over-HTTPS resolver asked."
              }
            },
            "required": [
              "rdap",
              "reverse_dns"
            ]
          },
          "fetched_at": {
            "type": "string",
            "description": "When the answer was fetched (ISO 8601).",
            "format": "date-time"
          },
          "cached": {
            "type": "boolean",
            "description": "true when served from the one-hour cache."
          }
        },
        "required": [
          "ip",
          "ip_version",
          "summary",
          "network",
          "owner",
          "registration",
          "hosting_network",
          "reverse_dns",
          "status",
          "errors",
          "sources",
          "fetched_at",
          "cached"
        ]
      },
      "Network": {
        "type": "object",
        "description": "Network type from published lists, plus clearly labelled estimates. Never a reputation score.",
        "properties": {
          "primary": {
            "type": "string",
            "enum": [
              "residential",
              "mobile",
              "business",
              "hosting",
              "service",
              "vpn",
              "tor",
              "relay",
              "public_proxy",
              "web_proxy",
              "residential_proxy",
              "unknown"
            ],
            "description": "The main network type."
          },
          "confidence": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "confirmed",
              "community",
              "provider",
              "estimate",
              null
            ],
            "description": "How sure the headline is: confirmed (an official published list), community (a community list), provider (a paid data provider), estimate (from the network's names), or null when there is no type."
          },
          "evidence": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "list",
              "community",
              "provider",
              "reverse_dns",
              "name",
              "fallback",
              "asn",
              null
            ],
            "description": "Where the headline comes from: an official list, a community list, a paid provider, the address's reverse DNS name, the network's names, the ISP fallback (no name matched), or the network number."
          },
          "status": {
            "type": "string",
            "enum": [
              "identified",
              "estimated",
              "not_identified",
              "could_not_verify"
            ],
            "description": "identified: a published or community list says so; estimated: inferred from the network number or the network's names, labelled as an estimate; not_identified: no list matched and we have no name for the network; could_not_verify: the lists were not available."
          },
          "label": {
            "type": "string",
            "description": "Readable label in the requested language."
          },
          "explanation": {
            "type": "string",
            "description": "Why, in the requested language."
          },
          "types": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "residential",
                    "mobile",
                    "business",
                    "hosting",
                    "service",
                    "vpn",
                    "tor",
                    "relay",
                    "public_proxy",
                    "web_proxy",
                    "residential_proxy",
                    "unknown"
                  ]
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "list",
                    "provider",
                    "estimate"
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "List id, \"name\" (from the network's names), \"reverse_dns\" (from the address's reverse DNS name), \"fallback\" or \"asn\"."
                },
                "label": {
                  "type": "string"
                },
                "display": {
                  "type": "string",
                  "description": "The label with its qualifier, e.g. \"(estimate)\"."
                },
                "fallback": {
                  "type": "boolean",
                  "description": "true for the residential or business ISP estimate used when no name matched."
                },
                "attribution": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "type",
                "label"
              ]
            },
            "description": "Every type that matched, strongest first."
          },
          "attribution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Credit required by the list behind the headline, if any."
          },
          "crawler": {
            "type": [
              "object",
              "null"
            ],
            "description": "A known crawler's published range or forward-confirmed name, if one matched."
          },
          "coverage": {
            "type": [
              "array",
              "null"
            ],
            "description": "For each type: which kinds of list we hold for it, and the result."
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was evaluated."
          },
          "note": {
            "type": "string",
            "description": "What a network type does and doesn't mean."
          }
        },
        "required": [
          "primary",
          "status",
          "label",
          "explanation",
          "types"
        ]
      },
      "Check": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "The address."
          },
          "ip_version": {
            "type": "integer",
            "enum": [
              4,
              6
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "attacker",
              "blocklisted",
              "tor",
              "relay",
              "scanner",
              "bot",
              "cloud",
              "service",
              "isp",
              "reserved",
              "unknown"
            ],
            "description": "Strongest matching category; `isp` when nothing matched (an ordinary network)."
          },
          "category_label": {
            "type": "string",
            "description": "The category in the requested language."
          },
          "level": {
            "type": "string",
            "enum": [
              "bad",
              "warn",
              "info",
              "good",
              "neutral"
            ],
            "description": "How much attention it deserves: bad, warn, info, good, neutral."
          },
          "verdict": {
            "type": "string",
            "description": "One sentence in the requested language."
          },
          "explanation": {
            "type": "string",
            "description": "Why: which sources matched."
          },
          "action": {
            "type": "string",
            "description": "What to do about it."
          },
          "matched": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "description": "Source id (see /sources)."
                },
                "name": {
                  "type": "string",
                  "description": "Source name."
                },
                "kind": {
                  "type": "string",
                  "description": "Source kind: cloud, service, bot, scanner, tor, relay, vpn, blocklist, sensors."
                },
                "evidence": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "list, reverse_dns, asn or sensors."
                },
                "detail": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The matching range label or name."
                }
              },
              "required": [
                "source",
                "name",
                "kind"
              ]
            },
            "description": "The sources that matched."
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "description": "Source id."
                },
                "name": {
                  "type": "string",
                  "description": "Source name."
                },
                "kind": {
                  "type": "string",
                  "description": "Source kind."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "matched",
                    "not_matched",
                    "not_checked"
                  ]
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date of the copy we hold."
                }
              },
              "required": [
                "source",
                "name",
                "kind",
                "status"
              ]
            },
            "description": "Every source and its result, including the ones we could not check."
          },
          "owner": {
            "type": [
              "object",
              "null"
            ],
            "description": "From the registry (RDAP): organization, network, cidr, range, handle, abuse_email, registry, registered, last_changed."
          },
          "owner_status": {
            "type": "string",
            "enum": [
              "ok",
              "not_found",
              "timeout",
              "error",
              "invalid"
            ],
            "description": "What happened to the registry lookup."
          },
          "asn": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Country of the allocation the address belongs to (Team Cymru), not a location."
              },
              "registry": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Regional registry of that allocation."
              }
            },
            "description": "Network number announcing the address."
          },
          "reverse_dns": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "forward_confirmed": {
                "type": "boolean"
              },
              "forward_addresses": {
                "type": "array"
              },
              "forward_error": {
                "type": "boolean"
              },
              "resolver": {
                "type": "string",
                "enum": [
                  "cloudflare",
                  "google"
                ]
              }
            },
            "description": "PTR name, and whether that name resolves back to the address."
          },
          "country": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "source": {
                "type": "string"
              }
            },
            "description": "Country where the range is registered (not where the device is)."
          },
          "network": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Network"
              },
              {
                "type": "null"
              }
            ]
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              }
            },
            "description": "Optional commercial data providers and their status; \"not_configured\" unless we enable one."
          },
          "lists": {
            "type": [
              "object",
              "null"
            ],
            "description": "Our copy of the lists: version, built_at, oldest_update, newest_update, and how many sources were checked and not checked."
          },
          "checked_at": {
            "type": "string",
            "description": "When it was checked (ISO 8601).",
            "format": "date-time"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "it",
              "de",
              "es",
              "fr",
              "pt"
            ]
          },
          "note": {
            "type": "string",
            "description": "The limits of the check, in the requested language."
          },
          "cached": {
            "type": "boolean",
            "description": "Present and true when served from the one-hour cache."
          }
        },
        "required": [
          "ip",
          "ip_version",
          "category",
          "category_label",
          "level",
          "verdict",
          "explanation",
          "action",
          "matched",
          "sources",
          "owner",
          "asn",
          "reverse_dns",
          "country",
          "lists",
          "checked_at",
          "language",
          "note"
        ]
      },
      "Bot": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Id in our directory (/bots/<slug>)."
          },
          "name": {
            "type": "string",
            "description": "Bot name."
          },
          "operator": {
            "type": "string",
            "description": "Company that runs it."
          },
          "category": {
            "type": "string",
            "description": "search, ai-training, ai-assistant, seo or other."
          },
          "tokens": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User-agent tokens it uses."
          },
          "robots": {
            "type": "string",
            "description": "Whether it follows robots.txt: yes, partial, no, undocumented, or control (a robots.txt token with no crawler of its own)."
          },
          "verify": {
            "type": "string",
            "enum": [
              "ip",
              "rdns",
              "ua",
              "none"
            ],
            "description": "How it can be verified: published ranges, reverse DNS, user agent only, or not at all."
          }
        },
        "required": [
          "slug",
          "name",
          "operator",
          "category",
          "tokens",
          "verify"
        ]
      },
      "VerifyBot": {
        "type": "object",
        "properties": {
          "ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address checked."
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user agent checked."
          },
          "verdict": {
            "type": "string",
            "enum": [
              "verified",
              "spoofed",
              "different",
              "unverified",
              "notbot",
              "claim",
              "noclaim"
            ],
            "description": "verified: the address is in the bot's published ranges or forward-confirmed under its domain; spoofed: claims a bot that publishes ranges, but isn't in them; different: belongs to another bot; unverified: the claimed bot publishes nothing to check against; notbot: no bot claim and no bot range; claim / noclaim: only a user agent was given."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Detail for some verdicts: nolist, nodata, reserved."
          },
          "claim": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Bot"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bot the user agent claims to be."
          },
          "bot": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Bot"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bot the verdict is about."
          },
          "identified": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Bots whose published ranges or reverse DNS match the address, with the list and evidence."
          },
          "evidence": {
            "type": "object",
            "properties": {
              "reverse_dns": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "lists": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "The lists consulted and their dates."
              }
            },
            "required": [
              "reverse_dns",
              "lists"
            ]
          },
          "network": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Network"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner": {
            "type": [
              "string",
              "null"
            ],
            "description": "Organization or network name from the registry."
          },
          "asn": {
            "type": [
              "object",
              "null"
            ]
          },
          "known_bots": {
            "type": "integer",
            "description": "Bots in our directory."
          },
          "checked_at": {
            "type": "string",
            "description": "When it was checked.",
            "format": "date-time"
          }
        },
        "required": [
          "ip",
          "user_agent",
          "verdict",
          "reason",
          "claim",
          "bot",
          "identified",
          "evidence",
          "known_bots",
          "checked_at"
        ]
      },
      "Classified": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "The address."
          },
          "category": {
            "type": "string",
            "enum": [
              "attacker",
              "blocklisted",
              "tor",
              "relay",
              "scanner",
              "bot",
              "cloud",
              "service",
              "isp",
              "reserved",
              "unknown"
            ]
          },
          "category_label": {
            "type": "string",
            "description": "The category in the requested language."
          },
          "level": {
            "type": "string",
            "enum": [
              "bad",
              "warn",
              "info",
              "good",
              "neutral"
            ]
          },
          "verdict": {
            "type": "string",
            "description": "One sentence in the requested language."
          },
          "matched": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the sources that matched."
          },
          "network": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Network"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ip",
          "category",
          "category_label",
          "level",
          "verdict",
          "matched",
          "network"
        ]
      },
      "ClassifyResult": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Classified"
            }
          },
          "invalid": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Entries that are not IP addresses."
          },
          "checked_at": {
            "type": "string",
            "description": "When it was checked.",
            "format": "date-time"
          },
          "note": {
            "type": "string",
            "description": "What a network type does and doesn't mean."
          }
        },
        "required": [
          "results",
          "invalid",
          "checked_at",
          "note"
        ]
      },
      "AsnIndex": {
        "type": "object",
        "properties": {
          "gen": {
            "type": "integer",
            "description": "Build number; part of every shard URL."
          },
          "fetched_at": {
            "type": "string",
            "description": "When the source was downloaded."
          },
          "source_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date of the source files."
          },
          "source": {
            "type": "string",
            "description": "Where the data comes from."
          },
          "license": {
            "type": "string",
            "description": "Licence of the data."
          },
          "rows": {
            "type": "object",
            "description": "Number of routes, per family."
          },
          "v4": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "First IPv4 address (as an unsigned 32-bit number) of each shard."
          },
          "v6": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "First 64 bits of each IPv6 shard, as 16 hex digits."
          },
          "h4": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content hash (8 hex digits) of each IPv4 shard."
          },
          "h6": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content hash of each IPv6 shard."
          },
          "hn": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content hash of each of the 256 name shards (once built)."
          }
        },
        "required": [
          "gen",
          "v4",
          "v6",
          "h4",
          "h6"
        ]
      }
    }
  }
}
