Checking whether a domain is free is a one-line job. Checking whether a domain is free, when it expires, who the registrar is and what email the company uses, for a list of a few thousand names, turned out to be a project with a lot of corners.
I'm a veterinarian. I write articles for a pet news site, and in my spare time I study networking (CCNA, Linux, Docker) on an old Lenovo laptop running Ubuntu Server. I write small tools for myself first and publish the ones that seem useful. This is the story of the first one I put on Apify, and mostly it's about what I learned about how domain data actually works.
WHOIS is not what you think it is
I assumed there was one WHOIS, a big database you ask. There isn't. Every registry runs its own server, with its own text format and its own rules about how fast you may ask. Parsing free text from hundreds of different servers is the kind of work that never ends.
RDAP (the newer, JSON version of WHOIS) fixes most of this. You ask over HTTPS and get JSON back with the same field names everywhere. IANA publishes a bootstrap file that tells you which RDAP server handles which TLD:
curl -s https://data.iana.org/rdap/dns.json | jq '.services | length' Then you query the right server for a domain:
curl -s https://rdap.org/domain/example.com | jq '.events' The events array has entries like registration, last changed and expiration, each with a date. That is where an expiry date comes from. No regex over free text.
A 404 from an RDAP server means the registry has no record of the name. That is the cleanest "available" signal you can get, and it's the one I trust most. RDAP covers more than 1,000 TLDs, so for most names this is the whole story.
Where RDAP stops
Not every TLD has RDAP. .io and .il are examples, and so are .de, .co, .eu, .it and .co.il. For these you have two options, and both are worse.
DNS. If a name has records, it is registered. That direction is reliable. The other direction is not: no DNS records does not prove the name is free. A domain can be registered and simply not point anywhere. So when DNS is the only evidence, I mark the row likely_available with low confidence, leave the available field empty, and do not charge for it. Saying "probably free" is fine. Writing available: true on a guess would send someone to a registrar to buy a name that is already owned.
The registry's own WHOIS. This can confirm it, but it is slow on purpose. Registries limit how fast you may ask, so you have to go slowly. I only use WHOIS for zones where I verified the answers against real registries. If WHOIS is busy or unsure, the row stays likely_available. For .de, .io, .co, .eu, .it and .co.il this means a confirmed free name becomes available and a confirmed taken one becomes registered.
The lesson here was about honesty in the data model more than about networking. Three states (true, false, null) plus a confidence field are more useful than a boolean that is sometimes a guess.
Registries push back, so be polite
My first instinct for a big list was to open as many connections as possible. That is the wrong idea, because registries rate-limit, and when they do, you get errors that look like "unknown" results.
The defaults I settled on: 20 checks in parallel overall, and at most 4 at once against any single registry. A list of 10,000 .com names and a list of 10,000 names spread across many TLDs behave very differently under that rule. The first is limited by one registry, the second by your own concurrency.
When a registry does rate-limit, the checker retries automatically. A name it could not resolve ends up as unknown with an errorCode such as RATE_LIMITED, TIMEOUT or RDAP_ERROR, and a plain-English message. An unknown row costs nothing, because I don't think anyone should pay for "the registry didn't answer".
A related detail for monitoring: a temporary lookup failure must never be reported as a change. If yesterday a name was registered and today the registry timed out, that is not "became available". It's a timeout. Getting this wrong would send false alerts, and false alerts teach people to ignore alerts.
Typos are free to detect
Lists from real life are dirty. People paste URLs, www. prefixes, paths, even email addresses. The checker cleans all of these down to the domain, removes duplicates and handles non-latin (IDN) domains.
The surprising part was typos in the TLD. gmail.con is a classic. There is no .con, so the right answer is invalid, not unknown and not "available". Because the TLD list is known, this check needs no network call, and those rows are free. It also saves a lot of pointless lookups on lists that came from forms where people mistype.
One row per domain, with email in it
I wanted one table, one row per domain, with registration data and email setup together. The email part comes from DNS: MX records tell you the provider (Google Workspace, Microsoft 365, Zoho, Proofpoint, Mimecast and more than 25 others), and SPF and DMARC records show how the domain protects its mail. For example, a real run gave google.com with 655 days until expiry, registrar MarkMonitor Inc. and Google Workspace for mail. apify.com showed 3,107 days left and Amazon Registrar, Inc.
Everything adds up to 28 columns. That sounds like a lot, but a fixed set of columns, the same in every row, is what keeps a CSV usable in Excel.
Speaking of which: registry text can contain anything, including something that starts with = and looks like a formula. If you export registry strings to CSV and open them in a spreadsheet, you can end up executing someone else's text. I neutralize those values so they can't run as formulas. It's a small thing, and I would not have thought of it if I had only tested with my own data.
Long runs fail, so save as you go
With lists of up to 100,000 domains, a run can hit its timeout or be restarted by the platform during a server migration. The checker handles that. Near the timeout or on abort, it stops cleanly and saves the results, the summary and the monitoring state. After a migration it continues from saved progress, and domains already done are not checked or charged again. Domains it never reached are not charged either.
For billing I chose a simple rule: $2 per 1,000 domains with a definite answer (registered or available). Unknown, likely_available, invalid lines and run starts cost nothing. You can also set a max cost per run, and the Actor stops just before it.
What it does not do
It does not load websites or take screenshots. It does not collect registrant names, emails or phones, so there is no personal data to worry about. And "available" only means the registry has no record. Premium or reserved names can cost more than a normal registration, so confirm the price at a registrar before you buy.
If you want to try this yourself
- Start from the IANA bootstrap file and use RDAP wherever it exists. Treat a 404 as "no record".
- For TLDs without RDAP, never turn "no DNS records" into "available". Keep a separate state for it.
- Cap concurrency per registry, not just overall, and retry on rate limits before you give up on a name.
If you'd rather not build it, I built this as an Apify Actor: https://apify.com/boris_labs/bulk-domain-checker. It was published on 28 November 2026, so it's very new, and I'm still learning what people need from it. If a TLD gives you a wrong answer, tell me which one.
I wrote this with help from an AI assistant and edited it myself. The numbers come from my own runs.