Command reference
Complete Configuration and usage before making API requests. The examples below use the official Gateway and your locally configured ANTAPI_API_KEY.
Inspect the installed CLI
These commands run locally without making API requests:
antapi --help
antapi version --json
antapi setup
antapi doctor
Use --help to inspect available commands, version to identify the installed build, setup for private key configuration instructions, and doctor to check local configuration. antapi doctor --json provides the local check in JSON for scripts. A successful local check does not confirm remote access.
Check TLD coverage
antapi whois tlds --json
This makes a free authenticated request for supported TLDs. Use it to inspect coverage before a domain lookup. A valid project key is required even though the endpoint is free.
Look up a domain
Review WHOIS pricing, organization balance, and the project's budget before running a paid lookup:
antapi whois lookup example.com --json
Pass one bare domain, without a URL scheme, path, query, or port. Internationalized domains are supported:
antapi whois lookup 例子.中国 --json
Each example is a separate lookup when executed. Returned fields vary by registry; consult the WHOIS API reference for registration details, quality warnings, and redactions. For a list of domains, use the batch API guide; batch commands are not implemented in the CLI.
Use the result in a script
--json writes one JSON object to standard output on success. The data field preserves the API result, and metadata includes available Request ID, Receipt ID, and debit information. IDs and USD atoms are strings; preserve them without converting them to floating-point numbers.
On failure, standard output is empty and standard error contains a safe diagnostic. Check the process exit code before reading a result:
| Exit code | Meaning |
|---|---|
0 | Success |
1 | Configuration, network, or platform error |
2 | Invalid arguments |
Handle an uncertain request
The CLI does not automatically retry requests. A timeout or disconnect does not establish whether execution or billing completed. Keep the Request ID when available and inspect existing Console request records before choosing to run another paid lookup. See errors and recovery for API failure guidance.