Make your first request
Start with a free WHOIS coverage request to verify your key, then look up a domain. Run both examples in your terminal or backend.
1. Prepare your project
Open API keys in Console, select your organization and project, and create a project API key. Save the full key when it is issued.
2. Configure your backend
Provide your project key through your server's environment or secret manager:
| Variable | Value |
|---|---|
ANTAPI_KEY | Your project API key. |
For a local terminal session, replace the placeholder with your key:
export ANTAPI_KEY="your-project-key"
The official Gateway is https://api.antapi.dev. Skills and CLI use it automatically; no Gateway setting is required. Send the key in the Authorization header, including for free endpoints.
Run examples in a trusted terminal or backend. Never put an API key in a browser bundle, public repository, screenshot, or log.
3. Verify access with a free request
curl --include \
"https://api.antapi.dev/whois/v1/tlds" \
--header "Authorization: Bearer $ANTAPI_KEY"
This request checks TLD coverage and does not consume Credits. Authentication and rate limits still apply. A successful JSON response has code: 0. The TLD reference explains the coverage fields.
4. Look up a domain
Check the published lookup price, your Credits balance and your project's available budget before this paid request:
curl --include \
"https://api.antapi.dev/whois/v1/domains/example.com" \
--header "Authorization: Bearer $ANTAPI_KEY"
For the complete WHOIS workflow, including TLD coverage and result interpretation, follow WHOIS overview and integration. For another product, choose its guide and reference from the documentation home.
5. Check the response and usage
Check the HTTP status and the JSON envelope. A successful response has code: 0, an endpoint-specific data payload, and an empty error string. For asynchronous work, an acceptance response starts a job; it does not confirm completed work or a final charge.
Save the X-Request-ID response header for investigation. Open usage and request records to review the request and any final paid receipt. Use Credits and billing to distinguish a reservation from a final charge.
Before production
- Follow API key security and use separate keys where access needs independent management.
- Persist a stable idempotency key before an asynchronous submission or a paid request you may need to retry.
- Handle rate limits, errors, and uncertain outcomes with deliberate backoff and recovery.
- Read the product's success definition and complete API reference before counting results or deciding what to retry.