D
DGuardAPI Documentation

URL Scanning

Real-time URL scanning to detect phishing, malware, and fraudulent sites.

Features

  • Real-time analysis (< 300ms)
  • Updated threat database
  • Typosquatting detection
  • SSL certificate analysis
  • Malicious redirect detection

Scan URL

Analyze a URL to detect threats.

POST/url/scan

Request Body

{
  "url": "https://paypa1-security.com/verify-account",
  "options": {
    "follow_redirects": true,
    "check_ssl": true,
    "check_reputation": true
  }
}

Response

{
  "scan_id": "scan_abc123",
  "url": "https://paypa1-security.com/verify-account",
  "is_safe": false,
  "risk_level": "critical",
  "risk_score": 0.94,
  "threat_types": ["phishing", "typosquatting"],
  "threats_detected": [
    {
      "type": "typosquatting",
      "severity": "critical",
      "description": "Domain 'paypa1-security.com' impersonates 'paypal.com'"
    },
    {
      "type": "phishing",
      "severity": "critical",
      "description": "Page designed to steal credentials"
    }
  ],
  "domain_info": {
    "domain": "paypa1-security.com",
    "registered_date": "2025-01-10",
    "age_days": 4,
    "is_new_domain": true
  },
  "ssl_info": {
    "valid": true,
    "issuer": "Let's Encrypt",
    "expires": "2025-04-10"
  },
  "recommendations": [
    "DO NOT visit this URL",
    "DO NOT enter any personal data",
    "Report to your security team"
  ],
  "scan_duration_ms": 187,
  "scanned_at": "2025-01-14T17:30:00Z"
}

Batch URL Scanning

Analyze multiple URLs in a single request.

Limits: Min 1 URL, Max 100 URLs

POST/url/scan/batch

Request Body

{
  "urls": [
    "https://suspicious-site1.com",
    "https://suspicious-site2.com",
    "https://legitimate-site.com"
  ],
  "options": {
    "follow_redirects": true
  }
}

Response

{
  "total_scanned": 3,
  "safe": 1,
  "threats": 2,
  "results": [
    {
      "url": "https://suspicious-site1.com",
      "is_safe": false,
      "risk_level": "high",
      "threat_types": ["phishing"]
    },
    {
      "url": "https://suspicious-site2.com",
      "is_safe": false,
      "risk_level": "critical",
      "threat_types": ["malware"]
    },
    {
      "url": "https://legitimate-site.com",
      "is_safe": true,
      "risk_level": "safe",
      "threat_types": []
    }
  ],
  "scan_duration_ms": 523
}

Report Malicious URL

Report a suspicious URL for review.

POST/url/report

Request Body

{
  "url": "https://scam-site.com",
  "threat_type": "phishing",
  "description": "Page impersonating bank to steal credentials",
  "confidence": 9,
  "evidence": {
    "screenshot_url": "https://storage.example.com/screenshot.png",
    "source": "user_report"
  }
}

Risk Levels

Safe (0.0 - 0.2)

No known threats

Low (0.2 - 0.4)

Minor anomalies detected

Medium (0.4 - 0.6)

Suspicious indicators present

High (0.6 - 0.8)

Multiple phishing indicators

Critical (0.8 - 1.0)

Confirmed malicious site