{
  "openapi": "3.0.3",
  "info": {
    "title": "GlobalStats API",
    "version": "2.0.0",
    "description": "**GlobalStats API** is a free, public API providing **151+ endpoints** for security analysis, OSINT intelligence, threat monitoring, developer utilities, and entertainment.\n\n## Key Features\n- **[SECURITY]** 108 Security & OSINT endpoints — DNS, TLS, WHOIS, CVE, threat intel, vulnerability scanning\n- **[UTILS]** 33 Utility endpoints — encoding, hashing, QR codes, password generation, JSON tools, dictionary, country info\n- **[META]** 22 Meta endpoints — real-time stats, uptime, monitoring, alerting, data export\n- **[FUN]** 3 Fun endpoints — jokes, quotes, Pokémon\n\n## Authentication\nNo API keys required. All endpoints are publicly accessible.\n\n## Rate Limiting\n- **60 requests per minute** per IP address\n- Rate limit headers included in every response: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`\n- `429 Too Many Requests` returned when exceeded\n\n## Response Format\nAll responses follow a consistent envelope format:\n```json\n{\n  \"success\": true,\n  \"data\": { ... },\n  \"meta\": {\n    \"endpoint\": \"health\",\n    \"response_time_ms\": 18,\n    \"timestamp\": \"2026-03-08T12:00:00Z\",\n    \"rate_limit_remaining\": 59\n  }\n}\n```\n\n## Error Handling\nErrors return structured JSON with `success: false`, an error code, and a human-readable message.\n\n## CORS\nFull CORS support enabled. Use from any origin, including browsers.\n\n## Base URL\n`https://tools.globalstats.xyz/api`",
    "contact": {
      "name": "GlobalStats API Support",
      "url": "https://tools.globalstats.xyz/status",
      "email": "support@globalstats.xyz"
    },
    "license": {
      "name": "Public API — Free to Use",
      "url": "https://tools.globalstats.xyz"
    },
    "x-logo": {
      "url": "https://tools.globalstats.xyz/favicon.ico"
    }
  },
  "servers": [
    {
      "url": "https://tools.globalstats.xyz/api",
      "description": "Production — Edge-delivered, globally distributed"
    }
  ],
  "tags": [
    {
      "name": "security",
      "description": "Security analysis, OSINT, vulnerability scanning, DNS/TLS checks, threat intelligence, and email security endpoints. Covers 109 endpoints for comprehensive domain, IP, URL, and infrastructure security assessment."
    },
    {
      "name": "meta",
      "description": "Platform health, usage statistics, uptime monitoring, webhook alerts, incident tracking, data export, and API documentation endpoints."
    },
    {
      "name": "utils",
      "description": "Developer utility endpoints for encoding/decoding, hashing, password generation, JSON formatting, QR codes, color conversion, regex testing, and more."
    },
    {
      "name": "fun",
      "description": "Entertainment endpoints for jokes, inspirational quotes, and Pokémon data."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": ["meta"],
        "summary": "API root — Welcome & category listing",
        "description": "Returns API version, author info, total endpoint count, and a categorized listing of all available endpoints.",
        "operationId": "getRoot",
        "responses": {
          "200": {
            "description": "API information with categorized endpoint listing",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "message": "Welcome to HBK API!",
                    "version": "2.0.0",
                    "author": "hbkvxncent",
                    "endpoints": 164,
                    "documentation": "https://tools.globalstats.xyz/api/docs",
                    "rate_limit": { "requests": 60, "window": "60 seconds" },
                    "categories": {
                      "security": ["url-check", "dns-lookup", "ssl-check"],
                      "meta": ["health", "stats", "uptime"],
                      "utils": ["random", "uuid", "hash"],
                      "fun": ["joke", "quote"]
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": { "$ref": "#/components/headers/XRateLimitLimit" },
              "X-RateLimit-Remaining": { "$ref": "#/components/headers/XRateLimitRemaining" },
              "X-Response-Time": { "$ref": "#/components/headers/XResponseTime" }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/InternalError" }
        }
      }
    },
    "/health": {
      "get": {
        "tags": ["meta"],
        "summary": "Health check",
        "description": "Returns the current health status of the API, including version, timestamp, rate limit configuration, and total endpoint count.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    { "$ref": "#/components/schemas/Envelope" },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/HealthResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "success": true,
                  "data": {
                    "status": "healthy",
                    "timestamp": "2026-03-08T12:00:00Z",
                    "version": "2.0.0",
                    "author": "hbkvxncent",
                    "rate_limit": 60,
                    "endpoints": 164
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/health/upstreams": {
      "get": {
        "tags": ["meta"],
        "summary": "Upstream health probe",
        "description": "Probes every external upstream the API depends on (DNS resolvers, joke/quote/fact sources, IP geolocation, threat intel, NVD, dictionary, etc.) and reports per-source HTTP status and latency. Useful for diagnosing why a particular endpoint is returning fallback data.",
        "operationId": "getUpstreamHealth",
        "responses": {
          "200": {
            "description": "Upstream probe results",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "checked_at": "2026-05-24T00:00:00Z",
                    "total": 19,
                    "healthy": 17,
                    "degraded": 2,
                    "probes": [
                      { "name": "google-dns", "url": "https://dns.google/resolve?name=google.com&type=A", "ok": true, "status": 200, "latency_ms": 42 },
                      { "name": "urlhaus", "url": "https://urlhaus-api.abuse.ch/v1/url/", "ok": false, "status": 401, "latency_ms": 71 }
                    ]
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/docs": {
      "get": {
        "tags": ["meta"],
        "summary": "Full endpoint documentation",
        "description": "Returns comprehensive documentation for every endpoint including descriptions, parameters, example requests, and response shapes.",
        "operationId": "getDocs",
        "responses": {
          "200": {
            "description": "Complete endpoint catalog",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "version": "2.0.0",
                    "base_url": "https://tools.globalstats.xyz/api",
                    "total_endpoints": 164,
                    "categories": ["security", "meta", "utils", "fun"],
                    "rate_limit": { "requests": 60, "window": "60 seconds" },
                    "endpoints": {
                      "url-check": {
                        "description": "Check if a URL is malicious using URLhaus database",
                        "params": { "url": "URL to check for malware" },
                        "example": "/url-check?url=https://example.com",
                        "response": { "url": "string", "is_malicious": "boolean" },
                        "category": "security"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/api-info": {
      "get": {
        "tags": ["meta"],
        "summary": "API version and system info",
        "description": "Returns API version, author, system information, and total endpoint count.",
        "operationId": "getApiInfo",
        "responses": {
          "200": {
            "description": "API system information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "version": "2.0.0", "author": "hbkvxncent", "endpoints": 164, "runtime": "Deno", "uptime": "99.9%" }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/uptime": {
      "get": {
        "tags": ["meta"],
        "summary": "API uptime since deployment",
        "description": "Returns real uptime duration since the API was first deployed, formatted in human-readable time.",
        "operationId": "getUptime",
        "responses": {
          "200": {
            "description": "Uptime information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "uptime_seconds": 2592000,
                    "uptime_formatted": "30d 0h 0m 0s",
                    "started_at": "2026-02-06T00:00:00Z",
                    "status": "up"
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/uptime-history": {
      "get": {
        "tags": ["meta"],
        "summary": "Historical uptime data",
        "description": "Returns API uptime history from the database with daily data points.",
        "operationId": "getUptimeHistory",
        "responses": {
          "200": {
            "description": "Uptime history array",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "history": [{ "date": "2026-03-07", "uptime_percent": 99.99, "downtime_seconds": 0 }], "current_uptime": "30d 0h 0m" }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/stats": {
      "get": {
        "tags": ["meta"],
        "summary": "API usage statistics",
        "description": "Returns total requests, 24h request count, average response time, and other usage metrics.",
        "operationId": "getStats",
        "responses": {
          "200": {
            "description": "Usage statistics",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "total_requests": 91627, "requests_24h": 1200, "avg_response_time_ms": 428 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/stats/regions": {
      "get": {
        "tags": ["meta"],
        "summary": "Usage statistics by region/country",
        "description": "Returns API usage broken down by country and region with request counts.",
        "operationId": "getStatsRegions",
        "responses": {
          "200": {
            "description": "Regional statistics",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "by_country": [{ "country": "US", "count": 800 }], "total_countries": 5 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/stats/hourly": {
      "get": {
        "tags": ["meta"],
        "summary": "Hourly request statistics (24h)",
        "description": "Returns hourly request counts and average response times for the past 24 hours.",
        "operationId": "getStatsHourly",
        "responses": {
          "200": {
            "description": "Hourly statistics array",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "hourly": [{ "hour": "2026-03-08T00:00:00Z", "count": 45, "avg_response_ms": 320 }] }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/stats/endpoints": {
      "get": {
        "tags": ["meta"],
        "summary": "Per-endpoint statistics",
        "description": "Returns request counts and average response times broken down by individual endpoint.",
        "operationId": "getStatsEndpoints",
        "responses": {
          "200": {
            "description": "Endpoint statistics",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "endpoints": [{ "endpoint": "/health", "count": 542, "avg_ms": 12 }] }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/stats/live": {
      "get": {
        "tags": ["meta"],
        "summary": "Live request feed (anonymized)",
        "description": "Returns a real-time feed of the most recent API requests with anonymized data.",
        "operationId": "getStatsLive",
        "responses": {
          "200": {
            "description": "Live request feed",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "requests": [{ "endpoint": "/health", "country": "US", "status": 200, "time_ago": "2s" }], "count": 20 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/rate-limit-info": {
      "get": {
        "tags": ["meta"],
        "summary": "Current rate limit status",
        "description": "Returns your current rate limit status including remaining requests and reset time.",
        "operationId": "getRateLimitInfo",
        "responses": {
          "200": {
            "description": "Rate limit status",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "limit": 60, "remaining": 58, "reset_in_seconds": 42 }
                }
              }
            }
          }
        }
      }
    },
    "/latency-by-region": {
      "get": {
        "tags": ["meta"],
        "summary": "Latency by geographic region",
        "description": "Returns average API response latency broken down by geographic region.",
        "operationId": "getLatencyByRegion",
        "responses": {
          "200": {
            "description": "Regional latency data",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "regions": [{ "region": "North America", "avg_latency_ms": 120 }] }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/edge-location": {
      "get": {
        "tags": ["meta"],
        "summary": "Edge server location",
        "description": "Returns information about the edge server handling your request.",
        "operationId": "getEdgeLocation",
        "responses": {
          "200": {
            "description": "Edge location info",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "edge": "us-east-1", "region": "North America", "timestamp": "2026-03-08T12:00:00Z" }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/headers-echo": {
      "get": {
        "tags": ["meta"],
        "summary": "Echo request headers",
        "description": "Echoes back all request headers and metadata. Useful for debugging.",
        "operationId": "getHeadersEcho",
        "responses": {
          "200": {
            "description": "Request headers echoed back",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "headers": { "user-agent": "Mozilla/5.0", "accept": "*/*" }, "method": "GET", "url": "/headers-echo" }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/monitors": {
      "get": {
        "tags": ["meta"],
        "summary": "List URL monitors",
        "description": "Returns all configured URL monitors with their current status.",
        "operationId": "getMonitors",
        "responses": {
          "200": {
            "description": "Monitor list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "monitors": [{ "id": "abc-123", "url": "https://example.com", "status": "up", "interval_seconds": 300 }], "count": 1 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      },
      "post": {
        "tags": ["meta"],
        "summary": "Create a URL monitor",
        "description": "Create a new URL monitor that periodically checks availability.",
        "operationId": "createMonitor",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": { "type": "string", "description": "URL to monitor", "example": "https://example.com" },
                  "interval": { "type": "integer", "description": "Check interval in seconds (default: 300)", "example": 300 },
                  "tags": { "type": "string", "description": "Comma-separated tags", "example": "production,api" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Monitor created",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/monitors/history": {
      "get": {
        "tags": ["meta"],
        "summary": "Monitor check history",
        "description": "Returns the check history for a specific monitor including latency and status.",
        "operationId": "getMonitorHistory",
        "parameters": [
          { "in": "query", "name": "id", "required": true, "description": "Monitor ID", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Check history",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "history": [{ "checked_at": "2026-03-08T12:00:00Z", "status": "up", "latency_ms": 120 }], "monitor": { "id": "abc-123", "url": "https://example.com" } }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/incidents": {
      "get": {
        "tags": ["meta"],
        "summary": "List incidents",
        "description": "Returns all incidents, including active and resolved ones.",
        "operationId": "getIncidents",
        "responses": {
          "200": {
            "description": "Incident list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "incidents": [{ "id": "inc-1", "title": "High latency", "severity": "minor", "status": "resolved" }], "count": 1 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/alerts/webhooks": {
      "get": {
        "tags": ["meta"],
        "summary": "List webhook destinations",
        "description": "Returns all configured webhook alert destinations.",
        "operationId": "getAlertsWebhooks",
        "responses": {
          "200": {
            "description": "Webhook list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/alerts/webhook-test": {
      "get": {
        "tags": ["meta"],
        "summary": "Test a webhook destination",
        "description": "Sends a sample alert payload to the specified webhook URL to verify it works.",
        "operationId": "getAlertsWebhookTest",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "Webhook URL to test", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": {
            "description": "Test result",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "success": true, "status_code": 200, "response_time_ms": 340 }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/export/analytics": {
      "get": {
        "tags": ["meta"],
        "summary": "Export analytics data",
        "description": "Export API analytics data as JSON or CSV. Supports configurable time range.",
        "operationId": "getExportAnalytics",
        "parameters": [
          { "in": "query", "name": "format", "description": "Output format: `json` or `csv` (default: json)", "schema": { "type": "string", "enum": ["json", "csv"], "default": "json" } },
          { "in": "query", "name": "days", "description": "Number of days to export (1-30, default: 7)", "schema": { "type": "integer", "minimum": 1, "maximum": 30, "default": 7 } }
        ],
        "responses": {
          "200": {
            "description": "Exported data",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/export/threats": {
      "get": {
        "tags": ["meta"],
        "summary": "Export threat feed data",
        "description": "Export threat feed data as JSON or CSV.",
        "operationId": "getExportThreats",
        "parameters": [
          { "in": "query", "name": "format", "description": "Output format: `json` or `csv`", "schema": { "type": "string", "enum": ["json", "csv"], "default": "json" } },
          { "in": "query", "name": "days", "description": "Number of days (1-30, default: 7)", "schema": { "type": "integer", "minimum": 1, "maximum": 30, "default": 7 } }
        ],
        "responses": {
          "200": {
            "description": "Exported threat data",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/url-check": {
      "get": {
        "tags": ["security"],
        "summary": "Check URL against malware database",
        "description": "Checks if a URL is listed in the URLhaus malware database. Returns threat type, tags, and malicious status.",
        "operationId": "getUrlCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "Full URL to check for malware (e.g., `https://example.com/malware`)", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": {
            "description": "URL check result",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [{ "$ref": "#/components/schemas/Envelope" }, { "properties": { "data": { "$ref": "#/components/schemas/UrlCheckResponse" } } }]
                },
                "example": {
                  "success": true,
                  "data": { "url": "https://example.com", "is_malicious": false, "threat_type": "none", "tags": [] }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/InternalError" }
        }
      }
    },
    "/host-check": {
      "get": {
        "tags": ["security"],
        "summary": "Check host against malware database",
        "description": "Checks if a domain or IP is listed in the malware database with associated malicious URLs.",
        "operationId": "getHostCheck",
        "parameters": [
          { "in": "query", "name": "host", "required": true, "description": "Domain or IP to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Host check result",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "host": "example.com", "is_malicious": false, "url_count": 0, "urls": [] }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ip-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "IP geolocation lookup",
        "description": "Returns geolocation data for an IP address including country, city, region, ISP, and timezone. Defaults to the caller's IP if none provided.",
        "operationId": "getIpLookup",
        "parameters": [
          { "in": "query", "name": "ip", "description": "IP address to lookup (optional — uses your IP if empty)", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": {
            "description": "Geolocation data",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [{ "$ref": "#/components/schemas/Envelope" }, { "properties": { "data": { "$ref": "#/components/schemas/IpLookupResponse" } } }]
                },
                "example": {
                  "success": true,
                  "data": { "ip": "8.8.8.8", "country": "US", "region": "California", "city": "Mountain View", "org": "Google LLC", "timezone": "America/Los_Angeles", "lat": 37.386, "lon": -122.0838 }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dns-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "DNS record lookup",
        "description": "Resolves DNS records (A, AAAA, CNAME, MX, TXT, NS) for a domain.",
        "operationId": "getDnsLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "DNS records",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "domain": "google.com", "records": [{ "type": "A", "value": "142.250.80.46", "ttl": 300 }] }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dns-propagation": {
      "get": {
        "tags": ["security"],
        "summary": "DNS propagation check",
        "description": "Checks DNS propagation across multiple global resolvers (Google, Cloudflare, OpenDNS, etc.).",
        "operationId": "getDnsPropagation",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check propagation for", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Propagation results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/reverse-dns": {
      "get": {
        "tags": ["security"],
        "summary": "Reverse DNS lookup",
        "description": "Performs a PTR record lookup to find the hostname associated with an IP address.",
        "operationId": "getReverseDns",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP address to lookup", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "Reverse DNS result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "ip": "8.8.8.8", "hostname": "dns.google", "resolved": true } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/mx-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "MX record lookup",
        "description": "Returns MX (Mail Exchange) records for a domain sorted by priority.",
        "operationId": "getMxLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup MX records for", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "MX records", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "gmail.com", "records": [{ "priority": 5, "exchange": "gmail-smtp-in.l.google.com" }], "count": 5 } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ns-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "NS record lookup",
        "description": "Returns authoritative nameservers for a domain.",
        "operationId": "getNsLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Nameserver records", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/txt-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "TXT record lookup",
        "description": "Returns TXT records including SPF and DMARC for a domain.",
        "operationId": "getTxtLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "TXT records", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/caa-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "CAA record lookup",
        "description": "Returns Certificate Authority Authorization records for a domain.",
        "operationId": "getCaaLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "CAA records", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/soa-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "SOA record lookup",
        "description": "Returns Start of Authority DNS record with primary NS, admin email, and serial.",
        "operationId": "getSoaLookup",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "SOA record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/site-check": {
      "get": {
        "tags": ["security"],
        "summary": "Website accessibility check",
        "description": "Sends a HEAD request to check if a website is accessible, returning status code and response time.",
        "operationId": "getSiteCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Accessibility result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "url": "https://google.com", "is_up": true, "status_code": 200, "response_time_ms": 120 } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/header-check": {
      "get": {
        "tags": ["security"],
        "summary": "Security headers analysis",
        "description": "Analyzes HTTP security headers (HSTS, CSP, X-Frame-Options, etc.) and provides a security score with recommendations.",
        "operationId": "getHeaderCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to analyze", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Header analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "url": "https://google.com", "security_score": 85, "headers": { "strict-transport-security": "max-age=31536000", "x-content-type-options": "nosniff" }, "recommendations": ["Add Content-Security-Policy header"] } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/headers-check-extended": {
      "get": {
        "tags": ["security"],
        "summary": "Advanced security headers analysis",
        "description": "Deep analysis of security headers with scoring, issue detection, and detailed recommendations.",
        "operationId": "getHeadersCheckExtended",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to analyze", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Extended header analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ssl-check": {
      "get": {
        "tags": ["security"],
        "summary": "SSL certificate check",
        "description": "Checks SSL certificate validity, issuer, and expiration date for a domain.",
        "operationId": "getSslCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check SSL for", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "SSL info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "google.com", "is_valid": true, "issuer": "Google Trust Services", "expires": "2026-06-01T00:00:00Z" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cert-check": {
      "get": {
        "tags": ["security"],
        "summary": "Certificate chain & validity",
        "description": "Checks the full SSL certificate chain, validity status, issuer, expiration, and days remaining.",
        "operationId": "getCertCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Certificate details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cve-latest": {
      "get": {
        "tags": ["security"],
        "summary": "Latest CVE vulnerabilities",
        "description": "Fetches the most recent CVE vulnerabilities from the National Vulnerability Database (NVD).",
        "operationId": "getCveLatest",
        "parameters": [
          { "in": "query", "name": "count", "description": "Number of CVEs to return (1-20, default: 5)", "schema": { "type": "integer", "minimum": 1, "maximum": 20, "default": 5 } }
        ],
        "responses": {
          "200": { "description": "Latest CVEs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "cves": [{ "id": "CVE-2026-1234", "description": "Buffer overflow in...", "severity": "HIGH", "published": "2026-03-07" }], "count": 5 } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cve-search": {
      "get": {
        "tags": ["security"],
        "summary": "Search CVE database",
        "description": "Searches the CVE database by keyword (e.g., 'apache', 'wordpress', 'openssl').",
        "operationId": "getCveSearch",
        "parameters": [
          { "in": "query", "name": "keyword", "required": true, "description": "Search term", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "CVE search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/whois-lite": {
      "get": {
        "tags": ["security"],
        "summary": "WHOIS domain lookup",
        "description": "Returns basic WHOIS information including registrar, creation date, and expiration.",
        "operationId": "getWhoisLite",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "WHOIS data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "example.com", "registrar": "RESERVED-Internet Assigned Numbers Authority", "created": "1995-08-14", "expires": "2026-08-13" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/domain-age": {
      "get": {
        "tags": ["security"],
        "summary": "Domain age check",
        "description": "Checks the age and creation date of a domain. Useful for identifying newly registered suspicious domains.",
        "operationId": "getDomainAge",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Domain age", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/subdomains": {
      "get": {
        "tags": ["security"],
        "summary": "Subdomain discovery (CT logs)",
        "description": "Finds subdomains using Certificate Transparency logs.",
        "operationId": "getSubdomains",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to search", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Discovered subdomains", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "example.com", "subdomains": ["www.example.com", "mail.example.com"], "count": 2 } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/subdomain-enum": {
      "get": {
        "tags": ["security"],
        "summary": "Subdomain enumeration (multi-source)",
        "description": "Enumerates subdomains using multiple sources for comprehensive discovery.",
        "operationId": "getSubdomainEnum",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to enumerate", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Enumerated subdomains", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/subdomain-takeover": {
      "get": {
        "tags": ["security"],
        "summary": "Subdomain takeover check",
        "description": "Checks for potential subdomain takeover vulnerabilities by analyzing CNAME records.",
        "operationId": "getSubdomainTakeover",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Takeover analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dmarc-check": {
      "get": {
        "tags": ["security"],
        "summary": "DMARC record analysis",
        "description": "Analyzes DMARC records including policy, reporting URIs, and alignment mode.",
        "operationId": "getDmarcCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "DMARC analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "example.com", "has_dmarc": true, "policy": "reject", "rua": "mailto:dmarc@example.com" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/spf-check": {
      "get": {
        "tags": ["security"],
        "summary": "SPF record validation",
        "description": "Validates SPF records and shows all included mechanisms and domains.",
        "operationId": "getSpfCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to validate", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "SPF validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dkim-check": {
      "get": {
        "tags": ["security"],
        "summary": "DKIM selector check",
        "description": "Checks DKIM selector records for a domain to verify email signing configuration.",
        "operationId": "getDkimCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } },
          { "in": "query", "name": "selector", "description": "DKIM selector (default: `default`)", "schema": { "type": "string", "default": "default" } }
        ],
        "responses": {
          "200": { "description": "DKIM result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/bimi-check": {
      "get": {
        "tags": ["security"],
        "summary": "BIMI record check",
        "description": "Checks Brand Indicators for Message Identification (BIMI) record for logo display in email clients.",
        "operationId": "getBimiCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "BIMI result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/email-spoof-check": {
      "get": {
        "tags": ["security"],
        "summary": "Email spoofing vulnerability check",
        "description": "Checks if a domain is vulnerable to email spoofing by analyzing SPF, DKIM, and DMARC configuration.",
        "operationId": "getEmailSpoofCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Spoofing risk assessment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/email-verify-lite": {
      "get": {
        "tags": ["security"],
        "summary": "Email syntax & MX verification",
        "description": "Verifies email syntax validity and checks if the domain has MX records configured.",
        "operationId": "getEmailVerifyLite",
        "parameters": [
          { "in": "query", "name": "email", "required": true, "description": "Email address to verify", "schema": { "type": "string", "format": "email" } }
        ],
        "responses": {
          "200": { "description": "Email verification result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/email-breach-check": {
      "get": {
        "tags": ["security"],
        "summary": "Email domain breach check",
        "description": "Checks if an email's domain has been involved in known data breaches.",
        "operationId": "getEmailBreachCheck",
        "parameters": [
          { "in": "query", "name": "email", "required": true, "description": "Email address to check", "schema": { "type": "string", "format": "email" } }
        ],
        "responses": {
          "200": { "description": "Breach check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/phishing-check": {
      "get": {
        "tags": ["security"],
        "summary": "Phishing URL detection",
        "description": "Analyzes a URL for phishing indicators including suspicious patterns, newly registered domains, and known phishing signatures.",
        "operationId": "getPhishingCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to analyze", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Phishing analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "url": "https://suspicious-site.com", "is_suspicious": true, "risk_score": 75, "indicators": ["newly_registered", "suspicious_tld"] } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/safe-browsing": {
      "get": {
        "tags": ["security"],
        "summary": "Safe browsing check",
        "description": "Checks URL against known malicious URL lists for safe browsing verification.",
        "operationId": "getSafeBrowsing",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Safe browsing result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/malware-url-scan": {
      "get": {
        "tags": ["security"],
        "summary": "Malware URL scan",
        "description": "Scans a URL against multiple malware and phishing databases.",
        "operationId": "getMalwareUrlScan",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to scan", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Scan result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/blacklist-check": {
      "get": {
        "tags": ["security"],
        "summary": "Blacklist check (Spamhaus, SURBL, etc.)",
        "description": "Checks a domain or IP against multiple blacklists including Spamhaus, SURBL, and others.",
        "operationId": "getBlacklistCheck",
        "parameters": [
          { "in": "query", "name": "target", "required": true, "description": "Domain or IP to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Blacklist results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/audit": {
      "get": {
        "tags": ["security"],
        "summary": "Comprehensive security audit",
        "description": "Performs a comprehensive security audit of a domain covering DNS, SSL, headers, email security, and more. Returns an overall security score.",
        "operationId": "getAudit",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to audit", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Audit results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "domain": "example.com", "score": 72, "checks": { "ssl": "pass", "headers": "warn", "dns": "pass", "email": "fail" } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/security-score": {
      "get": {
        "tags": ["security"],
        "summary": "Security posture score",
        "description": "Comprehensive security posture scoring for a domain with letter grade.",
        "operationId": "getSecurityScore",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to score", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Security score", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/vuln-scan-lite": {
      "get": {
        "tags": ["security"],
        "summary": "Light vulnerability scan",
        "description": "Quick vulnerability scan for common security issues on a URL.",
        "operationId": "getVulnScanLite",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to scan", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Scan results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/port-scan-lite": {
      "get": {
        "tags": ["security"],
        "summary": "Common port scan",
        "description": "Checks common ports (80, 443, 8080, 22) on a host for open services.",
        "operationId": "getPortScanLite",
        "parameters": [
          { "in": "query", "name": "host", "required": true, "description": "Host to scan", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Port scan results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/port-scan-extended": {
      "get": {
        "tags": ["security"],
        "summary": "Extended port scan",
        "description": "Scans extended range of common service ports with service identification.",
        "operationId": "getPortScanExtended",
        "parameters": [
          { "in": "query", "name": "host", "required": true, "description": "Host to scan", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Extended scan results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ping": {
      "get": {
        "tags": ["security"],
        "summary": "Host latency measurement",
        "description": "Measures latency to a host via HTTP request timing.",
        "operationId": "getPing",
        "parameters": [
          { "in": "query", "name": "host", "required": true, "description": "Host to ping", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Ping result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "host": "google.com", "latency_ms": 24, "reachable": true } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/traceroute-lite": {
      "get": {
        "tags": ["security"],
        "summary": "Network path trace",
        "description": "Gets network path information to a host.",
        "operationId": "getTracerouteLite",
        "parameters": [
          { "in": "query", "name": "host", "required": true, "description": "Host to trace", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Trace result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/asn-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "ASN lookup",
        "description": "Looks up Autonomous System Number information for an IP address.",
        "operationId": "getAsnLookup",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP address to lookup", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "ASN info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/asn-enrichment": {
      "get": {
        "tags": ["security"],
        "summary": "Enriched ASN data",
        "description": "Returns enriched ASN data including organization details and abuse contact information.",
        "operationId": "getAsnEnrichment",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP address to enrich", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "Enriched ASN data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ip-info-extended": {
      "get": {
        "tags": ["security"],
        "summary": "Extended IP information",
        "description": "Returns extended IP information including ISP, ASN, proxy/VPN detection, and datacenter identification.",
        "operationId": "getIpInfoExtended",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP address to lookup", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "Extended IP info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ip-reputation": {
      "get": {
        "tags": ["security"],
        "summary": "IP reputation check",
        "description": "Checks an IP address reputation including proxy, VPN, and Tor detection.",
        "operationId": "getIpReputation",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP to check", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "IP reputation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/domain-reputation": {
      "get": {
        "tags": ["security"],
        "summary": "Domain reputation & trust score",
        "description": "Checks domain reputation with trust scoring, category classification, and warning flags.",
        "operationId": "getDomainReputation",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Domain reputation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/threat-intel": {
      "get": {
        "tags": ["security"],
        "summary": "Threat intelligence lookup",
        "description": "Returns threat intelligence data for an IP or domain including risk scoring and categorization.",
        "operationId": "getThreatIntel",
        "parameters": [
          { "in": "query", "name": "target", "required": true, "description": "IP or domain to lookup", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Threat intel data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/threat-map": {
      "get": {
        "tags": ["security"],
        "summary": "Live threat activity feed",
        "description": "Returns recent threat activity from the GlobalStats threat feed with geographic distribution.",
        "operationId": "getThreatMap",
        "responses": {
          "200": { "description": "Threat activity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/threat/correlate": {
      "get": {
        "tags": ["security"],
        "summary": "Threat data correlation",
        "description": "Correlates threat data across IP addresses and domains for IOC analysis.",
        "operationId": "getThreatCorrelate",
        "parameters": [
          { "in": "query", "name": "ip", "description": "IP address to correlate", "schema": { "type": "string" } },
          { "in": "query", "name": "domain", "description": "Domain to correlate", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Correlation results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/threat/stats": {
      "get": {
        "tags": ["security"],
        "summary": "Threat feed statistics",
        "description": "Returns threat feed statistics including event counts by type, risk level, and top source countries.",
        "operationId": "getThreatStats",
        "responses": {
          "200": { "description": "Threat statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/threat/feedback": {
      "post": {
        "tags": ["security"],
        "summary": "Submit threat feedback",
        "description": "Submit false positive or confirmation feedback on a threat event.",
        "operationId": "postThreatFeedback",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["threat_id"],
                "properties": {
                  "threat_id": { "type": "string", "description": "Threat event ID" },
                  "feedback_type": { "type": "string", "enum": ["false_positive", "confirmed"], "default": "false_positive" },
                  "reason": { "type": "string", "description": "Explanation for feedback" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Feedback submitted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/abuse/logs": {
      "get": {
        "tags": ["security"],
        "summary": "Abuse event logs",
        "description": "Returns recent abuse event logs including blocked requests and detected attacks.",
        "operationId": "getAbuseLogs",
        "responses": {
          "200": { "description": "Abuse logs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/abuse/stats": {
      "get": {
        "tags": ["security"],
        "summary": "Abuse protection statistics",
        "description": "Returns abuse protection statistics including total blocked requests and top offending IPs.",
        "operationId": "getAbuseStats",
        "responses": {
          "200": { "description": "Abuse statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/hash-identify": {
      "get": {
        "tags": ["security"],
        "summary": "Hash type identification",
        "description": "Identifies the type of a hash string (MD5, SHA1, SHA256, bcrypt, etc.) with confidence scoring.",
        "operationId": "getHashIdentify",
        "parameters": [
          { "in": "query", "name": "hash", "required": true, "description": "Hash string to identify", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Hash identification", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/http-fingerprint": {
      "get": {
        "tags": ["security"],
        "summary": "HTTP server fingerprinting",
        "description": "Fingerprints a website's server software, CDN, framework, and technology stack.",
        "operationId": "getHttpFingerprint",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to fingerprint", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Fingerprint results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/tech-detect": {
      "get": {
        "tags": ["security"],
        "summary": "Technology detection",
        "description": "Detects technologies, frameworks, CMS, and libraries used by a website.",
        "operationId": "getTechDetect",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to analyze", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Detected technologies", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/robots-check": {
      "get": {
        "tags": ["security"],
        "summary": "Robots.txt analysis",
        "description": "Parses and analyzes a website's robots.txt file for disallowed paths and sitemap references.",
        "operationId": "getRobotsCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Robots.txt analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/favicon": {
      "get": {
        "tags": ["security"],
        "summary": "Favicon URL & hash",
        "description": "Gets the favicon URL and hash for a domain. Useful for OSINT favicon-based searching.",
        "operationId": "getFavicon",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Favicon info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/html-scrape-lite": {
      "get": {
        "tags": ["security"],
        "summary": "HTML scraping (title, meta, headings)",
        "description": "Extracts title, meta tags, and headings from a URL for reconnaissance.",
        "operationId": "getHtmlScrapeLite",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to scrape", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Scraped data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/sitemap-parse": {
      "get": {
        "tags": ["security"],
        "summary": "Sitemap.xml parser",
        "description": "Parses sitemap.xml and lists all URLs found.",
        "operationId": "getSitemapParse",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to parse sitemap from", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Parsed sitemap", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/redirect-trace": {
      "get": {
        "tags": ["security"],
        "summary": "Redirect chain trace",
        "description": "Traces all HTTP redirects for a URL showing the complete redirect chain.",
        "operationId": "getRedirectTrace",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to trace", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Redirect chain", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/link-check": {
      "get": {
        "tags": ["security"],
        "summary": "Link destination check",
        "description": "Follows a URL to its final destination, checks safety, and returns the full redirect chain.",
        "operationId": "getLinkCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to trace", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Link check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cookie-check": {
      "get": {
        "tags": ["security"],
        "summary": "Cookie security analysis",
        "description": "Analyzes cookies set by a website for security issues (HttpOnly, Secure, SameSite flags).",
        "operationId": "getCookieCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Cookie analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cors-check": {
      "get": {
        "tags": ["security"],
        "summary": "CORS configuration check",
        "description": "Checks CORS (Cross-Origin Resource Sharing) configuration of a URL.",
        "operationId": "getCorsCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "CORS config", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/clickjacking-check": {
      "get": {
        "tags": ["security"],
        "summary": "Clickjacking vulnerability test",
        "description": "Tests if a site is vulnerable to clickjacking by checking X-Frame-Options and CSP frame-ancestors.",
        "operationId": "getClickjackingCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to test", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Clickjacking analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/open-redirect-check": {
      "get": {
        "tags": ["security"],
        "summary": "Open redirect test",
        "description": "Tests for open redirect vulnerabilities in a URL.",
        "operationId": "getOpenRedirectCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to test", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Open redirect result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/content-security-policy": {
      "get": {
        "tags": ["security"],
        "summary": "CSP analysis",
        "description": "Analyzes Content Security Policy directives with scoring and issue detection.",
        "operationId": "getContentSecurityPolicy",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to analyze", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "CSP analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/csp-evaluator": {
      "get": {
        "tags": ["security"],
        "summary": "Deep CSP evaluation with bypass analysis",
        "description": "Deep evaluation of Content Security Policy including potential bypass vectors.",
        "operationId": "getCspEvaluator",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to evaluate", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "CSP evaluation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/referrer-policy-check": {
      "get": {
        "tags": ["security"],
        "summary": "Referrer-Policy check",
        "description": "Checks Referrer-Policy header configuration and provides security recommendations.",
        "operationId": "getReferrerPolicyCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Referrer policy analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/permissions-policy-check": {
      "get": {
        "tags": ["security"],
        "summary": "Permissions-Policy analysis",
        "description": "Analyzes Permissions-Policy (Feature-Policy) header configuration.",
        "operationId": "getPermissionsPolicyCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Permissions policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/sri-check": {
      "get": {
        "tags": ["security"],
        "summary": "Subresource Integrity check",
        "description": "Checks SRI implementation on external scripts and stylesheets.",
        "operationId": "getSriCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "SRI analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/mixed-content-check": {
      "get": {
        "tags": ["security"],
        "summary": "Mixed content detection",
        "description": "Detects HTTP resources loaded on HTTPS pages (mixed content issues).",
        "operationId": "getMixedContentCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Mixed content analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/http-methods-check": {
      "get": {
        "tags": ["security"],
        "summary": "Allowed HTTP methods check",
        "description": "Checks which HTTP methods are allowed on a URL, flagging dangerous methods like DELETE/PUT.",
        "operationId": "getHttpMethodsCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Allowed methods", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dnssec-check": {
      "get": {
        "tags": ["security"],
        "summary": "DNSSEC validation check",
        "description": "Checks if DNSSEC is enabled and properly configured for a domain.",
        "operationId": "getDnssecCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "DNSSEC status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dns-zone-transfer": {
      "get": {
        "tags": ["security"],
        "summary": "DNS zone transfer test (AXFR)",
        "description": "Tests if DNS zone transfer (AXFR) is allowed, which is a common misconfiguration.",
        "operationId": "getDnsZoneTransfer",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to test", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Zone transfer test result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/tls-config-score": {
      "get": {
        "tags": ["security"],
        "summary": "TLS configuration quality score",
        "description": "Scores TLS/SSL configuration quality with letter grade and detailed issue reporting.",
        "operationId": "getTlsConfigScore",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to analyze", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "TLS score", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cipher-check": {
      "get": {
        "tags": ["security"],
        "summary": "TLS cipher suite check",
        "description": "Checks supported TLS cipher suites and identifies weak ciphers.",
        "operationId": "getCipherCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Cipher suites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/hsts-preload-check": {
      "get": {
        "tags": ["security"],
        "summary": "HSTS preload eligibility",
        "description": "Checks if a domain is eligible for the HSTS preload list.",
        "operationId": "getHstsPreloadCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "HSTS preload status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/http2-check": {
      "get": {
        "tags": ["security"],
        "summary": "HTTP/2 and HTTP/3 support check",
        "description": "Checks if a URL supports HTTP/2 and HTTP/3 protocols.",
        "operationId": "getHttp2Check",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Protocol support", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/waf-detect": {
      "get": {
        "tags": ["security"],
        "summary": "WAF detection",
        "description": "Detects the presence and identity of Web Application Firewalls protecting a URL.",
        "operationId": "getWafDetect",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "WAF detection result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/leak-check": {
      "get": {
        "tags": ["security"],
        "summary": "Exposed file detection",
        "description": "Checks for commonly exposed sensitive files on a domain (.env, .git, backup files, etc.).",
        "operationId": "getLeakCheck",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Leak detection results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/api-security-check": {
      "get": {
        "tags": ["security"],
        "summary": "API endpoint security check",
        "description": "Checks API endpoint security practices including authentication, CORS, and rate limiting.",
        "operationId": "getApiSecurityCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "API URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "API security assessment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/npm-health": {
      "get": {
        "tags": ["security"],
        "summary": "NPM package health check",
        "description": "Checks NPM package health including version, license, last publish date, and download stats.",
        "operationId": "getNpmHealth",
        "parameters": [
          { "in": "query", "name": "package", "required": true, "description": "NPM package name", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Package health", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "name": "lodash", "version": "4.17.21", "license": "MIT", "last_publish": "2021-02-20" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/npm-audit": {
      "get": {
        "tags": ["security"],
        "summary": "NPM vulnerability audit",
        "description": "Checks an NPM package for known security vulnerabilities.",
        "operationId": "getNpmAudit",
        "parameters": [
          { "in": "query", "name": "package", "required": true, "description": "NPM package name", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Vulnerability report", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/pass-strength": {
      "get": {
        "tags": ["security"],
        "summary": "Password strength checker",
        "description": "Analyzes password strength with detailed feedback, crack time estimation, and improvement suggestions.",
        "operationId": "getPassStrength",
        "parameters": [
          { "in": "query", "name": "password", "required": true, "description": "Password to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Strength analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/osint-email": {
      "get": {
        "tags": ["security"],
        "summary": "OSINT email lookup",
        "description": "OSINT investigation of an email address including domain info, social profile discovery, and breach history.",
        "operationId": "getOsintEmail",
        "parameters": [
          { "in": "query", "name": "email", "required": true, "description": "Email to investigate", "schema": { "type": "string", "format": "email" } }
        ],
        "responses": {
          "200": { "description": "OSINT results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/osint-domain": {
      "get": {
        "tags": ["security"],
        "summary": "OSINT domain lookup",
        "description": "OSINT investigation of a domain including DNS, technology detection, and social media links.",
        "operationId": "getOsintDomain",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to investigate", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "OSINT results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/osint-username": {
      "get": {
        "tags": ["security"],
        "summary": "Username availability check",
        "description": "Checks username availability across major platforms (GitHub, Twitter, Reddit, etc.).",
        "operationId": "getOsintUsername",
        "parameters": [
          { "in": "query", "name": "username", "required": true, "description": "Username to search", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Username results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/shodan-lookup": {
      "get": {
        "tags": ["security"],
        "summary": "Shodan-style host info",
        "description": "Returns basic host information similar to Shodan including open ports and services.",
        "operationId": "getShodanLookup",
        "parameters": [
          { "in": "query", "name": "ip", "required": true, "description": "IP to lookup", "schema": { "type": "string", "format": "ipv4" } }
        ],
        "responses": {
          "200": { "description": "Host info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/wayback-check": {
      "get": {
        "tags": ["security"],
        "summary": "Wayback Machine check",
        "description": "Checks if a URL exists in the Internet Archive's Wayback Machine with snapshot counts.",
        "operationId": "getWaybackCheck",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Wayback Machine result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/leaked-data-check": {
      "get": {
        "tags": ["security"],
        "summary": "Data leak check",
        "description": "Checks if a domain or email appears in known data leak databases.",
        "operationId": "getLeakedDataCheck",
        "parameters": [
          { "in": "query", "name": "query", "required": true, "description": "Email or domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Leak check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/scan/start": {
      "post": {
        "tags": ["security"],
        "summary": "Start async security scan",
        "description": "Starts an asynchronous security scan job. Returns a job ID for polling status.",
        "operationId": "postScanStart",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["target"],
                "properties": {
                  "target": { "type": "string", "description": "Domain or URL to scan" },
                  "type": { "type": "string", "enum": ["full", "quick", "headers", "ssl"], "default": "full", "description": "Scan type" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Scan started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "job_id": "abc-123", "status": "queued", "target": "example.com" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/scan/status": {
      "get": {
        "tags": ["security"],
        "summary": "Get scan job status",
        "description": "Returns the status and results of an async scan job.",
        "operationId": "getScanStatus",
        "parameters": [
          { "in": "query", "name": "id", "required": true, "description": "Scan job ID", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Scan status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/synthetic/dns": {
      "get": {
        "tags": ["security"],
        "summary": "Synthetic DNS check",
        "description": "Synthetic DNS resolution check with precise timing measurement.",
        "operationId": "getSyntheticDns",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to resolve", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "DNS check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/synthetic/tls": {
      "get": {
        "tags": ["security"],
        "summary": "Synthetic TLS handshake check",
        "description": "Synthetic TLS handshake check with certificate details and timing.",
        "operationId": "getSyntheticTls",
        "parameters": [
          { "in": "query", "name": "domain", "required": true, "description": "Domain to check", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "TLS check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/synthetic/http": {
      "get": {
        "tags": ["security"],
        "summary": "Synthetic HTTP check",
        "description": "Synthetic HTTP check with optional keyword matching in response body.",
        "operationId": "getSyntheticHttp",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to check", "schema": { "type": "string", "format": "uri" } },
          { "in": "query", "name": "keyword", "description": "Optional keyword to match in response", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "HTTP check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/random": {
      "get": {
        "tags": ["utils"],
        "summary": "Random number generator",
        "description": "Generates a cryptographically random number within a specified range.",
        "operationId": "getRandom",
        "parameters": [
          { "in": "query", "name": "min", "description": "Minimum value (default: 1)", "schema": { "type": "integer", "default": 1 } },
          { "in": "query", "name": "max", "description": "Maximum value (default: 100)", "schema": { "type": "integer", "default": 100 } }
        ],
        "responses": {
          "200": { "description": "Random number", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "random": 42, "min": 1, "max": 100 } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/uuid": {
      "get": {
        "tags": ["utils"],
        "summary": "UUID v4 generator",
        "description": "Generates a cryptographically random UUID v4.",
        "operationId": "getUuid",
        "responses": {
          "200": { "description": "Generated UUID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/timestamp": {
      "get": {
        "tags": ["utils"],
        "summary": "Current timestamp",
        "description": "Returns the current timestamp in ISO 8601, Unix, and human-readable formats.",
        "operationId": "getTimestamp",
        "responses": {
          "200": { "description": "Timestamp data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "timestamp": "2026-03-08T12:00:00Z", "unix": 1772985600, "formatted": "March 8, 2026 12:00:00 PM UTC" } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/hash": {
      "get": {
        "tags": ["utils"],
        "summary": "Text encoding/hashing",
        "description": "Encodes text to base64 or other supported formats.",
        "operationId": "getHash",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Text to encode", "schema": { "type": "string" } },
          { "in": "query", "name": "algorithm", "description": "Algorithm: `base64` (default)", "schema": { "type": "string", "default": "base64" } }
        ],
        "responses": {
          "200": { "description": "Encoded text", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "original": "hello", "encoded": "aGVsbG8=", "algorithm": "base64" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/useragent": {
      "get": {
        "tags": ["utils"],
        "summary": "User-Agent parser",
        "description": "Parses and analyzes the User-Agent header including device type and bot detection.",
        "operationId": "getUseragent",
        "responses": {
          "200": { "description": "Parsed user agent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/ip": {
      "get": {
        "tags": ["utils"],
        "summary": "Your IP address",
        "description": "Returns the caller's IP address and request headers.",
        "operationId": "getIp",
        "responses": {
          "200": { "description": "IP and headers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "ip": "203.0.113.1", "headers": { "user-agent": "Mozilla/5.0" } } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/color": {
      "get": {
        "tags": ["utils"],
        "summary": "Random color generator",
        "description": "Generates a random color in HEX, RGB, RGBA, and HSL formats.",
        "operationId": "getColor",
        "responses": {
          "200": { "description": "Random color", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "hex": "#ff5733", "rgb": { "r": 255, "g": 87, "b": 51 }, "rgba": "rgba(255,87,51,1)", "hsl": "hsl(11,100%,60%)" } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/color-convert": {
      "get": {
        "tags": ["utils"],
        "summary": "Color format converter",
        "description": "Converts colors between HEX, RGB, HSL, and CMYK formats.",
        "operationId": "getColorConvert",
        "parameters": [
          { "in": "query", "name": "hex", "required": true, "description": "HEX color to convert (e.g., `#ff5733`)", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Converted color", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/password": {
      "get": {
        "tags": ["utils"],
        "summary": "Secure password generator",
        "description": "Generates a cryptographically secure random password with configurable length.",
        "operationId": "getPassword",
        "parameters": [
          { "in": "query", "name": "length", "description": "Password length (4-128, default: 16)", "schema": { "type": "integer", "minimum": 4, "maximum": 128, "default": 16 } }
        ],
        "responses": {
          "200": { "description": "Generated password", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "password": "k$9Lm!xR2@pQ7nWv", "length": 16, "strength": "strong" } } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/lorem": {
      "get": {
        "tags": ["utils"],
        "summary": "Lorem ipsum generator",
        "description": "Generates lorem ipsum placeholder text with configurable paragraph count.",
        "operationId": "getLorem",
        "parameters": [
          { "in": "query", "name": "paragraphs", "description": "Number of paragraphs (1-10, default: 1)", "schema": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1 } }
        ],
        "responses": {
          "200": { "description": "Generated text", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/qrcode": {
      "get": {
        "tags": ["utils"],
        "summary": "QR code generator",
        "description": "Generates a QR code image URL for any text or URL.",
        "operationId": "getQrcode",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Text or URL to encode", "schema": { "type": "string" } },
          { "in": "query", "name": "size", "description": "Image size in pixels (100-500, default: 200)", "schema": { "type": "integer", "minimum": 100, "maximum": 500, "default": 200 } }
        ],
        "responses": {
          "200": { "description": "QR code URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/cron-explain": {
      "get": {
        "tags": ["utils"],
        "summary": "Cron expression explainer",
        "description": "Converts a cron expression to human-readable format.",
        "operationId": "getCronExplain",
        "parameters": [
          { "in": "query", "name": "cron", "required": true, "description": "Cron expression (e.g., `*/5 * * * *`)", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Explanation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/text-analyze": {
      "get": {
        "tags": ["utils"],
        "summary": "Text analysis",
        "description": "Analyzes text for word count, character count, reading time, and basic sentiment.",
        "operationId": "getTextAnalyze",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Text to analyze", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Text analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/markdown-to-html": {
      "get": {
        "tags": ["utils"],
        "summary": "Markdown to HTML converter",
        "description": "Converts Markdown text to HTML.",
        "operationId": "getMarkdownToHtml",
        "parameters": [
          { "in": "query", "name": "markdown", "required": true, "description": "Markdown text to convert", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "HTML output", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/extract-links": {
      "get": {
        "tags": ["utils"],
        "summary": "Link & image extractor",
        "description": "Extracts all links and images from a webpage.",
        "operationId": "getExtractLinks",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to scrape", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Extracted links", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/base64-encode": {
      "get": {
        "tags": ["utils"],
        "summary": "Base64 encode",
        "description": "Encodes text to Base64 format.",
        "operationId": "getBase64Encode",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Text to encode", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Encoded result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/base64-decode": {
      "get": {
        "tags": ["utils"],
        "summary": "Base64 decode",
        "description": "Decodes a Base64 string back to plain text.",
        "operationId": "getBase64Decode",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Base64 string to decode", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Decoded result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/url-encode": {
      "get": {
        "tags": ["utils"],
        "summary": "URL encode",
        "description": "URL-encodes a string for safe use in URLs.",
        "operationId": "getUrlEncode",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "Text to encode", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Encoded result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/url-decode": {
      "get": {
        "tags": ["utils"],
        "summary": "URL decode",
        "description": "Decodes a URL-encoded string.",
        "operationId": "getUrlDecode",
        "parameters": [
          { "in": "query", "name": "text", "required": true, "description": "URL-encoded string", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Decoded result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/jwt-decode": {
      "get": {
        "tags": ["utils"],
        "summary": "JWT token decoder",
        "description": "Decodes a JWT token showing header and payload (without signature verification).",
        "operationId": "getJwtDecode",
        "parameters": [
          { "in": "query", "name": "token", "required": true, "description": "JWT token to decode", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Decoded JWT", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/unix-to-date": {
      "get": {
        "tags": ["utils"],
        "summary": "Unix timestamp to date",
        "description": "Converts a Unix timestamp to ISO 8601 and human-readable date formats.",
        "operationId": "getUnixToDate",
        "parameters": [
          { "in": "query", "name": "timestamp", "required": true, "description": "Unix timestamp", "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": { "description": "Date conversion", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/date-to-unix": {
      "get": {
        "tags": ["utils"],
        "summary": "Date to Unix timestamp",
        "description": "Converts an ISO date string to a Unix timestamp.",
        "operationId": "getDateToUnix",
        "parameters": [
          { "in": "query", "name": "date", "required": true, "description": "Date in ISO format", "schema": { "type": "string", "format": "date-time" } }
        ],
        "responses": {
          "200": { "description": "Unix timestamp", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/http-status": {
      "get": {
        "tags": ["utils"],
        "summary": "HTTP status code reference",
        "description": "Returns the specified HTTP status code with its standard message. Useful for testing error handling.",
        "operationId": "getHttpStatus",
        "parameters": [
          { "in": "query", "name": "code", "required": true, "description": "HTTP status code (100-599)", "schema": { "type": "integer", "minimum": 100, "maximum": 599 } }
        ],
        "responses": {
          "200": { "description": "Status code info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "code": 418, "message": "I'm a teapot" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/json-pretty": {
      "get": {
        "tags": ["utils"],
        "summary": "JSON formatter/minifier",
        "description": "Formats JSON for readability or minifies it for transport.",
        "operationId": "getJsonPretty",
        "parameters": [
          { "in": "query", "name": "json", "required": true, "description": "JSON string to format", "schema": { "type": "string" } },
          { "in": "query", "name": "minify", "description": "Set to `true` to minify (default: false)", "schema": { "type": "boolean", "default": false } }
        ],
        "responses": {
          "200": { "description": "Formatted JSON", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/json-validate": {
      "get": {
        "tags": ["utils"],
        "summary": "JSON validator",
        "description": "Validates JSON syntax and returns parsing results.",
        "operationId": "getJsonValidate",
        "parameters": [
          { "in": "query", "name": "json", "required": true, "description": "JSON string to validate", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/regex-test": {
      "get": {
        "tags": ["utils"],
        "summary": "Regex pattern tester",
        "description": "Tests a regex pattern against text and returns all matches with groups.",
        "operationId": "getRegexTest",
        "parameters": [
          { "in": "query", "name": "pattern", "required": true, "description": "Regex pattern", "schema": { "type": "string" } },
          { "in": "query", "name": "text", "required": true, "description": "Text to test against", "schema": { "type": "string" } },
          { "in": "query", "name": "flags", "description": "Regex flags (g, i, m, etc.)", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Match results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/shorten-url": {
      "get": {
        "tags": ["utils"],
        "summary": "URL shortener",
        "description": "Creates a shortened URL. Links auto-expire after 30 days. Multiple short links can be created for the same URL.",
        "operationId": "getShortenUrl",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "URL to shorten", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Shortened URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" }, "example": { "success": true, "data": { "original": "https://example.com/very/long/path", "short_id": "abc123", "short_url": "https://tools.globalstats.xyz/r/abc123" } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/file-type": {
      "get": {
        "tags": ["utils"],
        "summary": "File type detection",
        "description": "Detects MIME type from base64 data or URL.",
        "operationId": "getFileType",
        "parameters": [
          { "in": "query", "name": "data", "required": true, "description": "Base64 data or URL to analyze", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "File type info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/insta-proxy": {
      "get": {
        "tags": ["utils"],
        "summary": "CORS proxy",
        "description": "Fetches a URL via server-side proxy to bypass CORS restrictions. Internal/private addresses are blocked for security (SSRF protection).",
        "operationId": "getInstaProxy",
        "parameters": [
          { "in": "query", "name": "url", "required": true, "description": "Public URL to fetch (internal IPs blocked)", "schema": { "type": "string", "format": "uri" } }
        ],
        "responses": {
          "200": { "description": "Proxied response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/joke": {
      "get": {
        "tags": ["fun"],
        "summary": "Random joke",
        "description": "Returns a random joke with setup and punchline.",
        "operationId": "getJoke",
        "responses": {
          "200": {
            "description": "A random joke",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "setup": "Why do programmers prefer dark mode?", "punchline": "Because light attracts bugs.", "type": "programming" }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/quote": {
      "get": {
        "tags": ["fun"],
        "summary": "Inspirational quote",
        "description": "Returns a random inspirational quote with author attribution.",
        "operationId": "getQuote",
        "responses": {
          "200": {
            "description": "A random quote",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": { "quote": "The only way to do great work is to love what you do.", "author": "Steve Jobs", "tags": ["motivation", "work"] }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/pokemon": {
      "get": {
        "tags": ["fun"],
        "summary": "Random Pokémon data",
        "description": "Returns data for a random Pokémon or a specific one by name/ID. Includes types, stats, abilities, and official artwork sprite.",
        "operationId": "getPokemon",
        "parameters": [
          { "in": "query", "name": "name", "required": false, "description": "Pokémon name or Pokédex ID (random if omitted)", "schema": { "type": "string" }, "examples": { "byName": { "value": "pikachu" }, "byId": { "value": "25" } } }
        ],
        "responses": {
          "200": {
            "description": "Pokémon data",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "name": "pikachu",
                    "id": 25,
                    "types": ["electric"],
                    "stats": { "hp": 35, "attack": 55, "defense": 40, "special-attack": 50, "special-defense": 50, "speed": 90 },
                    "sprite": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png",
                    "height": 4,
                    "weight": 60,
                    "abilities": ["static", "lightning-rod"]
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/dictionary": {
      "get": {
        "tags": ["utils"],
        "summary": "Word definition lookup",
        "description": "Looks up a word's definitions, phonetics, pronunciation audio, and usage examples using the Free Dictionary API.",
        "operationId": "getDictionary",
        "parameters": [
          { "in": "query", "name": "word", "required": true, "description": "Word to look up", "schema": { "type": "string" }, "example": "serendipity" }
        ],
        "responses": {
          "200": {
            "description": "Word definition",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "word": "serendipity",
                    "phonetic": "/ˌsɛ.ɹən.ˈdɪ.pɪ.ti/",
                    "audio": "https://api.dictionaryapi.dev/media/pronunciations/en/serendipity-au.mp3",
                    "meanings": [{ "part_of_speech": "noun", "definitions": [{ "definition": "An unsought, unintended, and/or unexpected, but fortunate, discovery.", "example": null }] }],
                    "source": "https://en.wiktionary.org/wiki/serendipity"
                  }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/country-info": {
      "get": {
        "tags": ["utils"],
        "summary": "Country information lookup",
        "description": "Returns detailed information about a country including capital, population, area, languages, currencies, flag, timezones, and borders.",
        "operationId": "getCountryInfo",
        "parameters": [
          { "in": "query", "name": "name", "required": true, "description": "Country name to look up", "schema": { "type": "string" }, "example": "japan" }
        ],
        "responses": {
          "200": {
            "description": "Country information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Envelope" },
                "example": {
                  "success": true,
                  "data": {
                    "name": "Japan",
                    "official_name": "Japan",
                    "capital": "Tokyo",
                    "population": 125836021,
                    "area_km2": 377930,
                    "region": "Asia",
                    "subregion": "Eastern Asia",
                    "languages": { "jpn": "Japanese" },
                    "currencies": { "JPY": { "name": "Japanese yen", "symbol": "¥" } },
                    "flag_emoji": "🇯🇵",
                    "flag_svg": "https://flagcdn.com/jp.svg",
                    "timezones": ["UTC+09:00"],
                    "borders": [],
                    "maps": "https://goo.gl/maps/NGTLSCSrA8bMrvnX9"
                  }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Envelope": {
        "type": "object",
        "description": "Standard API response envelope wrapping all endpoint responses.",
        "required": ["success", "data"],
        "properties": {
          "success": { "type": "boolean", "description": "Whether the request was successful", "example": true },
          "data": { "type": "object", "description": "Endpoint-specific response payload", "additionalProperties": true },
          "meta": { "$ref": "#/components/schemas/ResponseMeta" }
        },
        "example": {
          "success": true,
          "data": { "status": "ok" },
          "meta": { "endpoint": "health", "response_time_ms": 18, "timestamp": "2026-03-08T12:00:00Z", "rate_limit_remaining": 59 }
        }
      },
      "ResponseMeta": {
        "type": "object",
        "description": "Metadata included with every response.",
        "properties": {
          "endpoint": { "type": "string", "description": "The endpoint that was called", "example": "health" },
          "response_time_ms": { "type": "number", "description": "Server-side processing time in milliseconds", "example": 18 },
          "timestamp": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp of the response", "example": "2026-03-08T12:00:00Z" },
          "rate_limit_remaining": { "type": "integer", "description": "Remaining requests in current rate limit window", "example": 59 }
        }
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "enum": ["healthy", "degraded", "down"], "example": "healthy" },
          "timestamp": { "type": "string", "format": "date-time" },
          "version": { "type": "string", "example": "2.0.0" },
          "author": { "type": "string", "example": "hbkvxncent" },
          "rate_limit": { "type": "integer", "example": 60 },
          "endpoints": { "type": "integer", "description": "Total number of available endpoints", "example": 164 }
        }
      },
      "UrlCheckResponse": {
        "type": "object",
        "properties": {
          "url": { "type": "string", "format": "uri" },
          "is_malicious": { "type": "boolean" },
          "threat_type": { "type": "string", "description": "Type of threat detected or 'none'" },
          "tags": { "type": "array", "items": { "type": "string" }, "description": "Associated threat tags" }
        }
      },
      "IpLookupResponse": {
        "type": "object",
        "properties": {
          "ip": { "type": "string", "format": "ipv4" },
          "country": { "type": "string" },
          "region": { "type": "string" },
          "city": { "type": "string" },
          "org": { "type": "string", "description": "ISP or organization" },
          "timezone": { "type": "string" },
          "lat": { "type": "number" },
          "lon": { "type": "number" }
        }
      },
      "ErrorDetails": {
        "type": "object",
        "additionalProperties": true,
        "description": "Optional machine-readable error details."
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": ["success", "error", "message"],
        "description": "Standard error response format.",
        "properties": {
          "success": { "type": "boolean", "example": false },
          "error": { "type": "string", "description": "Error type/code", "example": "ValidationError" },
          "message": { "type": "string", "description": "Human-readable error message", "example": "Domain parameter required" },
          "details": { "$ref": "#/components/schemas/ErrorDetails" },
          "request_id": { "type": "string", "description": "Trace identifier for debugging" },
          "meta": {
            "type": "object",
            "properties": {
              "timestamp": { "type": "string", "format": "date-time" },
              "endpoint": { "type": "string" }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "**400** — Required parameter missing or invalid.",
        "headers": {
          "X-RateLimit-Limit": { "$ref": "#/components/headers/XRateLimitLimit" },
          "X-RateLimit-Remaining": { "$ref": "#/components/headers/XRateLimitRemaining" }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorEnvelope" },
            "examples": {
              "missingParam": {
                "summary": "Missing required query parameter",
                "value": { "success": false, "error": "ValidationError", "message": "Domain parameter required" }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "**429** — Rate limit exceeded. Max 60 requests per minute per IP.",
        "headers": {
          "X-RateLimit-Limit": { "$ref": "#/components/headers/XRateLimitLimit" },
          "X-RateLimit-Remaining": { "$ref": "#/components/headers/XRateLimitRemaining" },
          "X-RateLimit-Reset": { "$ref": "#/components/headers/XRateLimitReset" }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorEnvelope" },
            "examples": {
              "rateLimit": {
                "summary": "Rate limit exceeded",
                "value": { "success": false, "error": "Rate limit exceeded", "message": "Too many requests, retry later.", "details": { "retry_after_ms": 12000 } }
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "**500** — Unexpected server error.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorEnvelope" },
            "examples": {
              "serverError": {
                "summary": "Generic server error",
                "value": { "success": false, "error": "Internal server error", "message": "Please try again later" }
              }
            }
          }
        }
      }
    },
    "headers": {
      "XRateLimitLimit": {
        "description": "Total requests allowed per minute (60).",
        "schema": { "type": "integer", "example": 60 }
      },
      "XRateLimitRemaining": {
        "description": "Remaining requests in current window.",
        "schema": { "type": "integer", "example": 58 }
      },
      "XRateLimitReset": {
        "description": "Seconds until rate limit window resets.",
        "schema": { "type": "integer", "example": 42 }
      },
      "XResponseTime": {
        "description": "Server-side response time.",
        "schema": { "type": "string", "example": "42ms" }
      }
    }
  },
  "externalDocs": {
    "description": "Full integration docs, examples, and interactive testing",
    "url": "https://tools.globalstats.xyz/docs/swagger"
  },
  "security": []
}
