{
  "openapi": "3.1.1",
  "info": {
    "title": "Domain History Graph API",
    "version": "1.0.0",
    "summary": "Registration, DNS, hosting networks, certificates and Wayback captures of a domain as a timeline.",
    "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://domainhistorygraph.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Registration, DNS, hosting networks, certificates and Wayback captures of a domain as a timeline.",
        "description": "Combines public records about a domain: RDAP registration data (registrar, registration/expiry/last-changed dates, status, name servers, DNSSEC), current A/AAAA/NS/MX records and the networks (ASNs) hosting its addresses via RIPEstat, Certificate Transparency history from crt.sh and first/last Wayback Machine captures. Shows a timeline and a relationship graph. Contact names, e-mails and phone numbers are never displayed.\n\nMethodology:\n- RDAP (RFC 9083) via the rdap.org bootstrap redirector, which forwards to the authoritative registry/registrar RDAP server. Only registrar, dates, status, name servers, DNSSEC and — if published — the registrant organisation and country are shown; contact names, e-mails, phone numbers and street addresses are dropped and only counted.\n- Current DNS (A, AAAA, NS, MX) from this server's resolver; hosting network per public address via RIPEstat network-info (origin ASN + prefix) and as-overview (holder name).\n- Certificate Transparency: crt.sh JSON for the exact domain, deduplicated by serial: first certificate seen, latest issuance, issuing organisations, distinct names.\n- Wayback Machine CDX API: the 10 oldest and 10 newest captures (fl=timestamp,statuscode,digest); digest changes between samples indicate content changes. Totals across all captures are not computed (the index is too large to count cheaply).\n- Paste mode uses the RDAP \"last update of RDAP database\" event as the reference time for age/expiry so results do not depend on when you run it.",
        "tags": [
          "infrastructure"
        ],
        "x-mcp-tool": "domain_history_graph",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainHistoryGraphInput"
              },
              "examples": {
                "example1": {
                  "summary": "example.com from pasted RDAP + CDX",
                  "value": {
                    "mode": "paste",
                    "domain": "example.com",
                    "rdapJson": "{\n \"objectClassName\": \"domain\",\n \"ldhName\": \"EXAMPLE.COM\",\n \"status\": [\n  \"client delete prohibited\",\n  \"client transfer prohibited\",\n  \"client update prohibited\"\n ],\n \"links\": [\n  {\n   \"rel\": \"self\",\n   \"href\": \"https://rdap.verisign.com/com/v1/domain/example.com\"\n  }\n ],\n \"entities\": [\n  {\n   \"objectClassName\": \"entity\",\n   \"handle\": \"376\",\n   \"roles\": [\n    \"registrar\"\n   ],\n   \"publicIds\": [\n    {\n     \"type\": \"IANA Registrar ID\",\n     \"identifier\": \"376\"\n    }\n   ],\n   \"vcardArray\": [\n    \"vcard\",\n    [\n     [\n      \"version\",\n      {},\n      \"text\",\n      \"4.0\"\n     ],\n     [\n      \"fn\",\n      {},\n      \"text\",\n      \"RESERVED-Internet Assigned Numbers Authority\"\n     ]\n    ]\n   ],\n   \"entities\": [\n    {\n     \"objectClassName\": \"entity\",\n     \"roles\": [\n      \"abuse\"\n     ],\n     \"vcardArray\": [\n      \"vcard\",\n      [\n       [\n        \"version\",\n        {},\n        \"text\",\n        \"4.0\"\n       ],\n       [\n        \"fn\",\n        {},\n        \"text\",\n        \"\"\n       ],\n       [\n        \"tel\",\n        {\n         \"type\": \"voice\"\n        },\n        \"uri\",\n        \"tel:+1.3105551234\"\n       ],\n       [\n        \"email\",\n        {},\n        \"text\",\n        \"abuse@registrar.example\"\n       ]\n      ]\n     ]\n    }\n   ]\n  }\n ],\n \"events\": [\n  {\n   \"eventAction\": \"registration\",\n   \"eventDate\": \"1995-08-14T04:00:00Z\"\n  },\n  {\n   \"eventAction\": \"expiration\",\n   \"eventDate\": \"2027-08-13T04:00:00Z\"\n  },\n  {\n   \"eventAction\": \"last changed\",\n   \"eventDate\": \"2026-08-14T08:01:43Z\"\n  },\n  {\n   \"eventAction\": \"last update of RDAP database\",\n   \"eventDate\": \"2026-10-14T14:23:10Z\"\n  }\n ],\n \"secureDNS\": {\n  \"delegationSigned\": true\n },\n \"nameservers\": [\n  {\n   \"objectClassName\": \"nameserver\",\n   \"ldhName\": \"ELLIOTT.NS.CLOUDFLARE.COM\"\n  },\n  {\n   \"objectClassName\": \"nameserver\",\n   \"ldhName\": \"HERA.NS.CLOUDFLARE.COM\"\n  }\n ]\n}",
                    "cdxRows": "[[\"timestamp\",\"statuscode\",\"digest\"],\n[\"20020120142510\",\"200\",\"HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA\"],\n[\"20020328012821\",\"200\",\"UY3I2DT2AMWAY6DECFCFYMT5ZOTFHUCH\"],\n[\"20020524041628\",\"200\",\"UY3I2DT2AMWAY6DECFCFYMT5ZOTFHUCH\"],\n[\"20261014031041\",\"200\",\"U2352G3H6BFNEDPBNQI5XGOBSQAN4W4J\"],\n[\"20261014041142\",\"200\",\"U2352G3H6BFNEDPBNQI5XGOBSQAN4W4J\"],\n[\"20261014064636\",\"200\",\"U2352G3H6BFNEDPBNQI5XGOBSQAN4W4J\"]]"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainHistoryGraphResult"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "DomainHistoryGraphInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "enum": [
              "live",
              "paste"
            ],
            "default": "live"
          },
          "domain": {
            "title": "Domain",
            "type": "string",
            "maxLength": 253
          },
          "certificateTransparency": {
            "title": "Include Certificate Transparency history (crt.sh, slower)",
            "type": "boolean",
            "default": true
          },
          "rdapJson": {
            "title": "RDAP JSON (paste mode)",
            "type": "string",
            "maxLength": 300000
          },
          "cdxRows": {
            "title": "Wayback CDX rows (paste mode, optional)",
            "description": "JSON output (fl=timestamp,statuscode,digest) or plain CDX lines.",
            "type": "string",
            "maxLength": 300000
          },
          "ctJson": {
            "title": "crt.sh JSON (paste mode, optional)",
            "type": "string",
            "maxLength": 1000000
          }
        },
        "required": [
          "domain"
        ]
      },
      "DomainHistoryGraphResult": {
        "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",
              "mode",
              "referenceTime",
              "registration",
              "ageYears",
              "daysToExpiry",
              "dns",
              "hosting",
              "certificates",
              "wayback",
              "findings"
            ],
            "properties": {
              "domain": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "live",
                  "paste"
                ]
              },
              "referenceTime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "registration": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "ldhName",
                  "registrar",
                  "registrarIanaId",
                  "registrantOrganization",
                  "registrantCountry",
                  "status",
                  "nameservers",
                  "dnssec",
                  "events",
                  "contactRoles",
                  "redactedContactFields",
                  "rdapServer"
                ],
                "properties": {
                  "ldhName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "registrar": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "registrarIanaId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "registrantOrganization": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "registrantCountry": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "nameservers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "dnssec": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "action",
                        "date"
                      ],
                      "properties": {
                        "action": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "contactRoles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "redactedContactFields": {
                    "type": "integer"
                  },
                  "rdapServer": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "ageYears": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "daysToExpiry": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "dns": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "hosting": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "ip",
                    "prefix",
                    "asn",
                    "holder"
                  ],
                  "properties": {
                    "ip": {
                      "type": "string"
                    },
                    "prefix": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "asn": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "holder": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "certificates": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "certificates",
                  "firstSeen",
                  "latestIssued",
                  "issuers",
                  "names"
                ],
                "properties": {
                  "certificates": {
                    "type": "integer"
                  },
                  "firstSeen": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "latestIssued": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "issuers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "issuer",
                        "count"
                      ],
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "count": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "names": {
                    "type": "integer"
                  }
                }
              },
              "wayback": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "firstCapture",
                  "lastCapture",
                  "sampled",
                  "distinctContent",
                  "statusCodes",
                  "captures"
                ],
                "properties": {
                  "firstCapture": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lastCapture": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sampled": {
                    "type": "integer"
                  },
                  "distinctContent": {
                    "type": "integer"
                  },
                  "statusCodes": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "captures": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "timestamp",
                        "status",
                        "digest"
                      ],
                      "properties": {
                        "timestamp": {
                          "type": "string"
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "digest": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "findings": {
                "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"
              }
            }
          }
        }
      }
    }
  }
}