Skip to content
thenetworktools
Sign in

API

The same high-accuracy network lookups as the website, delivered as clean JSON over HTTPS. Generate a key in your dashboard under API, then call any endpoint below.

Quick navigation: Jump to section...Select ↓

Authentication

Send your API key in the Authorization header as a Bearer token. X-API-Key is also supported.

curl -H "Authorization: Bearer ntk_YOUR_KEY" \
  "https://thenetworktools.com/api/v1/records?domain=example.com"

Limits and errors

  • Rate limits depend on your plan (per key, per minute, and per day). Real-time quota metrics are returned in standard response headers:X-RateLimit-Limit-Minute, X-RateLimit-Remaining-Minute, X-RateLimit-Limit-Day, and X-RateLimit-Remaining-Day.
  • HTTP Status Codes:
    • 401: Missing, malformed, or revoked key.
    • 429: Rate limit exceeded. Inspect the Retry-After header for cooldown seconds.
    • 400: Bad query input (e.g., SSRF blocked or invalid IP format).
    • 404: Unknown tool endpoint.
    • 502: Upstream network timeout or unreachable upstream DNS resolver.
  • Standardized JSON error responses: {"error": "description"}. Every call is tracked in your dashboard analytics.
  • The tool discovery endpoint requires no authentication: GET /api/v1/tools.

Available Endpoints

All endpoints follow GET https://thenetworktools.com/api/v1/<tool>. Response formats match the web UI result payloads.

/api/v1/records?domain=...— Mail records: SPF, DKIM, DMARC and MX in one call
https://thenetworktools.com/api/v1/records?domain=example.com
/api/v1/mx?domain=...— Mail servers and priorities
https://thenetworktools.com/api/v1/mx?domain=example.com
/api/v1/dmarc?query=...— DMARC policy lookup and validation
https://thenetworktools.com/api/v1/dmarc?query=example.com
/api/v1/deliverability?domain=...— SPF, DKIM and DMARC readiness
https://thenetworktools.com/api/v1/deliverability?domain=example.com
/api/v1/bimi?domain=...— BIMI record and logo checks
https://thenetworktools.com/api/v1/bimi?domain=example.com
/api/v1/spf-flatten?domain=...— Flatten SPF includes under the 10-lookup limit
https://thenetworktools.com/api/v1/spf-flatten?domain=example.com
/api/v1/whois?query=...— Registrar, dates and name servers
https://thenetworktools.com/api/v1/whois?query=example.com
/api/v1/subdomains?query=...— Subdomains found for a domain
https://thenetworktools.com/api/v1/subdomains?query=example.com
/api/v1/ssl?query=...— Certificate chain, expiry and issuer
https://thenetworktools.com/api/v1/ssl?query=example.com
/api/v1/headers?query=...— HTTP security headers
https://thenetworktools.com/api/v1/headers?query=https%3A%2F%2Fexample.com
/api/v1/tech?query=...— Technology stack detection
https://thenetworktools.com/api/v1/tech?query=example.com
/api/v1/redirects?query=...— Redirect chain
https://thenetworktools.com/api/v1/redirects?query=http%3A%2F%2Fexample.com
/api/v1/ports?query=...— Common web ports, open or filtered
https://thenetworktools.com/api/v1/ports?query=example.com
/api/v1/latency?domain=...— TCP connect time, 5 handshakes from our edge
https://thenetworktools.com/api/v1/latency?domain=example.com&port=443

port: One of 21, 22, 25, 53, 80, 110, 143, 443, 465, 587, 993, 995, 3306, 5432, 8080, 8443. Default 443.

/api/v1/blacklist?query=...— IP or domain on DNS blocklists
https://thenetworktools.com/api/v1/blacklist?query=8.8.8.8
/api/v1/ip?query=...— IP details and reverse DNS
https://thenetworktools.com/api/v1/ip?query=8.8.8.8
/api/v1/asn?query=...— Autonomous system and ISP
https://thenetworktools.com/api/v1/asn?query=AS15169
/api/v1/mac?query=...— Vendor lookup for a MAC address
https://thenetworktools.com/api/v1/mac?query=00%3A1A%3A2B%3A3C%3A4D%3A5E
/api/v1/phishing?url=...— Phishing signals for a URL
https://thenetworktools.com/api/v1/phishing?url=https%3A%2F%2Fexample.com
/api/v1/breach?domain=...— Known breaches for a domain or email (query also works)
https://thenetworktools.com/api/v1/breach?domain=example.com
/api/v1/resolvers?domain=...— Resolve A records across server-side DoH resolvers (AdGuard, NextDNS)
https://thenetworktools.com/api/v1/resolvers?domain=example.com

CI/CD Deployment Gate

Use GET /api/v1/ci in deployment pipelines (GitHub Actions, GitLab CI, Vercel). Returns HTTP 200 on pass and HTTP 422 on failure so curl --fail halts deployments automatically.

  • domain (e.g. example.com): Required.
  • min_ssl_days (e.g. 14): Fail if the certificate expires sooner. 0 to 365, default 14.
  • require (e.g. A,MX): Comma list of record types that must exist. Default A,MX.
  • unknown (e.g. fail): Set to fail to treat inconclusive checks as failures.
curl --fail -H "Authorization: Bearer $NTK_KEY" \
  "https://thenetworktools.com/api/v1/ci?domain=example.com&min_ssl_days=14&require=A,MX"