Another option might be to download the entire .com registry database from ICANN and query it live. I say “might” because I am not sure if your use case would be permitted under their TOS.
Also, I have another project for which I store a huge amount of data, and as it turns out, data costs a lot of money to store! Depends on the size of the list, I might be better off paying for the Domainr API.
367000000 * 253 bytes = 92.8GB
As you only need to know the domain exists.In reality it would be smaller than that as the average length will be much shorted. I expect 10-20GB
You could get clever and use a bloom filter to save space, falling back to the api.