{
  "openapi": "3.1.0",
  "info": {
    "title": "isitquantumready.com scanner API",
    "version": "1.0.0",
    "summary": "Check a website for post-quantum TLS readiness.",
    "description": "Free and without a key. Results are cached at the edge (five minutes for a scan, fifteen minutes for the third-party hosts, an hour for a domain survey), and the scanner runs only a handful of scans at a time, so please cache what you fetch. Each address redirects other spellings of a name to its canonical form.",
    "contact": {
      "url": "https://isitquantumready.com/contact.html"
    },
    "termsOfService": "https://isitquantumready.com/terms.html"
  },
  "servers": [
    {
      "url": "https://isitquantumready.com"
    }
  ],
  "paths": {
    "/api/scan": {
      "get": {
        "operationId": "scanSite",
        "summary": "Scan one website",
        "description": "Seven TLS handshakes to port 443, each closed as soon as it completes; no HTTP request is sent to the site. Reports post-quantum key exchange (X25519MLKEM768), the certificate chain (P-256 CA keys Chrome will reject from 15 March 2027), TLS versions, a score out of 100 and fix instructions for every failing check.",
        "parameters": [
          {
            "$ref": "#/components/parameters/domain"
          }
        ],
        "responses": {
          "200": {
            "description": "The report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "301": {
            "description": "The domain was not in canonical form; follow Location."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/estate": {
      "get": {
        "operationId": "surveyDomain",
        "summary": "Survey the hostnames under a domain",
        "description": "Finds hostnames in public certificate transparency logs and checks up to 20 with one handshake each.",
        "parameters": [
          {
            "$ref": "#/components/parameters/domain"
          }
        ],
        "responses": {
          "200": {
            "description": "Totals and a sample of hosts with a finding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/partners": {
      "get": {
        "operationId": "checkThirdParties",
        "summary": "Check the hosts a home page loads from",
        "description": "One GET of the site's home page (signed with Web Bot Auth), then one TLS handshake to each third-party host it loads scripts, frames, styles, fonts and images from.",
        "parameters": [
          {
            "$ref": "#/components/parameters/domain"
          }
        ],
        "responses": {
          "200": {
            "description": "The hosts and what each handshake showed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "domain": {
        "name": "domain",
        "in": "query",
        "required": true,
        "description": "A hostname, for example example.com.",
        "schema": {
          "type": "string",
          "examples": [
            "example.com"
          ]
        }
      }
    },
    "responses": {
      "Error": {
        "description": "The domain was refused or the scan failed.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "error"
              ]
            }
          }
        }
      }
    },
    "schemas": {
      "Report": {
        "type": "object",
        "required": [
          "domain",
          "reachable",
          "scannedAt",
          "score",
          "level",
          "headline",
          "summary",
          "checks"
        ],
        "properties": {
          "domain": {
            "type": "string"
          },
          "reachable": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "scannedAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMs": {
            "type": "integer"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "level": {
            "type": "string",
            "enum": [
              "ready",
              "partial",
              "not-ready",
              "unreachable"
            ]
          },
          "headline": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "connection": {
            "type": "object"
          },
          "keyExchange": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "certificate": {
            "type": "object"
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "examples": [
                    "pass",
                    "fail",
                    "warn",
                    "info"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "points": {
                  "type": "integer"
                },
                "maxPoints": {
                  "type": "integer"
                },
                "fix": {
                  "type": "string",
                  "description": "The fix as plain text, when the check needs one."
                },
                "detail": {
                  "type": "string"
                },
                "fixGuide": {
                  "type": "object",
                  "description": "The same fix split for display: an intro, per-server options and an outro.",
                  "properties": {
                    "intro": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "outro": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
