Not all registries participate in the SRS registry protocol. Some of the lesser known ccTLDs must be registered by the individual authorities.
It's not accurate to run a DNS query to determine whether the domain is available because one can own the domain, but decide not to set any DNS records.
Run WHOIS at scale and store the results into a DB. gTLD operators are required to provide WHOIS services, and WHOIS tells you whether any given domain is registered or not.
There are companies that will happily sell you this data in a more usable format.