YepAPI
Dev Utilities

WHOIS & DNS

Look up domain registration info and DNS records.

GET/v1/tools/whois
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/tools/whois?domain=yepapi.com', {
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data } = await res.json();
console.log(data);
curl "https://api.yepapi.com/v1/tools/whois?domain=yepapi.com" \
  -H "x-api-key: YOUR_API_KEY"

Query Parameters

ParameterTypeRequiredDescriptionDefault
domainstringYesDomain to look up
typestringNowhois, dns, or both"both"

Response

{
  "ok": true,
  "data": {
    "domain": "yepapi.com",
    "whois": {
      "registrar": "Cloudflare, Inc.",
      "createdAt": "2025-01-15T00:00:00Z",
      "expiresAt": "2026-01-15T00:00:00Z",
      "nameServers": ["ns1.cloudflare.com", "ns2.cloudflare.com"]
    },
    "dns": {
      "a": ["104.21.50.123"],
      "aaaa": ["2606:4700:3034::6815:327b"],
      "mx": [{ "priority": 10, "exchange": "mail.yepapi.com" }],
      "txt": ["v=spf1 include:_spf.google.com ~all"]
    }
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
dataobjectResponse payload
data.domainstringThe domain that was looked up
data.whoisobjectWHOIS registration data for the domain
data.whois.registrarstringDomain registrar name
data.whois.createdAtstringISO 8601 timestamp when the domain was first registered
data.whois.expiresAtstringISO 8601 timestamp when the domain registration expires
data.whois.nameServersstring[]Authoritative name servers for the domain
data.dnsobjectDNS records for the domain
data.dns.astring[]IPv4 address records
data.dns.aaaastring[]IPv6 address records
data.dns.mxobject[]Mail exchange records with priority and exchange fields
data.dns.txtstring[]TXT records (SPF, DKIM, verification, etc.)

On this page