{
  "schema_version": "v1",
  "name": "RevealURL",
  "description": "Reveal the real destination behind shortened URLs before clicking. Follows every HTTP redirect hop server-side, returns the full redirect chain, and provides a 0–100 safety score to detect phishing and malicious links.",
  "url": "https://revealurl.yogeshchavan.dev",
  "version": "1.0.0",
  "privacy": {
    "url_logging": false,
    "data_retention": "none",
    "authentication_required": false
  },
  "capabilities": [
    "url-expansion",
    "redirect-chain-inspection",
    "safety-scoring",
    "phishing-detection"
  ],
  "api": {
    "type": "REST",
    "base_url": "https://revealurl.yogeshchavan.dev/api",
    "spec_url": "https://revealurl.yogeshchavan.dev/openapi.json",
    "endpoints": [
      {
        "path": "/unshorten",
        "method": "POST",
        "description": "Expand a shortened or unknown URL by following all HTTP redirects server-side. Returns the final destination, each intermediate hop with its HTTP status code, and a safety report.",
        "request": {
          "content_type": "application/json",
          "body": {
            "url": {
              "type": "string",
              "required": true,
              "description": "The URL to expand. Scheme (https://) is optional — it will be added automatically. Maximum 2048 characters.",
              "examples": ["bit.ly/3xExample", "https://tinyurl.com/demo", "t.co/abc123"]
            }
          }
        },
        "response": {
          "content_type": "application/json",
          "success": {
            "ok": true,
            "input": "The normalised input URL",
            "finalUrl": "The final destination URL after all redirects",
            "chain": "Array of { url, host, status } hops in order",
            "redirectCount": "Number of redirects followed (integer)",
            "details": "Parsed breakdown: { protocol, domain, path, query[] }",
            "safety": "Safety report: { level: safe|warning|suspicious, score: 0-100, findings[] }"
          },
          "error": {
            "ok": false,
            "code": "One of: invalid_url | unreachable | timeout | redirect_loop | too_many_redirects | server_error",
            "message": "Human-readable description of the error"
          }
        }
      }
    ]
  }
}
