{
  "openapi": "3.0.3",
  "info": {
    "title": "IPSpeedPing API",
    "version": "1.0.0",
    "description": "Public JSON API for what-is-my-IP, IP geolocation, and website probe (DNS/TLS/HTTP). Informational only. https://ipspeedping.com/terms",
    "contact": { "url": "https://ipspeedping.com" },
    "license": { "name": "Use subject to site Terms", "url": "https://ipspeedping.com/terms" }
  },
  "servers": [{ "url": "https://ipspeedping.com" }],
  "paths": {
    "/api/me": {
      "get": {
        "summary": "Public IP of the caller",
        "description": "Returns the public IP this server saw plus ISP/geo when the address is public.",
        "responses": { "200": { "description": "IP and optional geo" }, "429": { "description": "Rate limited" } }
      }
    },
    "/api/geo": {
      "get": {
        "summary": "Lookup a public IP",
        "parameters": [{ "name": "ip", "in": "query", "required": true, "schema": { "type": "string" }, "example": "1.1.1.1" }],
        "responses": { "200": { "description": "Geo and ISP" }, "400": { "description": "Private or invalid IP" } }
      }
    },
    "/api/probe": {
      "get": {
        "summary": "Probe a public website",
        "parameters": [{ "name": "target", "in": "query", "required": true, "schema": { "type": "string" }, "example": "example.com" }],
        "responses": { "200": { "description": "DNS, TCP 80/443, TLS, HTTP, RDAP" }, "400": { "description": "Blocked or invalid host" } }
      },
      "post": {
        "summary": "Probe a public website",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string" } } } } }
        },
        "responses": { "200": { "description": "Probe result" } }
      }
    },
    "/api/health": {
      "get": { "summary": "Health check", "responses": { "200": { "description": "ok" } } }
    }
  }
}
