by DNSAFE

The APIFREE BETA

Everything a ThreatDNS report shows, in one call: VirusTotal, Google Safe Browsing, Spamhaus, AbuseIPDB, URLScan, IPinfo, Netlas, registration, certificates and live DNS, plus one verdict and risk score you can act on, and whether blocks it.

REST · JSONDomains & IPsBulk up to 100Repeats within 24 h are freeSame score as the website

Free with any DNSAFE account, including a free Home account. Create one

Get a key

  1. Home accounts: my.dnsafe.net → Settings → ThreatDNS API → Create ThreatDNS key.
  2. Business and MSP accounts: portal.dnsafe.net → API Keys → ThreatDNS API → Create ThreatDNS key.
  3. Copy the key straight away. It’s shown once. You can have up to 5 and revoke any of them.

Quickstart

curl
curl "https://threatdns.com/v1/check?q=login-micros0ft.top" \
  -H "Authorization: Bearer $THREATDNS_KEY"
Python
import os, requests
r = requests.get("https://threatdns.com/v1/check", params={"q": "login-micros0ft.top"},
                 headers={"Authorization": f"Bearer {os.environ['THREATDNS_KEY']}"}, timeout=30)
print(r.json()["verdict"], r.json()["risk_score"])
PowerShell
$h = @{ Authorization = "Bearer $env:THREATDNS_KEY" }
Invoke-RestMethod "https://threatdns.com/v1/check?q=login-micros0ft.top" -Headers $h

Your key

Send it as a bearer token: Authorization: Bearer tdk_live_…. A ThreatDNS key can only run checks: it can’t see or change anything else in your DNSAFE account. Keep it on your server, never in a web page or app people can download. If one leaks, revoke it in your DNSAFE account; it stops working straight away.

Check one

GET/v1/check?q={domain | ip}1 check · free if repeated within 24 h
{
  "query": "login-micros0ft.top",
  "type": "domain",
  "verdict": "malicious",
  "risk_score": 100,
  "reasons": ["7 VirusTotal engines flag it", "Google Safe Browsing: social engineering",
              "on the DNSAFE threat list (via Phishing Army)", "registered under 30 days ago"],
  "dnsafe_blocked": true,
  "sources": {
    "virustotal":    { "malicious": 7, "suspicious": 1, … },
    "safe_browsing": { "hit": true, "threat_types": ["SOCIAL_ENGINEERING"] },
    "spamhaus":      { "listed": false, … },
    "urlscan":       { … },
    "rdap":          { "created": "2026-10-11", "registrar": "…", … },
    "certificates":  { … },
    "dns":           { … },
    "dnsafe":        { "blocked": true, "sources": [{ "name": "Phishing Army", … }] }
  },
  "report_url": "https://threatdns.com/domain/login-micros0ft.top",
  "cached": false,
  "checked_at": "2026-10-18T10:00:00Z"
}

IP checks return virustotal, abuseipdb, ipinfo, netlas (open ports and services) and spamhaus instead, and no dnsafe_blocked. Defanged input (example[.]com, hxxps://) and full URLs are cleaned up for you, the same as on the website.

Check many

POST/v1/check/bulk1 check per item · up to 100 · repeats free
curl -X POST https://threatdns.com/v1/check/bulk -H "Authorization: Bearer $THREATDNS_KEY" \
  -H "Content-Type: application/json" -d '{"q": ["example.com", "185.220.101.47", "paypa1-support[.]com"]}'
→ { "results": [ …one object per item, in the same order… ], "used": 3, "remaining": 285 }

An item that can’t be checked gets {"query", "error", "status"} in its place (400 for something that isn’t a domain or IP, 402 once the month’s checks run out) and the rest still run. A batch counts as one request toward the per-second limit and can take up to a couple of minutes.

Usage

GET/v1/usagefree
{ "plan": "Beta", "used": 212, "limit": 500, "remaining": 288, "resets_at": "2026-11-01T00:00:00Z" }

Sources

Name in sourcesWhat it checksFor
virustotal~90 antivirus and URL enginesDomains, IPs
safe_browsingGoogle Safe Browsing (malware, phishing, unwanted software)Domains
spamhausSpamhaus blocklistsDomains, IPv4
urlscanURLScan.io scans of the siteDomains
rdapRegistration: age, registrar, statusDomains
certificatesCertificate transparency logsDomains
dnsLive DNS records, SPF and DMARCDomains
dnsafeThe DNSAFE threat list and which feed listed itDomains
abuseipdbAbuse reports and confidence, TorIPs
ipinfoLocation, network owner, hosting typeIPs
netlasOpen ports and services, threat tags, domains on the IPIPs

A source that’s down, slow or busy returns {"error": "…"}. The check still completes and the verdict uses the rest. On busy days a source can be busy for API checks while the website still has it.

Response fields

FieldWhat it is
verdictmalicious, suspicious or low_risk
risk_score0–100, the same score the website shows for the same lookup
reasonsShort, human-readable reasons behind the verdict
dnsafe_blockedWhether DNSAFE’s threat list blocks it (domains only; null if that check failed)
sources.*Each source’s own result (see Sources)
report_urlThe same report on threatdns.com, to share or open in a ticket
cachedtrue if it’s your own repeat within 24 hours (not counted)
checked_atWhen the sources were checked (UTC)

Verdicts

60–100 malicious · 25–59 suspicious · 0–24 low risk. One or two VirusTotal detections out of ~90 engines don’t count (usually false positives). Open ports describe exposure and never make an IP malicious on their own. A low score means no source flagged it, which is a good sign but not a guarantee.

Errors & limits

StatusMeaning
400Not a domain or public IP. Email addresses aren’t available through the API
401Missing, wrong or revoked key
402This month’s checks are used up. They reset on the 1st (UTC); your own repeats still work
429More than 2 requests a second. Wait for the Retry-After header
503We couldn’t confirm your key just now. Retry after the Retry-After header

Errors come back as {"error": "…", "status": 402}.

Why no email checks? Email checks show a person’s data-breach history. To protect people’s privacy they stay on the website, one at a time.

Free beta

Beta
$0 during the beta
  • 500 checks a month
  • 1,000 with DNSAFE Pro or a business or MSP plan
  • 2 requests a second
  • Bulk checks up to 100
  • Repeats within 24 hours are free
  • All sources, same as the website
Need more?

Paid plans with higher volumes come after the beta. Tell us what you’d use it for and roughly how many checks a month, and we’ll let you know when they’re ready.

Tell us what you need

Terms

The API is covered by the ThreatDNS Terms and Acceptable Use Policy. Don’t resell the results or publish them as your own feed, don’t use it to harvest data, and don’t share keys. Beta limits may change, and we can revoke a key that’s misused.