API Documentation

Comprehensive guides and API references for integrating AntiBait's email threat detection into your applications.

IOC Statistics

Premium

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 & Metrics

Generate threat intelligence reports and security metrics for stakeholders

Authentication Required

This endpoint requires a valid API key. Include your API key in the Authorization header as a Bearer token.

Pro Tip

Combine this endpoint with the IOC Query and Graph APIs to build comprehensive threat intelligence platforms. Use the timeline data for visualizing attack trends over time.

Need help integrating our API? Our support team is here to assist you.