{
  "openapi": "3.1.1",
  "info": {
    "title": "HTTP Technology Explorer API",
    "version": "1.0.0",
    "summary": "Headers, compression, caching, HTTP/2-3 hints, redirects, security and tech stack for a URL.",
    "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://httptechnologyexplorer.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Headers, compression, caching, HTTP/2-3 hints, redirects, security and tech stack for a URL.",
        "description": "Fetches a public URL (or analyses pasted raw response headers and HTML) and explains what the response reveals: redirect target and HTTPS upgrade, HTTP/2 and HTTP/3 advertisement (Alt-Svc), compression, caching (Cache-Control, ETag, Last-Modified, Age, Vary), security headers, and server, framework, CMS and analytics fingerprints with a confidence level for each.\n\nMethodology:\n- Live mode: one GET of the URL through the platform's SSRF-guarded fetcher (redirects followed and re-validated, ports 80/443 only, body capped at 512 KiB), plus a small GET of the http:// variant to see whether plain HTTP is upgraded to HTTPS.\n- The fetcher speaks HTTP/1.1, so HTTP/2 and HTTP/3 support is inferred from the Alt-Svc header (h2/h3); pasted headers show the real protocol in their status line.\n- Caching follows RFC 9111: no-store, private, no-cache, s-maxage > max-age > Expires-Date; CDN-Cache-Control/Surrogate-Control override for shared caches.\n- Security headers use the same deterministic rules as HeaderLens (HSTS, CSP, nosniff, framing, Referrer-Policy, Permissions-Policy, validators, Vary, compression, version disclosure).\n- Technology fingerprints come from response headers (Server, X-Powered-By, vendor headers) and HTML markers (meta generator, well-known asset paths such as /wp-content/, /_next/static/, /_nuxt/). Confidence: high = explicit self-identification, medium = characteristic path, low = weak hint.",
        "tags": [
          "infrastructure"
        ],
        "x-mcp-tool": "http_technology_explorer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HttpTechnologyExplorerInput"
              },
              "examples": {
                "example1": {
                  "summary": "WordPress shop behind nginx (pasted)",
                  "value": {
                    "mode": "paste",
                    "rawHeaders": "HTTP/1.1 301 Moved Permanently\nLocation: https://www.example-shop.test/\nServer: nginx\n\nHTTP/2 200\nserver: nginx/1.24.0\ndate: Mon, 12 Oct 2026 10:00:00 GMT\ncontent-type: text/html; charset=UTF-8\ncontent-encoding: br\nvary: Accept-Encoding, Cookie\ncache-control: public, max-age=300, s-maxage=600\netag: \"5f2a-63c1\"\nlast-modified: Mon, 12 Oct 2026 09:30:00 GMT\nage: 42\nx-powered-by: PHP/8.2.12\nlink: <https://www.example-shop.test/wp-json/>; rel=\"https://api.w.org/\"\nalt-svc: h3=\":443\"; ma=86400\nstrict-transport-security: max-age=31536000; includeSubDomains\nx-content-type-options: nosniff\nreferrer-policy: strict-origin-when-cross-origin\nset-cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=Lax",
                    "html": "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><title>Example shop</title>\n<meta name=\"generator\" content=\"WordPress 6.6.2\">\n<link rel=\"stylesheet\" href=\"/wp-content/themes/shop/style.css\">\n<script src=\"/wp-includes/js/jquery/jquery.min.js?ver=3.7.1\"></script>\n<script async src=\"https://www.googletagmanager.com/gtag/js?id=G-TEST123\"></script>\n</head><body><h1>Example shop</h1></body></html>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpTechnologyExplorerResult"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "HttpTechnologyExplorerInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "enum": [
              "live",
              "paste"
            ],
            "default": "live"
          },
          "url": {
            "title": "URL (live mode)",
            "type": "string",
            "format": "uri"
          },
          "rawHeaders": {
            "title": "Raw response headers (paste mode)",
            "description": "Output of curl -sIL or the browser's raw response headers. Several blocks are read as a redirect chain.",
            "type": "string",
            "maxLength": 60000
          },
          "html": {
            "title": "HTML source (paste mode, optional)",
            "type": "string",
            "maxLength": 400000
          }
        },
        "required": []
      },
      "HttpTechnologyExplorerResult": {
        "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": [
              "mode",
              "requestedUrl",
              "finalUrl",
              "status",
              "redirects",
              "httpsUpgrade",
              "protocols",
              "compression",
              "caching",
              "security",
              "technologies",
              "headers"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "live",
                  "paste"
                ]
              },
              "requestedUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "finalUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "redirects": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "status",
                    "location"
                  ],
                  "properties": {
                    "status": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "location": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "httpsUpgrade": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "protocols": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "observed",
                  "http2Advertised",
                  "http3Advertised",
                  "altSvc"
                ],
                "properties": {
                  "observed": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "http2Advertised": {
                    "type": "boolean"
                  },
                  "http3Advertised": {
                    "type": "boolean"
                  },
                  "altSvc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "compression": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "encoding",
                  "compressed",
                  "contentType"
                ],
                "properties": {
                  "encoding": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "compressed": {
                    "type": "boolean"
                  },
                  "contentType": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "caching": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "verdict",
                  "cacheControl",
                  "maxAge",
                  "sMaxAge",
                  "sharedTtl",
                  "etag",
                  "lastModified",
                  "age",
                  "vary",
                  "expires"
                ],
                "properties": {
                  "verdict": {
                    "type": "string"
                  },
                  "cacheControl": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "maxAge": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "sMaxAge": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "sharedTtl": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "etag": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lastModified": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "age": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "vary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expires": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "security": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "header",
                    "present",
                    "value",
                    "severity",
                    "summary"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "header": {
                      "type": "string"
                    },
                    "present": {
                      "type": "boolean"
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "good",
                        "info",
                        "warning"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    }
                  }
                }
              },
              "technologies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "category",
                    "confidence",
                    "evidence",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "evidence": {
                      "type": "string"
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "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"
              }
            }
          }
        }
      }
    }
  }
}