Quick Start

Base URL: https://asn.haus/api/

Single Endpoint: All queries use /api/query with different parameters for different data types.

GET Unified Query API

Single endpoint that handles all ASN queries with advanced filtering, sorting, and search capabilities.

Endpoint

GET /api/query

Parameters

Parameter Type Description Examples
type string Query type search, worst, stats, top_countries
asn integer Specific ASN number 1, 13335, 64512
q string Search query (text, org name) "cloudflare", "google", "malware"
sort string Sort order score_desc, reports_desc, asn_asc
limit integer Max results (1-100) 10, 50, 100
min_score float Minimum abuse score 5.0, 8.5
max_score float Maximum abuse score 2.0, 7.5
min_reports integer Minimum report count 10, 100
country string Country code filter US, CN, RU

Query Examples

Lookup Single ASN

/api/query?asn=13335

Top 20 Worst ASNs

/api/query?type=worst&limit=20

ASNs with High Threat Score

/api/query?min_score=8.0&min_reports=50&sort=score_desc

Search by Organization

/api/query?q=cloudflare&sort=reports_desc

Worst Countries by Abuse

/api/query?type=top_countries&limit=15

System Statistics

/api/query?type=stats

Response Format

All responses follow this JSON structure:

{
  "success": true,
  "type": "search",
  "total": 25,
  "limit": 20,
  "filters": {
    "min_score": 5.0,
    "sort": "score_desc"
  },
  "data": [
    {
      "asn_number": 13335,
      "organization": "Cloudflare Inc",
      "country": "US",
      "abuse_score": 2.1,
      "total_reports": 45,
      "is_admin_locked": false,
      "description": "Cloudflare CDN",
      "updated_at": "2025-06-28 13:31:24"
    }
  ],
  "meta": {
    "timestamp": 1751110284,
    "version": "2.0",
    "cached": true
  }
}