Skip to content

WHOIS lookup for domain/IP/ASN

GET
/whois
const url = 'https://api.dazrik.net/whois?target=example.com';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Accepts a domain/hostname, an IP, or an ASN like ‘AS15169’ and returns WHOIS data. The shape of data depends on the target type.

target
required
string

Domain/hostname, IP address, or ASN (e.g. ‘AS15169’).

Example
example.com

Canonical WHOIS data

Media typeapplication/json
object
ok
required
boolean
query
required
string
data
required
One of:

Canonical domain WHOIS data. All fields are optional, only populated fields are returned.

object
domainName
string
registryDomainId
string
registrar
string
registrarIanaId
string
registrarUrl
string
registrarWhoisServer
string
whoisServer
string
registrarAbuseContactEmail
string
registrarAbuseContactPhone
string
registrantName
string
registrantOrganization
string
registrantState
string
registrantCountry
string
registrantEmail
string
createdDate
string format: date-time
updatedDate
string format: date-time
expiryDate
string format: date-time
domainStatus
Array<string>
nameServer
Array<string>
dnssec
string
Example
{
"ok": true,
"query": "example.com",
"data": {
"domainName": "EXAMPLE.COM",
"domainStatus": [
"clientTransferProhibited"
],
"dnssec": "signedDelegation"
}
}
RateLimit
string

IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.

Example
limit=60, remaining=59, reset=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (60 requests per 60s).

Example
60
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
59
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Missing or invalid parameter

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "query param target is required"
}
RateLimit
string

IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.

Example
limit=60, remaining=59, reset=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (60 requests per 60s).

Example
60
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
59
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Target resolves to a private/reserved address

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "target doesn't resolve to a public addr"
}
RateLimit
string

IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.

Example
limit=60, remaining=59, reset=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (60 requests per 60s).

Example
60
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
59
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Rate limit exceeded: either the per-client request limit (60 requests per minute) or, for endpoints that connect to the target, the per-destination outbound connection limit.

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "you're being rate limited, try again later."
}
RateLimit
string

IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.

Example
limit=60, remaining=59, reset=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (60 requests per 60s).

Example
60
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
59
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42
Retry-After
integer

Seconds to wait before retrying. Sent only on a 429 response.

Example
42

Lookup failed

Media typeapplication/json
object
ok
required
boolean
msg
required
string
query
string
Example
{
"ok": false,
"query": "example.com",
"msg": "couldn't get whois info"
}
RateLimit
string

IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.

Example
limit=60, remaining=59, reset=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (60 requests per 60s).

Example
60
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
59
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42