Dev Utilities
WHOIS & DNS
Look up domain registration info and DNS records.
GET
$0.01/call/v1/tools/whoisUsage
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
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
domain | string | Yes | Domain to look up | — |
type | string | No | whois, 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
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data | object | Response payload |
data.domain | string | The domain that was looked up |
data.whois | object | WHOIS registration data for the domain |
data.whois.registrar | string | Domain registrar name |
data.whois.createdAt | string | ISO 8601 timestamp when the domain was first registered |
data.whois.expiresAt | string | ISO 8601 timestamp when the domain registration expires |
data.whois.nameServers | string[] | Authoritative name servers for the domain |
data.dns | object | DNS records for the domain |
data.dns.a | string[] | IPv4 address records |
data.dns.aaaa | string[] | IPv6 address records |
data.dns.mx | object[] | Mail exchange records with priority and exchange fields |
data.dns.txt | string[] | TXT records (SPF, DKIM, verification, etc.) |