It's not fully accurate, because it returns unavailable even for parked pages, which technically are available, but works for me.
It just checks for A records via this endpoint https://cloudflare-dns.com/dns-query?name=${domain}&type=A
Just make sure to pass this header - "application/dns-json"