{
  "openapi": "3.1.1",
  "info": {
    "title": "Global DNS Explorer API",
    "version": "1.0.0",
    "summary": "Ask every authoritative name server and public resolvers: records, propagation, DNSSEC, mistakes.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://globaldnsexplorer.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Ask every authoritative name server and public resolvers: records, propagation, DNSSEC, mistakes.",
        "description": "Queries each authoritative name server of a domain directly and compares the answers with Google and Cloudflare DNS-over-HTTPS and the local resolver. Shows SOA serial drift (propagation in progress), DNSSEC validation, lame delegation, CNAME at the apex, glue hints, TTLs, and what changed since the previous check.\n\nMethodology:\n- Finds the zone (walking up from the host name until NS records exist) and resolves every name server to its addresses with the server's resolver.\n- Queries SOA, NS, A, AAAA, CNAME, MX, TXT and CAA directly at each authoritative name server (first public IPv4 address; private addresses are never contacted), at Google and Cloudflare DNS-over-HTTPS and at the local resolver.\n- Propagation: different SOA serials between authoritative servers mean secondaries have not yet transferred the latest zone; public resolvers answering differently hold cached data until the TTL expires (or serve location-dependent answers).\n- Lame delegation: a listed name server that refuses, fails (SERVFAIL/NXDOMAIN) or returns no SOA for the zone. Glue: in-zone name servers need A/AAAA glue at the parent; a name server name that does not resolve is flagged.\n- DNSSEC: DS record at the parent (Google DoH) plus the AD (authenticated data) flag from Google and Cloudflare; DS present but SERVFAIL everywhere = bogus.\n- History: each live check stores a snapshot of the authoritative records under sha256(domain); the next check lists added/removed values per record type (up to 20 snapshots kept).",
        "tags": [
          "infrastructure"
        ],
        "x-mcp-tool": "global_dns_explorer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlobalDnsExplorerInput"
              },
              "examples": {
                "example1": {
                  "summary": "Pasted answers: propagation in progress + lame server",
                  "value": {
                    "mode": "pasted",
                    "pasted": "{\n \"domain\": \"example.net\",\n \"zone\": \"example.net\",\n \"dsPresent\": true,\n \"nameservers\": [\n  {\n   \"name\": \"ns1.example.net\",\n   \"addresses\": [\n    \"192.0.2.53\"\n   ]\n  },\n  {\n   \"name\": \"ns2.dns-host.example\",\n   \"addresses\": [\n    \"198.51.100.53\"\n   ]\n  },\n  {\n   \"name\": \"ns3.dns-host.example\",\n   \"addresses\": [\n    \"203.0.113.53\"\n   ]\n  }\n ],\n \"resolvers\": [\n  {\n   \"id\": \"ns:ns1.example.net\",\n   \"label\": \"ns1.example.net (192.0.2.53)\",\n   \"kind\": \"authoritative\",\n   \"status\": \"ok\",\n   \"records\": {\n    \"SOA\": {\n     \"values\": [\n      \"ns1.example.net hostmaster.example.net 2026101402 7200 3600 1209600 3600\"\n     ]\n    },\n    \"NS\": {\n     \"values\": [\n      \"ns1.example.net\",\n      \"ns2.dns-host.example\",\n      \"ns3.dns-host.example\"\n     ]\n    },\n    \"A\": {\n     \"values\": [\n      \"93.184.215.14\"\n     ],\n     \"ttl\": 300\n    },\n    \"AAAA\": {\n     \"values\": [],\n     \"ttl\": null\n    },\n    \"MX\": {\n     \"values\": [\n      \"10 mail.example.net\"\n     ]\n    },\n    \"TXT\": {\n     \"values\": [\n      \"v=spf1 mx -all\"\n     ]\n    },\n    \"CAA\": {\n     \"values\": [\n      \"0 issue \\\"letsencrypt.org\\\"\"\n     ]\n    },\n    \"CNAME\": {\n     \"values\": []\n    }\n   }\n  },\n  {\n   \"id\": \"ns:ns2.dns-host.example\",\n   \"label\": \"ns2.dns-host.example (198.51.100.53)\",\n   \"kind\": \"authoritative\",\n   \"status\": \"ok\",\n   \"records\": {\n    \"SOA\": {\n     \"values\": [\n      \"ns1.example.net hostmaster.example.net 2026101401 7200 3600 1209600 3600\"\n     ]\n    },\n    \"NS\": {\n     \"values\": [\n      \"ns1.example.net\",\n      \"ns2.dns-host.example\",\n      \"ns3.dns-host.example\"\n     ]\n    },\n    \"A\": {\n     \"values\": [\n      \"93.184.216.34\"\n     ],\n     \"ttl\": 300\n    },\n    \"AAAA\": {\n     \"values\": []\n    },\n    \"MX\": {\n     \"values\": [\n      \"10 mail.example.net\"\n     ]\n    },\n    \"TXT\": {\n     \"values\": [\n      \"v=spf1 mx -all\"\n     ]\n    },\n    \"CAA\": {\n     \"values\": [\n      \"0 issue \\\"letsencrypt.org\\\"\"\n     ]\n    },\n    \"CNAME\": {\n     \"values\": []\n    }\n   }\n  },\n  {\n   \"id\": \"ns:ns3.dns-host.example\",\n   \"label\": \"ns3.dns-host.example (203.0.113.53)\",\n   \"kind\": \"authoritative\",\n   \"status\": \"refused\",\n   \"error\": \"EREFUSED\",\n   \"records\": {}\n  },\n  {\n   \"id\": \"doh:google\",\n   \"label\": \"Google Public DNS (DoH)\",\n   \"kind\": \"public-doh\",\n   \"status\": \"ok\",\n   \"ad\": true,\n   \"records\": {\n    \"SOA\": {\n     \"values\": [\n      \"ns1.example.net. hostmaster.example.net. 2026101401 7200 3600 1209600 3600\"\n     ],\n     \"ttl\": 1800\n    },\n    \"NS\": {\n     \"values\": [\n      \"ns1.example.net.\",\n      \"ns2.dns-host.example.\",\n      \"ns3.dns-host.example.\"\n     ],\n     \"ttl\": 86400\n    },\n    \"A\": {\n     \"values\": [\n      \"93.184.216.34\"\n     ],\n     \"ttl\": 212\n    },\n    \"MX\": {\n     \"values\": [\n      \"10 mail.example.net.\"\n     ],\n     \"ttl\": 3600\n    },\n    \"TXT\": {\n     \"values\": [\n      \"\\\"v=spf1 mx -all\\\"\"\n     ],\n     \"ttl\": 3600\n    },\n    \"CAA\": {\n     \"values\": [\n      \"0 issue \\\"letsencrypt.org\\\"\"\n     ],\n     \"ttl\": 3600\n    },\n    \"AAAA\": {\n     \"values\": []\n    },\n    \"CNAME\": {\n     \"values\": []\n    }\n   }\n  },\n  {\n   \"id\": \"doh:cloudflare\",\n   \"label\": \"Cloudflare 1.1.1.1 (DoH)\",\n   \"kind\": \"public-doh\",\n   \"status\": \"ok\",\n   \"ad\": true,\n   \"records\": {\n    \"SOA\": {\n     \"values\": [\n      \"ns1.example.net. hostmaster.example.net. 2026101402 7200 3600 1209600 3600\"\n     ],\n     \"ttl\": 3600\n    },\n    \"A\": {\n     \"values\": [\n      \"93.184.215.14\"\n     ],\n     \"ttl\": 300\n    },\n    \"MX\": {\n     \"values\": [\n      \"10 mail.example.net.\"\n     ],\n     \"ttl\": 3600\n    }\n   }\n  }\n ]\n}",
                    "trackChanges": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalDnsExplorerResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "GlobalDnsExplorerInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "enum": [
              "live",
              "pasted"
            ],
            "default": "live"
          },
          "domain": {
            "title": "Domain",
            "description": "Live mode: the domain or host name to check.",
            "type": "string",
            "maxLength": 253
          },
          "pasted": {
            "title": "Resolver answers (JSON)",
            "description": "Pasted mode: {domain, zone?, dsPresent?, nameservers:[{name,addresses}], resolvers:[{id,label,kind:\"authoritative\"|\"public-doh\"|\"local\",status,ad?,records:{A:{values,ttl}}}]} — the \"result\" of a live check also works.",
            "type": "string",
            "maxLength": 200000
          },
          "trackChanges": {
            "title": "Remember this check and show changes since the last one",
            "type": "boolean",
            "default": true
          }
        },
        "required": []
      },
      "GlobalDnsExplorerResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "domain",
              "zone",
              "mode",
              "nameservers",
              "resolvers",
              "records",
              "soaSerials",
              "propagationInProgress",
              "dnssec",
              "comparison",
              "ttl",
              "findings",
              "history"
            ],
            "properties": {
              "domain": {
                "type": "string"
              },
              "zone": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "live",
                  "pasted"
                ]
              },
              "nameservers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "addresses",
                    "inBailiwick"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "inBailiwick": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "resolvers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "label",
                    "kind",
                    "address",
                    "status",
                    "error",
                    "ad",
                    "records"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "authoritative",
                        "public-doh",
                        "local"
                      ]
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ad": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "records": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "values",
                          "ttl"
                        ],
                        "properties": {
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "ttl": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "records": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "soaSerials": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "resolver",
                    "serial"
                  ],
                  "properties": {
                    "resolver": {
                      "type": "string"
                    },
                    "serial": {
                      "type": "integer"
                    }
                  }
                }
              },
              "propagationInProgress": {
                "type": "boolean"
              },
              "dnssec": {
                "type": "string",
                "enum": [
                  "validated",
                  "unsigned",
                  "bogus",
                  "signed-not-validated",
                  "unknown"
                ]
              },
              "comparison": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "resolversAnswering",
                    "variants",
                    "authoritativeConsistent",
                    "differing"
                  ],
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "resolversAnswering": {
                      "type": "integer"
                    },
                    "variants": {
                      "type": "integer"
                    },
                    "authoritativeConsistent": {
                      "type": "boolean"
                    },
                    "differing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "ttl": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "authoritative",
                    "google",
                    "cloudflare",
                    "local"
                  ],
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "authoritative": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "google": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "cloudflare": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "local": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "severity",
                    "area",
                    "finding"
                  ],
                  "properties": {
                    "severity": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low",
                        "info"
                      ]
                    },
                    "area": {
                      "type": "string"
                    },
                    "finding": {
                      "type": "string"
                    }
                  }
                }
              },
              "history": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tracked",
                  "previousCheck",
                  "changes",
                  "events"
                ],
                "properties": {
                  "tracked": {
                    "type": "boolean"
                  },
                  "previousCheck": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "added",
                        "removed"
                      ],
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "added": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "removed": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "checkedAt",
                        "changes"
                      ],
                      "properties": {
                        "checkedAt": {
                          "type": "string"
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "type",
                              "added",
                              "removed"
                            ],
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "added": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "removed": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}