GET /whois
WHOIS Lookup
Learn more: WHOIS Lookup API — marketing overview, live demo, and use cases.
Look up WHOIS and RDAP registration data for any domain, including registrar details, dates, nameservers, and DNSSEC status.
Endpoint
GET https://api.robotdomainsearch.com/whois
Parameters
| Parameter |
Type |
Required |
Description |
domain |
string |
Yes |
Full domain name to look up (e.g., example.com) |
refresh |
boolean |
No |
Set to true to bypass cache and fetch fresh data |
Request
curl "https://api.robotdomainsearch.com/whois?domain=example.com"
Force a fresh lookup:
curl "https://api.robotdomainsearch.com/whois?domain=example.com&refresh=true"
Response
{
"domain": "example.com",
"available": false,
"source": "rdap",
"registrar": {
"name": "RESERVED-Internet Assigned Numbers Authority",
"url": "https://www.iana.org",
"abuseEmail": "abuse@iana.org",
"abusePhone": "+1-310-301-5800",
"ianaId": "376"
},
"dates": {
"created": "1995-08-14T04:00:00Z",
"updated": "2024-08-14T07:01:38Z",
"expires": "2025-08-13T04:00:00Z"
},
"status": [
"client delete prohibited",
"client transfer prohibited",
"client update prohibited"
],
"nameservers": [
"a.iana-servers.net",
"b.iana-servers.net"
],
"dnssec": {
"delegationSigned": true
},
"registrant": {
"name": "REDACTED FOR PRIVACY",
"organization": "Internet Assigned Numbers Authority",
"country": "US"
},
"cached": false,
"cachedAt": null,
"queriedAt": "2026-02-07T18:30:00Z"
}
Response Fields
Top-Level Fields
| Field |
Type |
Description |
domain |
string |
The domain that was looked up |
available |
boolean |
true if the domain is not registered |
source |
string |
Data source: rdap or whois |
registrar |
object |
Registrar information (omitted if domain is available) |
dates |
object |
Domain lifecycle dates (omitted if domain is available) |
status |
array |
EPP status codes (omitted if domain is available) |
nameservers |
array |
Nameserver hostnames (omitted if domain is available) |
dnssec |
object |
DNSSEC status (omitted if not available) |
registrant |
object |
Registrant contact info (omitted if not available) |
cached |
boolean |
true if the result was served from cache |
cachedAt |
string |
ISO 8601 time when the result was cached (null if not cached) |
queriedAt |
string |
ISO 8601 time of the query |
Registrar Fields
| Field |
Type |
Description |
name |
string |
Registrar name |
url |
string |
Registrar website URL |
abuseEmail |
string |
Abuse contact email |
abusePhone |
string |
Abuse contact phone |
ianaId |
string |
IANA registrar ID |
Dates Fields
| Field |
Type |
Description |
created |
string |
ISO 8601 domain creation date |
updated |
string |
ISO 8601 last updated date |
expires |
string |
ISO 8601 expiration date |
DNSSEC Fields
| Field |
Type |
Description |
delegationSigned |
boolean |
true if the domain has DNSSEC delegation signed |
Registrant Fields
| Field |
Type |
Description |
name |
string |
Registrant name (often redacted for privacy) |
organization |
string |
Registrant organization |
country |
string |
Registrant country code |
Errors
| Code |
Error |
Description |
| 400 |
missing_parameter |
The domain parameter is required |
| 400 |
invalid_domain |
Domain format is invalid |
| 400 |
unsupported_tld |
TLD is not supported for WHOIS lookups |
| 404 |
domain_not_found |
Domain not found in WHOIS records |
| 405 |
method_not_allowed |
Only GET method is allowed |
| 429 |
rate_limited |
Rate limit exceeded |
| 500 |
internal_error |
An unexpected error occurred |
| 502 |
upstream_error |
Registry returned an error |
| 504 |
timeout |
WHOIS lookup timed out |
Note: The unsupported_tld and upstream_error responses include a tld field identifying the relevant TLD.
Code Examples
curl
curl "https://api.robotdomainsearch.com/whois?domain=example.com"
Python
import requests
response = requests.get(
"https://api.robotdomainsearch.com/whois",
params={"domain": "example.com"}
)
data = response.json()
print(f"Domain: {data['domain']}")
print(f"Available: {data['available']}")
if not data["available"]:
registrar = data.get("registrar", {})
dates = data.get("dates", {})
print(f"Registrar: {registrar.get('name', 'Unknown')}")
print(f"Created: {dates.get('created', 'Unknown')}")
print(f"Expires: {dates.get('expires', 'Unknown')}")
print(f"Nameservers: {', '.join(data.get('nameservers', []))}")
print(f"Cached: {data['cached']}")
JavaScript
const response = await fetch(
"https://api.robotdomainsearch.com/whois?domain=example.com"
);
const data = await response.json();
console.log(`Domain: ${data.domain}`);
console.log(`Available: ${data.available}`);
if (!data.available) {
console.log(`Registrar: ${data.registrar?.name ?? "Unknown"}`);
console.log(`Created: ${data.dates?.created ?? "Unknown"}`);
console.log(`Expires: ${data.dates?.expires ?? "Unknown"}`);
console.log(`Nameservers: ${data.nameservers?.join(", ") ?? "None"}`);
console.log(`Cached: ${data.cached}`);
}
Go
resp, err := http.Get("https://api.robotdomainsearch.com/whois?domain=example.com")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data struct {
Domain string `json:"domain"`
Available bool `json:"available"`
Source string `json:"source"`
Registrar *struct {
Name string `json:"name,omitempty"`
} `json:"registrar,omitempty"`
Dates *struct {
Created *string `json:"created,omitempty"`
Expires *string `json:"expires,omitempty"`
} `json:"dates,omitempty"`
Nameservers []string `json:"nameservers,omitempty"`
Cached bool `json:"cached"`
QueriedAt string `json:"queriedAt"`
}
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
log.Fatal(err)
}
fmt.Printf("Domain: %s (available: %t, source: %s)\n", data.Domain, data.Available, data.Source)
if data.Registrar != nil {
fmt.Printf("Registrar: %s\n", data.Registrar.Name)
}
if data.Dates != nil && data.Dates.Expires != nil {
fmt.Printf("Expires: %s\n", *data.Dates.Expires)
}
Notes
- Results are cached for improved performance — use
refresh=true to bypass
- Domain names are looked up via RDAP (preferred) with WHOIS as a fallback
- Registrant contact information is often redacted due to GDPR and privacy policies
- The
source field indicates whether the data came from RDAP or traditional WHOIS