hacknode.netIP Risk & AI Crawler Intelligence

Complete Developer Documentation

Everything you need to integrate HackNode REST API, curl CLI, Bulk Risk Analysis, Webhooks, MCP Server for AI Agents, and Enterprise Local Sidecar.

REST: https://api.hacknode.netMCP: https://mcp.hacknode.net/mcpCLI: curl https://hacknode.net

1. Quick Start & curl CLI

Calling hacknode.net from curl, wget, or HTTPie automatically routes to our in-memory Go API and returns pretty-printed JSON immediately.

Terminal (curl / wget)
# 1) Inspect your own public IP address
curl https://hacknode.net

# 2) Inspect any IPv4 or IPv6 address directly
curl https://hacknode.net/20.171.207.12
curl https://hacknode.net/2606:4700:4700::1111

# 3) Authenticated lookup with User-Agent spoof verification
curl -s "https://api.hacknode.net/v1/lookup/73.15.22.9?ua=GPTBot/1.2" \
  -H "Authorization: Bearer hn_live_your_api_key"

2. Authentication & Rate Limits

Anonymous requests are allowed up to 60 requests/hour per IP for quick evaluation. For production use, generate a free API key (1,000 req/day) inside the Developer Console. Keys use the prefix hn_live_ and can be passed in three ways:

Supported Auth Methods
# Recommended: Bearer Authorization Header
Authorization: Bearer hn_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Alternative 1: Custom Header
X-API-Key: hn_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Alternative 2: Query Parameter
GET https://api.hacknode.net/v1/lookup/1.1.1.1?api_key=hn_live_xxxx
TierMonthly QuotaBurst QPSMax BulkWebhooks
Anonymous60 / hour2 QPS50 IPs—
Free ($0)30,000 / mo (1k/day)5 QPS50 IPs1
Pro ($19)150,000 / mo50 QPS100 IPs2
Scale ($79)1,000,000 / mo200 QPS100 IPs10
EnterpriseUnlimited / Sidecar2,000+ QPS500 IPs50

Response headers returned on every metered call: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (Unix timestamp).

3. REST API Reference (https://api.hacknode.net)

Method & PathAuthDescription
GET /v1/lookup/meOptional KeyInspect caller's real IP (reads CF-Connecting-IP / X-Forwarded-For). Pass ?check_ua=1 to verify caller's User-Agent.
GET /v1/lookup/{ip}?ua=...Optional KeyLookup any IPv4/IPv6 with Geo, ASN, Cloud, Proxy/VPN/Tor/Abuser flags, AI Bot ownership, and spoof check.
POST /v1/bulkOptional KeyBatch inspect up to 50 (Free) or 100 (Pro/Scale) unique IPs in one JSON request.
GET /v1/asn/{asn}PublicGet organization, country, network type, IPv4/IPv6 counts, and baseline risk for ASxxxx.
GET /v1/asns?q=&type=&country=PublicSearch & paginate global ASN directory (supports offset/limit).
GET /v1/ai-botsPublicRetrieve full AI crawler catalog with live official CIDR counts.
GET /v1/ai-bots/rules?format=&preset=PublicExport ready-to-deploy plain-text rules (format=robots|nginx|cloudflare, preset=training|all).
GET /openapi.jsonPublicMachine-readable OpenAPI 3.1 specification.
GET /healthzPublicNode status, loaded hacknode.db version, db_age_hours, and index counts.
GET|POST|DELETE /v1/webhooksSession JWTManage HMAC-SHA256 signed real-time risk alert webhooks (+ POST /v1/webhooks/{id}/test).
GET /v1/logs?limit=50Session JWTFetch recent authenticated IP lookup audit logs.

4. Response Schema & Explainable Risk Scoring

Every lookup produces a deterministic, explainable 0–100 score so you never have to guess why an IP was flagged: Tor (+75), Abuser/Blocklist (+70), Proxy/VPN (+55), Datacenter (+40), and Spoofed AI Bot (minimum score 85). Recommended actions map cleanly: <35 = allow, 35–74 = challenge, 75+ = block.

Example Response — GET /v1/lookup/20.171.207.12?ua=GPTBot/1.2
{
  "ip": "20.171.207.12",
  "geo": {
    "country": "US",
    "region": "Washington",
    "city": "Redmond",
    "latitude": 47.673988,
    "longitude": -122.121513,
    "timezone": "America/Los_Angeles"
  },
  "network": {
    "asn": "AS8075",
    "asn_num": 8075,
    "org": "Microsoft Corporation",
    "type": "hosting",
    "provider": "azure"
  },
  "flags": {
    "is_datacenter": true,
    "is_proxy": false,
    "is_vpn": false,
    "is_tor": false,
    "is_abuser": false,
    "is_ai_bot": true,
    "is_spoofed_bot": false
  },
  "bot": {
    "name": "GPTBot",
    "owner": "OpenAI",
    "category": "ai_training",
    "verified": true
  },
  "risk": {
    "score": 40,
    "level": "medium",
    "recommendation": "challenge",
    "reasons": [
      "Originates from cloud / datacenter hosting IP range (+40)",
      "Verified official GPTBot (OpenAI) crawler IP"
    ]
  },
  "meta": {
    "latency_ms": 0.14,
    "db_version": "2026-11-30"
  }
}

5. AI Bot Spoof Detection & Automated Rule Export

Pass the request's User-Agent via ?ua=.... If the header claims to be GPTBot, ClaudeBot, or PerplexityBot while the source IP is outside that vendor's official published CIDRs, HackNode immediately sets flags.is_spoofed_bot = true and elevates risk.score >= 85.

Auto-update robots.txt / Nginx / Cloudflare WAF rules in CI/CD
# Download latest robots.txt blocking AI training crawlers (keeps AI search allowed)
curl -fsSL "https://api.hacknode.net/v1/ai-bots/rules?format=robots&preset=training" -o public/robots.txt

# Export Nginx map rules blocking all tracked AI crawlers
curl -fsSL "https://api.hacknode.net/v1/ai-bots/rules?format=nginx&preset=all" -o /etc/nginx/conf.d/ai-bots.conf

# Export Cloudflare WAF Custom Rule expression
curl -fsSL "https://api.hacknode.net/v1/ai-bots/rules?format=cloudflare&preset=training"

6. Bulk Lookup API (POST /v1/bulk)

Batch Inspect Up to 100 IPs
curl -s -X POST "https://api.hacknode.net/v1/bulk" \
  -H "Authorization: Bearer hn_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "ips": ["20.171.207.12", "185.220.101.45", "73.15.22.9", "2606:4700::1111"],
    "user_agent": ""
  }'

7. Real-Time Risk Alert Webhooks & HMAC Verification

Configure webhook URLs in the Developer Console. Whenever an authenticated lookup exceeds your min_risk_score or triggers is_spoofed_bot, HackNode sends a signed JSON POST with headers X-HackNode-Event and X-HackNode-Signature: sha256=<hex>.

Verify Webhook Signature (Node.js / TypeScript)
import crypto from "crypto";

export function verifyHackNodeWebhook(rawBody: string, sigHeader: string, secret: string): boolean {
  const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(sigHeader), Buffer.from(expected));
}

8. MCP Server for AI Agents (https://mcp.hacknode.net/mcp)

HackNode implements the Model Context Protocol (JSON-RPC 2.0 over Streamable HTTP, protocol 2025-03-26). Connect Cursor, Claude Desktop, Windsurf, or any custom AI agent directly without installing local packages.

lookup_ip

Args: ip (required), user_agent (optional). Full Geo, ASN, proxy/Tor & risk analysis.

verify_ai_bot

Args: ip, user_agent. Returns verified official bot status or flags spoofed crawlers.

lookup_asn

Args: asn (e.g. AS13335). Returns org, network type, IPv4/IPv6 scale & risk baseline.

Cursor / Claude Desktop MCP Configuration (mcp.json)
{
  "mcpServers": {
    "hacknode": {
      "url": "https://mcp.hacknode.net/mcp",
      "headers": {
        "Authorization": "Bearer hn_live_your_api_key"
      }
    }
  }
}
Raw JSON-RPC 2.0 Test Call via curl
curl -s -X POST "https://mcp.hacknode.net/mcp" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer hn_live_your_api_key" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "verify_ai_bot",
      "arguments": {
        "ip": "73.15.22.9",
        "user_agent": "ClaudeBot/1.0"
      }
    }
  }'

9. Production SDK & Edge Middleware Recipes

Go HTTP Middleware
func CheckHackNode(ip, ua, apiKey string) (bool, error) {
    u := fmt.Sprintf("https://api.hacknode.net/v1/lookup/%s?ua=%s", url.PathEscape(ip), url.QueryEscape(ua))
    req, _ := http.NewRequest(http.MethodGet, u, nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        return false, err
    }
    defer resp.Body.Close()
    var out struct {
        Flags struct{ IsSpoofedBot bool `json:"is_spoofed_bot"` } `json:"flags"`
        Risk  struct{ Recommendation string `json:"recommendation"` } `json:"risk"`
    }
    _ = json.NewDecoder(resp.Body).Decode(&out)
    return out.Flags.IsSpoofedBot || out.Risk.Recommendation == "block", nil
}

10. Standard Error Codes

HTTPerror.codeMeaning
400invalid_ip / invalid_asnMalformed IPv4/IPv6 or ASN parameter.
401invalid_api_keyAPI key is missing, invalid, or revoked.
403webhook_limit_reached / enterprise_requiredFeature requires a higher subscription plan.
429rate_limit_exceededExceeded QPS or monthly quota; inspect X-RateLimit-Reset header.

11. Enterprise Local Sidecar (In-VPC Deployment)

For ad-tech, fintech, and high-QPS platforms requiring zero external latency and strict data residency, Enterprise plans ($399+/mo billed annually) ship our licensed Go Sidecar Docker container (hacknode-sidecar). It loads watermarked daily updates into local RAM and automatically halts updates if the license expires.

Run Enterprise Sidecar Locally
docker run -d --name hacknode-sidecar -p 127.0.0.1:8090:8090 \
  -e HACKNODE_LICENSE_KEY="hn_live_enterprise_license_key" \
  ghcr.io/hacknode-net/hacknode-engine:latest hacknode-sidecar

# Sub-millisecond local VPC lookup
curl http://127.0.0.1:8090/v1/lookup/20.171.207.12?ua=GPTBot/1.2

Enterprise onboarding & custom threat feeds: enterprise@hacknode.net

Complete API, CLI, Webhooks & MCP Documentation | HackNode