// REST API & MCP
API Documentation
Public overview endpoints work without a key. For higher limits, pass your lev_… token via x-api-key to https://api.leviathanx.org. Every metered or status response returns X-Quota-Remaining, X-Quota-Limit, and X-Quota-Tier.
Authorized Scope & Evidence Notice
Indexed banners, products, and version-correlated CVEs are passive point-in-time observations (last_seen UTC). Treat them as evidence to verify on systems you own or are authorized to review — not confirmed exploitable vulnerabilities.
Search Query Qualifiers
port:443·country:DE·asn:ASN16509product:nginx·org:"OVH SAS"tag:ssh·tag:reverse-proxy·tag:open-dirtag:ai-agent·tag:ollama·tag:self-signed-sslcve:CVE-2024-3400·kev:true·has_vuln:true
Billing & Quota Precision
- Daily reset:
00:00 UTC. Anonymous callers share 20 credits/day per IPv4 or IPv6/64; keyed callers meter perlev_…token (expired paid passes revert to Free 100/day). - Shared 60s IP window:
/host/{ip},/host/{ip}/history,/rdap/{ip}, and/rdns/{ip}share 1 credit total for the same IP within 60 seconds. - 0-credit calls:
/health,/stats/summary,/key/status,/assets/recent?page=1, unfiltered/c2/live,/advisories/recent, unfiltered/cves/recent(plus default KEV feed?kev_only=true&sort=epss&limit=25),/osint/cidr, and/osint/pwned-check. - Pagination caps (
hard_page_cap, 24/page): 30 public · 100 free · 150 daypass · 250 pro · 500 bulk (max_pagesreflectsmin(hard_page_cap, available_pages)). - Burst & retries: 90 req/min anonymous · 300 req/min keyed.
400/401/403/429rejections charge 0 credits; valid 1-credit calls deduct after input & SSRF validation.
# 1. Live global index summary — no API key required (0 credits)
curl -sS "https://api.leviathanx.org/stats/summary"
# 2. Verify key tier, pagination cap & remaining daily quota (0 credits)
curl -sS -D - "https://api.leviathanx.org/key/status" \
-H "x-api-key: YOUR_LEV_KEY"
# 3. Scoped search on systems you own or are authorized to review (1 credit/page)
curl -sS "https://api.leviathanx.org/search/query?q=asn:ASN15169+port:443&page=1" \
-H "x-api-key: YOUR_LEV_KEY"
# 4. Host dossier, history & 25-IP batch triage (1 credit per IP window or batch)
curl -sS "https://api.leviathanx.org/host/8.8.8.8" -H "x-api-key: YOUR_LEV_KEY"
curl -sS -X POST "https://api.leviathanx.org/host/batch" \
-H "x-api-key: YOUR_LEV_KEY" -H "Content-Type: application/json" \
-d '{"ips":["1.1.1.1","8.8.8.8","9.9.9.9"]}'asn in canonical ASN<num> format, host-level last_seen (YYYY-MM-DD HH:MM:SS UTC), and per-port services[].last_seen (ISO-8601 UTC).// GET /stats/summary (0 credits, no key required)
{
"totals": {
"live_assets": 13960025,
"unique_ips": 8584042,
"vulnerable_hosts": 1053511,
"kev_hosts": 598781,
"c2_hosts": 229283,
"cves_indexed": 59465,
"poc_count": 77290
},
"tiers": { "critical": 865963, "high": 187548 },
"updated_at": "Dec 02, 09:49 AM UTC"
}
// GET /key/status (0 credits; also sets X-Quota-Remaining / X-Quota-Limit / X-Quota-Tier)
{
"ok": true,
"authenticated": true,
"tier": "free",
"daily_limit": 100,
"used_today": 2,
"remaining_today": 98,
"max_pages": 100
}
// GET /search/query?q=asn:ASN15169+port:443&page=1 (1 credit/page, 24 hosts/page)
{
"query": "asn:ASN15169 port:443",
"total": 41280,
"page": 1,
"limit": 24,
"max_pages": 100,
"hard_page_cap": 100,
"tier": "free",
"facets": { "countries": [...], "ports": [...], "asns": [...], "products": [...], "tags": [...] },
"results": [
{
"ip": "8.8.8.8",
"ports": [53, 443],
"port_count": 2,
"hostnames": ["dns.google"],
"product": "HTTP Server",
"asn": "ASN15169",
"country": "US",
"cve_list": [],
"kev": false,
"risk_tier": "low",
"last_seen": "2026-12-02 09:30:18",
"services": [
{ "port": 443, "service": "https", "cves": [], "last_seen": "2026-12-02T09:30:18Z" }
]
}
]
}| Status | Condition | JSON Body |
|---|---|---|
| 400 | Invalid IP/domain/CIDR/query syntax or SSRF-blocked private, loopback, link-local, or metadata target (0 credits charged). | {"detail": "Blocked by SSRF protection: non-public IP address rejected"} |
| 401 | Malformed or unrecognized x-api-key / Authorization: Bearer token on any REST or MCP endpoint (0 credits charged). | {"detail": "Invalid or unrecognized API key"} |
| 403 | Requested search page exceeds tier hard_page_cap (30/100/150/250/500) or internal route blocked (0 credits charged). | {"detail": "Pagination limit for free tier is 100 pages..."} |
| 429 | Daily credit quota exhausted (X-Quota-Remaining: 0; resets 00:00 UTC) OR per-minute burst cap hit (Retry-After: 15; 0 credits). | {"detail": "Daily search limit reached (100/day for free tier)..."} |
| 502 / 503 / 504 | Upstream RDAP/CT/TLS failure or 3s query guard exceeded (index timeouts charge 0 credits; back off exponentially). | {"detail": "Search index temporarily busy; no credit was deducted."} |
Streamable HTTP JSON-RPC 2.0 (v2.0.0 · 2025-03-26 & 2024-11-05) verified with Claude Code, Cursor, OpenAI Codex, and MCP Inspector. Authenticate via x-api-key or Authorization: Bearer lev_… (returns _meta.quota + X-Quota-* headers).
8 Passive Indexed Tools (0 target packets): search_exposures, get_host_dossier, get_host_history, batch_triage_hosts, lookup_cve, list_cves_and_kev, search_autonomous_ais, key_quota_status.
7 Passive OSINT & Compute Tools (0 packets to target host): discover_subdomains_ct, discover_archived_endpoints, check_ip_reputation, lookup_rdap, username_osint, github_recon, cidr_calc.
3 Authorized Live Checks + 3 IDE Slash-Playbooks (prompts/list): audit_domain_dns, inspect_tls, verify_exposure_drift · prompts: perimeter-audit, shadow-ai-audit, incident-ip-triage.
{
"mcpServers": {
"leviathanx": {
"type": "http",
"url": "https://api.leviathanx.org/mcp",
"headers": {
"x-api-key": "YOUR_LEV_KEY"
}
}
}
}// Request: POST https://api.leviathanx.org/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_host_dossier",
"arguments": { "ip": "8.8.8.8" }
}
}
// Response (tool errors return result.isError = true with "HTTP <code>: <detail>")
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"isError": false,
"_meta": { "quota": { "remaining_today": 98, "daily_limit": 100, "tier": "free" } },
"content": [
{ "type": "text", "text": "{\"ip\":\"8.8.8.8\",\"asn\":\"ASN15169\",\"ports\":[53,443],\"kev\":false,...}" }
]
}
}| Method | Endpoint | Mode, Contract & Credits |
|---|---|---|
| GET | /stats/summary | Indexed: global live asset, unique IP, CVE/KEV, and Autonomous AI counters + UTC sync timestamp (0 credits, no key required). |
| GET | /key/status | Auth check: active tier, max_pages cap, used_today, and remaining_today (0 credits; 401 if x-api-key is invalid). |
| GET | /search/query?q={expr}&page={n} | Indexed: search port:, country:, asn:ASN<n>, org:, product:, tag:, cve:, kev:true, has_vuln:true (24/page, 1 credit/page). |
| GET | /assets/recent?page={n} | Indexed: recent host dossiers with uniform global facets (page 1 = 0 credits; page >= 2 = 1 credit). |
| GET | /host/{ip} | Indexed: IPv4/IPv6 dossier with open ports, banners, hostnames, tags, and version-correlated CVEs (1 credit; 60s shared IP window). |
| GET | /host/{ip}/history | Indexed: multi-port service snapshot and chronological banner observation timeline (shared 60s IP credit with /host/{ip}). |
| POST | /host/batch | Indexed batch triage: query 1–25 public IPv4/IPv6 addresses in one call, ranked by CISA KEV & risk tier (1 credit/batch). |
| GET | /verify/drift/{target} | Passive + Live drift check: compare indexed dossier & CVEs against live TLS 1.0–1.3 + HTTP header grade on authorized target (1 credit). |
| GET | /c2/live?q={runtime} | Indexed: Autonomous AI's feed for exposed AI agents, LLM runtimes, MCP servers, and vector DBs (0 credits overview; 1 filtered). |
| GET | /cve/{cve_id} | Indexed: CVE record with CVSS, FIRST EPSS score, CISA KEV status, and public PoC references (1 credit). |
| GET | /cves/recent?q={kw}&kev_only={bool} | Indexed: browse CVEs & CISA KEV (0 credits unfiltered or default ?kev_only=true&sort=epss&limit=25; 1 credit with q=, has_poc=true, or limit>25). |
| GET | /advisories/recent | Indexed: recent security advisories and vendor bulletins (0 credits). |
| GET | /dns/domain/{domain} | Live DNS + Indexed: forward A/AAAA resolution plus indexed host dossiers for resolved IPs (1 credit). |
| GET | /rdns/{ip} | Live PTR lookup: reverse DNS pointer records for a public IP (1 credit; shared 60s IP window with /host/{ip}). |
| GET | /reverse-ip/{ip} | Indexed + Live PTR: observed hostnames, PTRs, and domains resolving to a public IP (1 credit). |
| GET | /rdap/{ip} | Live RIR RDAP: allocation and network ownership record for a public IP (1 credit; shared 60s IP window with /host/{ip}). |
| GET | /rdap/domain/{domain} | Live Registry RDAP: domain registrar, lifecycle dates, nameservers, and DNSSEC status (1 credit). |
| GET | /osint/dns-full/{domain} | Live DNS check: A, AAAA, MX, NS, TXT, SOA, CAA, CNAME, SPF, DMARC, and DNSSEC audit (1 credit). |
| GET | /osint/tls/{host} | Live target check: TLS 1.0–1.3 certificate chain, SANs, cipher suite, and expiry handshake on authorized host (1 credit). |
| GET | /osint/certs/{domain} | Passive CT lookup: Certificate Transparency subdomain and issuance history without contacting target (1 credit). |
| GET | /osint/http-inspect?url={url} | Live target check: SSRF-guarded HTTP/2 redirect chain and response security header inspection (1 credit). |
| GET | /osint/blacklist/{ip} | Passive DNSBL check: 12-zone IP reputation, threat correlation, BGP ASN, and rDNS without contacting target IP (1 credit). |
| GET | /osint/ip-asn/{ip} | Passive BGP/RIR lookup: prefix, ASN<number>, organization, and country for a public IP (1 credit). |
| GET | /osint/typosquat/{domain} | Live DNS check: registered lookalike domain permutation and A/MX-record resolution audit (1 credit). |
| GET | /osint/wayback/{domain} | Passive archive lookup: historical archived URL and endpoint discovery without contacting target (1 credit). |
| GET | /osint/cloud-buckets/{keyword} | Live storage check: public object-storage bucket permutation probe for authorized brand keywords (1 credit). |
| GET | /osint/username/{username} | Public OSINT check: 32-platform zero-false-positive username presence lookup with category filter (1 credit). |
| GET | /osint/github/{username} | Public API lookup: GitHub profile, public repository metadata, and public commit footprint (1 credit). |
| GET | /osint/email/{email} | Passive DNS & profile check: MX/SPF/DMARC deliverability posture, disposable domain check, and Gravatar hash (1 credit). |
| GET | /osint/pwned-check?prefix={hex5} | Passive k-Anonymity check: 5-hex SHA-1 password prefix lookup in HIBP (0 credits). |
| GET | /osint/cidr?cidr={cidr} | Local compute: IPv4/IPv6 CIDR netmask, address range, and host-count calculator (0 credits). |
| POST | /mcp | Streamable HTTP MCP v2.0 JSON-RPC endpoint (18 read-only tools, 3 slash-playbooks, 3 resources; metered per tool call). |