Domain WHOIS / registration data
Registration data of a domain from its registry, the way WHOIS shows it: registered, updated and expiry dates, age and days until expiry, status codes, registrar (name, IANA id, website, abuse email and phone), name servers, DNSSEC (signed, DS records), the registry's WHOIS server and every event. For gTLDs and most ccTLDs the registry's structured data is used, merged with the registrar's own record; for registries without it (.io, .de, .jp, .co and others) their WHOIS server is read and parsed. A subdomain is resolved to its registered name (www.example.co.uk -> example.co.uk). Unregistered names answer registered: false. Contacts keep only organization, state and country (names, emails, phones and addresses of people are never returned). raw=true adds the registry's record (or the WHOIS text without personal contact lines).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
domainrequired | string | Domain name (a URL or subdomain works too). Example: github.com |
raw | boolean | Also return the registry's full record (raw) or WHOIS text (raw_text). Example: false Default: false |
registrar_lookup | boolean | Also read the registrar's own record (thin registries such as .com/.net). Default true. Default: true |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/web/v1/whois?domain=github.com" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/web/v1/whois",
params={"domain": "github.com"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/web/v1/whois");
url.searchParams.set("domain", "github.com");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).