Developer docs

Documentation

Guides and API reference for running AntiBait analysis from the web app or from your own code.

API reference

IOC statistics

Business

Get comprehensive threat intelligence statistics including trending IOCs, top malicious infrastructure, and timeline analysis.

API endpoint

GET
GET/api/iocs/stats

Query parameters

timeRange?: number (default: 30)
  // Time range in days for trending data

Response

{
  "success": true,
  "data": {
    "iocsByType": [...],
    "trendingIOCs": [...],
    "topDomains": [...],
    "topIPs": [...],
    "timeline": [...],
    "threatPatterns": [...],
    "relationshipStats": [...]
  }
}

Example request

Request

GET /api/iocs/stats?timeRange=30
Authorization: Bearer YOUR_API_KEY

Response

{
  "success": true,
  "data": {
    "iocsByType": [
      {
        "ioc_type": "domain",
        "count": 1543,
        "malicious_count": 876
      },
      {
        "ioc_type": "email",
        "count": 982,
        "malicious_count": 543
      }
    ],
    "trendingIOCs": [
      {
        "ioc_type": "domain",
        "ioc_value": "evil-phishing.com",
        "threat_score": 95,
        "occurrence_count": 47,
        "last_seen": "2025-11-03T10:30:00Z"
      }
    ],
    "topDomains": [
      {
        "domain": "malicious-site.net",
        "threat_score": 98,
        "occurrence_count": 52,
        "first_seen": "2025-10-15T08:20:00Z",
        "last_seen": "2025-11-03T09:15:00Z"
      }
    ],
    "topIPs": [
      {
        "ip": "203.0.113.1",
        "threat_score": 92,
        "occurrence_count": 38,
        "first_seen": "2025-10-20T12:00:00Z",
        "last_seen": "2025-11-02T18:45:00Z"
      }
    ],
    "timeline": [
      {
        "date": "2025-11-03",
        "new_iocs": 24,
        "malicious_iocs": 18
      },
      {
        "date": "2025-11-02",
        "new_iocs": 31,
        "malicious_iocs": 22
      }
    ],
    "threatPatterns": [
      {
        "subject": "Urgent: Verify Your Account",
        "threat_score": 88,
        "occurrence_count": 15,
        "last_seen": "2025-11-03T11:00:00Z"
      }
    ],
    "relationshipStats": [
      {
        "relationship_type": "email_uses_domain",
        "count": 982
      },
      {
        "relationship_type": "url_contains_domain",
        "count": 756
      }
    ]
  }
}

Response data sections

iocsByTypearray

Breakdown of IOC counts by type (email, domain, ip, etc.) with total and malicious counts

trendingIOCsarray

Top 50 malicious IOCs seen within the specified time range, ordered by occurrence count and threat score

topDomainsarray

Top 20 malicious domains with highest occurrence counts and threat scores

topIPsarray

Top 20 malicious IP addresses with highest occurrence counts and threat scores

timelinearray

Daily breakdown of new IOCs and malicious IOCs over the last 30 days for trend visualization

threatPatternsarray

Top 20 repeated subject lines from malicious emails indicating potential phishing campaigns

relationshipStatsarray

Count of IOC relationships by type for understanding infrastructure connections

Use cases

Threat intelligence dashboard

Build comprehensive dashboards showing trending threats and attack patterns

Campaign detection

Identify coordinated phishing campaigns through repeated patterns and infrastructure

Early warning system

Monitor trending IOCs for emerging threats and proactive defense

Reporting and metrics

Generate threat intelligence reports and security metrics for stakeholders

Need help integrating the API? The support team replies within 24 hours on business days.