{
  "openapi": "3.0.3",
  "info": {
    "title": "WebStatBot API",
    "version": "1.0.0",
    "description": "Free website diagnostic tools — the same checks as https://www.webstatbot.com/tools, as JSON. No API key, CORS enabled for any origin.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    },
    "contact": {
      "email": "press@webstatbot.com"
    }
  },
  "servers": [
    {
      "url": "https://api.webstatbot.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/checkup": {
      "get": {
        "summary": "Is it up?",
        "description": "dns → whois → connect → http, in order, and says exactly where it fails.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "checkup",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/diagnostics": {
      "get": {
        "summary": "Diagnostics",
        "description": "Everything checkup does, plus the canonical URL — where redirects really end up.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "diagnostics",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/headers": {
      "get": {
        "summary": "Response headers",
        "description": "Apex and www fetched separately, redirects not followed, so you see what each sends first.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "headers",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/security": {
      "get": {
        "summary": "Security grade",
        "description": "HTTPS, the redirect to it, common security headers, and a calibrated exposed-path check.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "security",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/a11y": {
      "get": {
        "summary": "Accessibility pass",
        "description": "Static HTML check: lang, title, alt text, form labels, heading order, link text, zoom.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "a11y",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/share_preview": {
      "get": {
        "summary": "Link share preview",
        "description": "Reads Open Graph/Twitter tags and actually fetches the preview image to confirm it resolves.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "share_preview",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/hosting": {
      "get": {
        "summary": "Who hosts it",
        "description": "IP, PTR and network owner for the web and mail infrastructure behind a domain.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "hosting",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/robots": {
      "get": {
        "summary": "robots.txt",
        "description": "Parsed per agent: allow, disallow, crawl-delay, plus any sitemaps it declares.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "robots",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/redirects": {
      "get": {
        "summary": "Redirect chain",
        "description": "The full hop-by-hop path a URL takes, up to 12 hops, flags a loop.",
        "tags": [
          "Web & reachability"
        ],
        "operationId": "redirects",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/dns": {
      "get": {
        "summary": "DNS records",
        "description": "A, AAAA, MX, TXT and more — pick the types you need, plus SPF/DMARC presence.",
        "tags": [
          "DNS & domain"
        ],
        "operationId": "dns",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated record types to fetch. Default: A,AAAA,CNAME,MX,NS,TXT,SOA,CAA. Full list: A,AAAA,CNAME,MX,NS,TXT,SOA,CAA,SRV,PTR."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/whois": {
      "get": {
        "summary": "WHOIS (RDAP)",
        "description": "Registrar, status, expiry date and nameservers, straight from the registry.",
        "tags": [
          "DNS & domain"
        ],
        "operationId": "whois",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/dnssec": {
      "get": {
        "summary": "DNSSEC",
        "description": "Confirms DS/DNSKEY records exist — not a full cryptographic chain validation.",
        "tags": [
          "DNS & domain"
        ],
        "operationId": "dnssec",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/propagation": {
      "get": {
        "summary": "DNS propagation",
        "description": "Google, Cloudflare and Quad9 queried independently; a resolver that fails shows its own error.",
        "tags": [
          "DNS & domain"
        ],
        "operationId": "propagation",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Record type to check. One of A, AAAA, MX, TXT, NS, CNAME. Default: A."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/subdomains": {
      "get": {
        "summary": "Subdomains",
        "description": "Names found in Certificate Transparency logs, optionally resolved too.",
        "tags": [
          "DNS & domain"
        ],
        "operationId": "subdomains",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          },
          {
            "name": "resolve",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Set to 1 to also resolve the first 150 names against DNS (slower)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/mailcheck": {
      "get": {
        "summary": "Mail deliverability",
        "description": "MX, SPF, DMARC, DKIM (common selectors) and rDNS, rolled into one score.",
        "tags": [
          "Network & mail"
        ],
        "operationId": "mailcheck",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/rbl": {
      "get": {
        "summary": "Blacklists (RBL)",
        "description": "Every zone is calibrated first — one that blocks public resolvers is reported as “blind”, never a false listing.",
        "tags": [
          "Network & mail"
        ],
        "operationId": "rbl",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/rdns": {
      "get": {
        "summary": "Reverse DNS",
        "description": "PTR records and whether they forward-confirm back to the IP (FCrDNS).",
        "tags": [
          "Network & mail"
        ],
        "operationId": "rdns",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/myip": {
      "get": {
        "summary": "My IP",
        "description": "The address this request reached us from — useful when scripting against the API.",
        "tags": [
          "Network & mail"
        ],
        "operationId": "myip",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/ping": {
      "get": {
        "summary": "Ping (HTTP)",
        "description": "Round-trip time to a site over a few HTTP requests — min/avg/max, not ICMP.",
        "tags": [
          "Security tools"
        ],
        "operationId": "ping",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/exposed": {
      "get": {
        "summary": "Exposed files & backups",
        "description": ".env, backups, feed-export scripts and other commonly-leaked paths — paste your own list too (up to 40 total), after you confirm it's your site.",
        "tags": [
          "Security tools"
        ],
        "operationId": "exposed",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Full URL or bare domain to check."
          },
          {
            "name": "confirm",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must be 1 — confirms you own the site or are authorised to test it."
          },
          {
            "name": "extra",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Newline-separated extra paths to check first, combined with the built-in list up to 40 total."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    },
    "/catalog/bots": {
      "get": {
        "summary": "Known bot user agents",
        "description": "The bot id, label and User-Agent string used by bot-identification tooling elsewhere on the site.",
        "tags": [
          "Reference"
        ],
        "operationId": "catalog_bots",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid parameter)"
          },
          "404": {
            "description": "Unknown tool"
          },
          "429": {
            "description": "Rate limited — too many requests from your address or for this target"
          }
        }
      }
    }
  }
}