Error Handling
The API uses standard HTTP status codes and returns structured error responses.
Error response format
{
"error": {
"code": "error_code",
"message": "Human-readable error description"
},
"request_id": "req_abc123"
}
HTTP status codes
| Status | Meaning | When |
|---|---|---|
| 200 | OK | Request succeeded |
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
Error codes
bad_request
The request is missing required parameters or contains invalid data.
{
"error": {
"code": "bad_request",
"message": "email or domain parameter is required"
}
}
Common causes:
- Missing both
emailanddomainquery parameters - Invalid email format
unauthorized
The API key is missing, invalid, or revoked.
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
Common causes:
- Missing
Authorizationheader - Incorrect
Bearerprefix - Revoked or deleted API key
rate_limited
You've exceeded the rate limit for your plan.
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}
Check the X-RateLimit-Reset header to know when you can retry. See Rate Limits for details.
internal_error
An unexpected error occurred on our side.
{
"error": {
"code": "internal_error",
"message": "Internal server error"
}
}
If this persists, contact support with your request_id.
Best practices
- Always check the HTTP status code before parsing the response body
- Implement exponential backoff for
429and500errors - Log the
request_idfor debugging and support requests - Handle network errors gracefully — timeouts, DNS failures, etc.