Web data & toolsDomains
Domain Availability API: Check Names Across TLDs and Read WHOIS Records
Domain availability API tutorial: check a name across TLDs, screen 50 domains in one call and read RDAP or WHOIS records with expiry dates, in Python.
A naming session for a new product rarely ends with one candidate. You have 30 names on a whiteboard, each worth checking on .com, .io, .ai, .dev and a couple of country extensions: about 300 lookups. A registrar's search box answers one at a time, between upsells, and a script that scrapes it breaks the week the page changes. A domain availability API answers the same question from the registries themselves, for a whole list, in a second or two.
The second question comes right after: for the names that are taken, who holds them, since when, and when do they expire? That is WHOIS, which for most of the internet is now served by its structured successor, RDAP.
This tutorial explains how availability and WHOIS data really work, then builds a name finder, a bulk checker and an expiry monitor in Python on the Domain Availability & WHOIS API.
How a registry decides that a domain is available
Every extension has one registry that keeps the authoritative list of registered names (Verisign for .com and .net, for example). Registrars such as OVH, Gandi or Namecheap sell names and write them into that list. A name is available when the registry has no record of it.
Three shortcuts give wrong answers:
- DNS lookups. A registered domain can have no DNS at all: parked without name servers, on
clientHold, or simply never configured. An NXDOMAIN answer does not mean the name is free. - Registrar search pages. They answer from the registry, but one name at a time, behind bot protection, and often mixed with "premium" offers and suggestions.
- Raw port 43 WHOIS. Each registry returns free-form text in its own format. "No match for", "Domain not found" and "Status: free" all mean the same thing, and many servers throttle repeated queries.
RDAP replaced WHOIS for generic TLDs
The Registration Data Access Protocol (RDAP) returns JSON over HTTPS, with a standard structure defined in RFC 9083. ICANN made it the required protocol for generic top-level domains, and the obligation for gTLD registries and registrars to run port 43 WHOIS ended on 28 January 2025 (ICANN on RDAP). IANA publishes a bootstrap file that maps each extension to its RDAP server. Ask that server for a domain: a JSON record means registered, a 404 means not registered.
Many country-code extensions (.io, .de, .co among them) still have no RDAP service, so a complete checker needs both protocols.
Registrable domain versus host name
www.bbc.co.uk is a host; the name someone registered is bbc.co.uk. You cannot find that boundary by counting dots, because co.uk is itself a public suffix. The Public Suffix List lists those suffixes, and every availability check should reduce its input with it first.
Four ways to check availability
| Approach | Answer comes from | Per-domain speed | Breaks on |
|---|---|---|---|
DNS lookup (dig, nslookup) |
Name servers | Milliseconds | Registered domains without DNS: false "available" |
| Registrar search page | Registry, through the registrar | Seconds, one at a time | Bot walls, layout changes |
| Your own WHOIS client | Registry WHOIS servers | 0.5 to 2 s | Text formats, rate limits, extensions without port 43 |
| RDAP first, WHOIS then DNS as fallbacks (this API) | Registry | 1 to 3 s, in parallel | Registries that throttle unregistered lookups (answer: unknown, free) |
Check a name across TLDs
GET /v1/domain/check takes a name without extension and up to 20 extensions in tlds; without tlds it checks .com, .net, .org, .io, .ai, .co, .app, .dev, .fr, .de, .uk and .eu. Each extension costs 1 credit and they are checked in parallel.
import requests
HOST = "domain-availability-whois-lookup-rdap.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
r = requests.get(
f"{API}/v1/domain/check",
headers=HEADERS,
params={"name": "quillmint", "tlds": "com,net,io,ai,dev,app,co,fr,de,xyz"},
timeout=30,
)
r.raise_for_status()
for row in r.json()["results"]:
print(f"{row['domain']:<16} {row['status']:<11} {row.get('source', '')}")
The real response, in 3.1 seconds for 10 extensions, billed 9 credits (shortened):
{
"name": "quillmint",
"results": [
{ "domain": "quillmint.com", "status": "registered", "available": false, "source": "rdap" },
{ "domain": "quillmint.net", "status": "available", "available": true, "source": "rdap" },
{ "domain": "quillmint.io", "status": "available", "available": true, "source": "whois" },
{ "domain": "quillmint.ai", "status": "available", "available": true, "source": "rdap" },
{ "domain": "quillmint.dev", "status": "available", "available": true, "source": "rdap" },
{ "domain": "quillmint.co", "status": "registered", "available": false, "source": "whois" },
{ "domain": "quillmint.de", "status": "available", "available": true, "source": "whois" },
{ "domain": "quillmint.xyz", "status": "unknown" }
]
}
source says which protocol answered: RDAP for .com, .ai or .dev, WHOIS for .io, .co and .de, which have no RDAP server. The .com is taken, .net, .io, .ai and .dev are free. .xyz came back unknown: the registry did not give a clear answer at that moment, so that extension was not billed (9 credits for 10). Treat it as "check again later", never as available (more on that below).
The same call with curl:
curl -G "https://domain-availability-whois-lookup-rdap.p.rapidapi.com/v1/domain/check" \
-d "name=quillmint" -d "tlds=com,io,ai,dev" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: domain-availability-whois-lookup-rdap.p.rapidapi.com"
Bulk domain availability check for a naming shortlist
When the .com is taken, naming teams try variants: a prefix (get, try), another extension, a new gTLD. POST /v1/domain/availability/bulk takes up to 50 domains, checks them in parallel and bills 1 credit per domain. Inputs can be URLs; they are reduced to the registrable domain, and duplicates are removed.
import re
import requests
HOST = "domain-availability-whois-lookup-rdap.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
LABEL = re.compile(r"^(?!-)[a-z0-9-]{1,63}(?<!-)$")
def candidates(name: str) -> list[str]:
names = [name, f"get{name}", f"try{name}"]
tlds = ["com", "net", "ai", "studio", "shop"]
return [f"{n}.{t}" for n in names for t in tlds if LABEL.match(n)]
domains = candidates("quillmint")[:50]
r = requests.post(
f"{API}/v1/domain/availability/bulk",
headers=HEADERS,
json={"domains": domains},
timeout=60,
)
r.raise_for_status()
free = [row["domain"] for row in r.json()["results"] if row["status"] == "available"]
print(free)
A real bulk call with eight domains, one of them given as a URL, answered in 3.3 seconds and billed 7 credits, the unknown one being free (shortened):
{
"results": [
{ "domain": "quillmint.com", "status": "registered", "available": false, "source": "rdap" },
{ "domain": "getquillmint.com", "status": "available", "available": true, "source": "rdap" },
{ "domain": "quillmint.studio", "status": "available", "available": true, "source": "rdap" },
{ "domain": "quillmint.shop", "status": "unknown" },
{ "domain": "quillmint.io", "status": "available", "available": true, "source": "whois" },
{ "domain": "tryquillmint.com", "status": "available", "available": true, "source": "rdap" }
]
}
https://www.quillmint.io/ came back as quillmint.io. One trap: a single invalid entry rejects the whole batch with 400 invalid_domain (billed 0 credits), so validate labels before sending, as candidates() does. A bare public suffix such as co.uk is refused with "This is a public suffix, not a domain."
WHOIS lookup API: registrar, age and expiry
GET /v1/domain/whois returns the registration record of a registered domain. The input can be any URL; here, a page of python.org:
r = requests.get(
f"{API}/v1/domain/whois",
headers=HEADERS,
params={"domain": "https://www.python.org/downloads/"},
timeout=30,
)
r.raise_for_status()
record = r.json()
print(record["registrar"], record["created"], record["days_until_expiry"])
The response, without its updated date:
{
"domain": "python.org",
"status": "registered",
"registered": true,
"source": "rdap",
"registrar": "Gandi SAS",
"registrar_url": "https://rdap.gandi.net",
"registrar_iana_id": "81",
"created": "1995-03-27T05:00:00Z",
"expires": "2033-03-28T05:00:00Z",
"age_days": 11569,
"days_until_expiry": 2312,
"statuses": ["client transfer prohibited"],
"nameservers": ["ns-1134.awsdns-13.org", "ns-2046.awsdns-63.co.uk", "ns-484.awsdns-60.com", "ns-981.awsdns-58.net"],
"dnssec": false,
"abuse_email": "abuse@support.gandi.net"
}
age_days and days_until_expiry save you the date arithmetic. The name servers show the DNS is hosted on Amazon Route 53. abuse_email is the registrar's abuse desk, the address to use for a phishing or malware report.
For .io, which has no RDAP, the same endpoint falls back to WHOIS and parses the text into the same fields (shortened):
{
"domain": "google.io",
"source": "whois",
"registrar": "MarkMonitor Inc.",
"registrar_iana_id": "292",
"created": "2002-10-01T01:00:00Z",
"expires": "2027-09-30T01:00:00Z",
"statuses": ["clientDeleteProhibited", "serverDeleteProhibited", "clientTransferProhibited", "serverTransferProhibited", "clientUpdateProhibited", "serverUpdateProhibited"],
"registrant_organization": "Google LLC",
"registrant_country": "US"
}
Two details. registrant_organization appears because "Google LLC" is clearly a company; a person's name, email, phone or street address is never returned, even when a registry publishes them. And the statuses keep each protocol's spelling: RDAP writes client transfer prohibited, WHOIS writes the EPP code clientTransferProhibited. Normalise them before you compare:
def epp(status: str) -> str:
"""'client transfer prohibited' and 'clientTransferProhibited' -> one key."""
return status.replace(" ", "").lower()
locked = epp("clientTransferProhibited") in {epp(s) for s in record["statuses"]}
clientTransferProhibited is the usual registrar lock against hijacking by transfer. pendingDelete or redemptionPeriod on a gTLD name means it expired and may drop soon.
Watch expiry dates and newly registered domains
A portfolio of domains is cheap to watch: one credit per domain per run. This job flags anything expiring within 30 days and any record the registry would not return:
import time
import requests
HOST = "domain-availability-whois-lookup-rdap.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
PORTFOLIO = ["python.org", "google.io", "quillmint.com"]
def whois(domain: str, attempts: int = 3) -> dict:
for attempt in range(attempts):
r = requests.get(
f"{API}/v1/domain/whois",
headers=HEADERS,
params={"domain": domain},
timeout=30,
)
if r.status_code != 503:
break
time.sleep(2 * 2**attempt) # registry did not answer: not billed
return r.json()
for domain in PORTFOLIO:
data = whois(domain)
if "error" in data:
print(f"{domain}: {data['error']['code']}")
elif data.get("days_until_expiry", 9999) < 30:
print(f"{domain}: expires in {data['days_until_expiry']} days")
The same age_days field turns the lookup into a fraud signal. Phishing kits run on domains registered days before the campaign; a link to a domain younger than 30 days that asks for a password deserves suspicion. Our phishing URL checker article shows that signal combined with others.
Handling unknown answers and registry limits
Registries protect themselves, and some refuse automated lookups at busy times. When RDAP refuses, the API tries the registry's WHOIS server, then DNS. DNS can prove that a name is taken (a delegated domain is registered) but never that it is free, as explained above. A bulk call mixing registered and unregistered names on .xyz, .shop and .co.uk, billed 5 credits for 6 domains:
{
"results": [
{ "domain": "abc.xyz", "status": "registered", "available": false, "source": "dns" },
{ "domain": "quillmint.xyz", "status": "unknown" },
{ "domain": "nike.shop", "status": "registered", "available": false, "source": "dns" },
{ "domain": "quillmint.shop", "status": "available", "available": true, "source": "rdap" },
{ "domain": "bbc.co.uk", "status": "registered", "available": false, "source": "whois" },
{ "domain": "quillmint.co.uk", "status": "available", "available": true, "source": "whois" }
]
}
abc.xyz and nike.shop were settled by DNS when the registry would not answer. quillmint.xyz has no DNS, which proves nothing, so it stays unknown and is not billed. quillmint.shop, unknown in the earlier bulk call, was answered by RDAP a few minutes later: throttling comes and goes.
What to do with each outcome:
| Outcome | Meaning | Billed | What to do |
|---|---|---|---|
available / registered |
The registry (or, for registered, DNS) answered |
1 credit | Use it |
unknown |
The registry refused and DNS cannot prove the name is free | 0 | Retry later; never treat as available |
400 invalid_domain |
Not a domain, or a public suffix | 0 | Fix the input |
503 registry_error |
The registry did not answer or refused a WHOIS lookup | 0 | Retry with backoff |
Results are cached for 10 minutes per domain, so polling the same name faster than that gains nothing. For drop-catching, where seconds matter, use a registrar's backorder service instead.
Pricing and the Apify actor
Every domain checked costs 1 credit, whichever endpoint you call. The free BASIC plan gives 10 credits a day. PRO is $3.99 a month for 60,000 credits, about $0.00007 per domain; ULTRA is $9.99 for 300,000 and MEGA $29.99 for 1,400,000. Invalid inputs, unknown answers and failed registry calls use no credits. Plans are on the domain API page and parameters in the API reference.
For a list in a spreadsheet, the Domain Availability Checker & WHOIS Lookup actor on Apify takes domains or names, checks them and exports a table, at $0.0005 per domain checked and $0.0015 per WHOIS record.
Once a name is registered, the next checks are its DNS and email setup: see how to grade SPF, DKIM and DMARC. To learn what a competitor's site runs on, the tech stack lookup article covers that.
What the domain availability API does not do
- It does not register or price domains.
availablemeans the registry has no record. A registrar may still ask a premium price, and some names are reserved by the registry. - No personal data. Registrant names, emails, phones and addresses are never returned; most registries redact them anyway since the GDPR.
- No history. You get the current record, not past owners or past name servers, and there is no reverse WHOIS (all domains of one owner).
- No drop-catching. The 10-minute cache and registry rate limits make it a checker, not a sniper.
- Some registries throttle. Expect a few free
unknownanswers, or a503on WHOIS lookups, on some extensions at busy times; build the retry in. - No DNS records. The DNS API returns A, MX or TXT records.
Frequently asked questions
What is the difference between WHOIS and RDAP?
Both return the registration data of a domain. WHOIS (port 43, RFC 3912) returns free-form text in each registry's own format. RDAP returns standard JSON over HTTPS, supports access control and internationalisation, and is the protocol ICANN requires for generic TLDs. Many country-code TLDs still offer only WHOIS.
How do I check if a domain is available in Python?
Find the extension's RDAP server in IANA's bootstrap file and request /domain/<name>: a 404 means not registered. Fall back to WHOIS for extensions without RDAP, and parse each registry's "not found" wording. Or call GET /v1/domain/availability?domain= and read status.
Why does a registrar show a higher price for an available domain?
Registries set aside premium names with higher prices, and some keep reserved names that nobody can register. An availability check asks whether the name is registered, not what it costs; the registrar's checkout gives the final price.
Is a DNS lookup enough to know whether a domain is free?
No. A registered domain may have no name servers or be on hold, so DNS answers NXDOMAIN while the name is taken. Only the registry knows.
Can I get the owner's name and email address?
Not from this API, and rarely from any public source since 2018: registries and registrars redact personal registrant data under the GDPR. You get the registrar, its abuse contact, and the organisation only when it is a legal entity.
How many domains can I check in one call?
Up to 50 with the bulk endpoint, or up to 20 extensions of one name with /check. Each domain is 1 credit.
Get started
Domain Availability & WHOIS Lookup API
Domain availability in bulk or across extensions, and WHOIS/RDAP: registrar, dates, expiry.
- Domains
- WHOIS
- RDAP
- Python
- Branding



