The company behind the DNSAFE family. Looking for a product? DNS Security · Domains, hosting, Mail & Drive
.co
Developers

Build on DNSAFE

Two REST APIs, JSON over HTTPS, with keys you create and revoke yourself: ThreatDNS for checking domains and IP addresses, and the DNS Security API for managing networks, rules and logs.

ThreatDNS APIDNS Security APIStatus
Free beta

ThreatDNS API

Check a domain or IP address from your own tools and get the same result threatdns.com shows: one verdict (malicious, suspicious or low_risk), a 0–100 risk score, the reasons behind it, and whether DNSAFE’s threat list blocks it.

Example

# Check one domain or IP curl "https://threatdns.com/v1/check?q=example.com" \ -H "Authorization: Bearer $THREATDNS_KEY" # Check up to 100 at once curl -X POST https://threatdns.com/v1/check/bulk \ -H "Authorization: Bearer $THREATDNS_KEY" \ -H "Content-Type: application/json" \ -d '{"q": ["example.com", "203.0.113.7"]}' # See this month's checks curl https://threatdns.com/v1/usage -H "Authorization: Bearer $THREATDNS_KEY"

Get a key

  • Free with any DNSAFE account, including a free Home account.
  • Home: my.dnsafe.net → Settings → ThreatDNS API → Create ThreatDNS key.
  • Business and MSP: portal.dnsafe.net → API Keys → ThreatDNS API → Create ThreatDNS key.
  • Keys start with tdk_live_ and are shown once. You can have up to 5 and revoke any of them; a revoked key stops working straight away. A ThreatDNS key can only run checks.

Limits during the beta

LimitValue
Checks a month500 (1,000 with DNSAFE Pro or a business or MSP plan)
Requests a second2 (a bulk request counts as one)
Items per bulk request100
Your own repeats within 24 hoursNot counted

Over the limit you get 429 with a Retry-After header; once the month’s checks are used, 402 until the 1st (UTC).

Docs

threatdns.com/api: quickstart in curl, Python and PowerShell, every response field, verdicts and errors.

MSPs and businesses

DNS Security API

Manage DNS Security from your own tools: clients (tenants), their networks and IP addresses, allow and block rules, and query logs and stats. A partner’s key only reaches that partner’s own clients. Base URL: https://api.dnsafe.net/api/v1.

Example

# Today's totals for your account curl https://api.dnsafe.net/api/v1/partner/stats \ -H "Authorization: Bearer $DNSAFE_API_KEY" # → {"active_tenants": …, "rules": …, "blocked_today": …}

Get a key

  • In the portal: portal.dnsafe.net → API Keys. Keys start with dnsapi_ and the full key is shown once.
  • API access is included with some Business and MSP plans, or you can add an API plan on the API Keys page.
  • A key acts as the account that made it, and can’t manage API keys, billing, logins or passwords: those need a portal sign-in. Revoke a key any time and it stops working immediately.

Rate limits

API planRequests a minute
Basic100
Pro1,000
EnterpriseNo per-minute limit

Over the limit you get 429 Too Many Requests with a Retry-After header (seconds until the next minute).

Docs

docs.dnsafe.net/api.html: every endpoint with curl, Python and Node examples, errors and limits.

Status

Live service status and incidents for DNS, the APIs and the portals: status.dnsafe.net. ThreatDNS also answers GET https://threatdns.com/v1/health.

There are no official SDKs: any HTTP client works, and the docs have copy-and-paste examples.