How do I check if a domain is registered or not?

You can supply the optional da parameter (acceptable values: 0, 1, 2) to query domain availability checks. da = 2 is slower but more accurate. Results are returned under WhoisRecord → domainAvailability (AVAILABLE | UNAVAILABLE | UNDETERMINED).