API guide
REST over HTTPS, JSON by default. The full machine-readable schema is published as OpenAPI.
Authentication
Create a key in your dashboard and send it in the Authorization header. Keys start with dk_. Keep them secret; you can revoke one at any time.
curl -H "Authorization: Bearer dk_YOUR_KEY" https://kubehive.net/v1/usage
Each plan allows a number of requests per UTC day. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit you get HTTP 429 with Retry-After.
Endpoints
| Endpoint | What it returns |
|---|---|
GET /v1/domains/{domain} | Current state: status, first seen, DNS records, website check and when each one was last checked. |
GET /v1/domains/{domain}/history | Every interval recorded for the domain and the list of changes. How far back depends on the plan. |
POST /v1/domains/{domain}/refresh | Puts the domain first in the next DNS and website check. The result arrives with the next worker run, usually within a few hours. |
GET /v1/reverse?type=ns&value=… | Domains that use a value today: a nameserver, an IPv4 or IPv6 address, a mail server, or a page fingerprint (type=web, value=fingerprint=…). Paginate with after=. |
GET /v1/feeds/new?date=YYYY-MM-DD | Domains that appeared on that day and already resolve, or that dropped, or that changed nameservers. JSON, JSONL or CSV. |
GET|POST|DELETE /v1/watchlists | List, add and remove brand watchlists. |
GET /v1/alerts?since=YYYY-MM-DD | Matches found for your watchlists. |
GET /v1/usage, GET /v1/tlds | Today's usage and the limits of your plan; the TLDs we load. |
Examples
# every domain on a nameserver
curl -H "Authorization: Bearer $KEY" "https://kubehive.net/v1/reverse?type=ns&value=ns1.example-dns.net&limit=100"
# new .shop domains of one day, as CSV
curl -H "Authorization: Bearer $KEY" "https://kubehive.net/v1/feeds/new?date=2026-11-29&tld=shop&format=csv" -o new.csv
# watch a brand
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"term": "acme"}' https://kubehive.net/v1/watchlists
Lists return at most `limit` items and a `next` value. Send it back as `after=` to get the next page.
Fields
| Field | Meaning |
|---|---|
dns.ns | Nameservers delegated in the zone file, as the registry publishes them. |
dns.ns_real | Nameservers the domain itself answers with. They differ from ns when a delegation is broken or moving. |
dns.a / aaaa / mx | Addresses and mail servers from our resolvers. An empty list means the name exists but has no record of that type. |
web.status, title, server | Result of one GET of the home page (https first, then http), after up to 5 redirects. |
web.tls | valid, expired, name_mismatch, self_signed or invalid, plus issuer and expiry date. |
web.fingerprint | Hash of the visible text. Domains that show the same page share it, which helps find parking pages and site farms. |
web.error | Why there is no website: refused, dns, tls, protocol, private_ip, connect, excluded, other. |
events[].event | new, returned, dropped or changed. |
Alert webhooks
From the Pro plan we POST alerts as JSON to your HTTPS address. Check the X-KubeHive-Signature header with the secret shown in your dashboard:
import hashlib, hmac
def valid(body: bytes, header: str, secret: str) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
signed = f"{parts['t']}.".encode() + body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"])
Errors
Errors use the HTTP status code and a JSON body with a code you can match on:
{"error": {"code": "quota_exceeded", "message": "Daily limit of 1000 requests reached"}}