How do you check if domains are available? I searched a little for a domain name API not too long ago, but all I found were things that required you to sign up (and almost always pay money, I think).
They frown on using it for domain lookups, but you might be able to get access anyway.
The only reliable way for domain checks is to query the registry database directly through a registrar instead of going through whois / DNS.
So. When I need to test if a bunch of domain names exist, I first of all do a DNS NS lookup. If you get a result, you know the domain exists. If you don't get a result, then do a whois.