DNS & WHOIS Lookup API
ToolsMAINTAINED10 tokens / call

DNS & WHOIS Lookup API

DNS records over DNS-over-HTTPS and domain registration data over RDAP, in clean JSON

Resolve DNS records (A, AAAA, MX, TXT, NS, CNAME, SOA, SRV, CAA, PTR) and fetch domain registration data — registrar, status, nameservers, DNSSEC, and key dates. DNS is served over DNS-over-HTTPS and WHOIS via RDAP, the modern JSON replacement for legacy WHOIS.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 10 tokens per call, so the free plan covers about 50 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "domain": "CLOUDFLARE.COM",
  "handle": "1542998887_DOMAIN_COM-VRSN",
  "status": [
    "client delete prohibited",
    "client transfer prohibited",
    "client update prohibited"
  ],
  "registrar": "Cloudflare, Inc.",
  "nameservers": [
    "NS3.CLOUDFLARE.COM",
    "NS4.CLOUDFLARE.COM"
  ],
  "dnssec": true,
  "events": {
    "registration": "2009-02-17T22:07:54Z",
    "expiration": "2033-02-17T22:07:54Z",
    "last_changed": "2024-01-09T16:45:28Z"
  }
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for DNS & WHOIS Lookup API

  • Verify domain ownership during onboarding by checking for a TXT record you asked the customer to add.

  • Check MX records to confirm a domain can receive mail before sending invitations or invoices.

  • Show registrar, creation date, expiry and nameservers in a domain-monitoring or security tool.

  • Detect newly registered domains in signups as a phishing or fraud signal.

DNS & WHOIS Lookup API endpoints

Every endpoint with its parameters and a real example response.

GETDNS Lookup

https://api-dns-whois.dataandapis.com/v1/dns

Query parameters

ParameterExample
domaingoogle.comRequired
typeMXOptional

Example request

curl "https://api-dns-whois.dataandapis.com/v1/dns?domain=google.com&type=MX" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "domain": "google.com",
  "type": "MX",
  "record_count": 1,
  "records": [
    {
      "name": "google.com",
      "type": "MX",
      "ttl": 289,
      "data": "10 smtp.google.com."
    }
  ]
}

GETWHOIS Lookup

https://api-dns-whois.dataandapis.com/v1/whois

Query parameters

ParameterExample
domaincloudflare.comRequired

Example request

curl "https://api-dns-whois.dataandapis.com/v1/whois?domain=cloudflare.com" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "domain": "CLOUDFLARE.COM",
  "handle": "1542998887_DOMAIN_COM-VRSN",
  "status": [
    "client delete prohibited",
    "client transfer prohibited",
    "client update prohibited"
  ],
  "registrar": "Cloudflare, Inc.",
  "nameservers": [
    "NS3.CLOUDFLARE.COM",
    "NS4.CLOUDFLARE.COM"
  ],
  "dnssec": true,
  "events": {
    "registration": "2009-02-17T22:07:54Z",
    "expiration": "2033-02-17T22:07:54Z",
    "last_changed": "2024-01-09T16:45:28Z"
  }
}

Where the data comes from

Source
Live DNS-over-HTTPS resolution and RDAP queries to the relevant domain registry. No stored dataset.
Freshness
Queried live on every call.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-dns-whois.dataandapis.com/v1/dns',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

DNS & WHOIS Lookup API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Query Parameters

domain(Required)
type(Optional)
import axios from 'axios';

const url = 'https://api-dns-whois.dataandapis.com/v1/dns';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about DNS & WHOIS Lookup API

Ship DNS & WHOIS Lookup API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.