Quick Reference Table
| Status Code | Category | Retry? | What to Do |
|---|---|---|---|
200 | Success | — | Process the response data |
400 | Input | No — fix input | Check error_label and message, then fix your request |
401 | Auth | No — fix API key | Verify your X-API-Key header |
403 | Access | No — check permissions | Verify account permissions |
404 | Not Found | No | Resource doesn’t exist — no action needed |
429 | Rate Limit | Yes — with backoff | Wait for Retry-After header value, then retry |
500 | Server | Yes — with backoff | Retry after a short delay |
Error Response Structure
The API uses a consistent error response format across all endpoints. When an error occurs, you’ll receive a response with the following structure:error_label: A machine-readable identifier for the error typeerror_scope: Indicates which part of the request caused the error (e.g., “input”, “auth”, “server”)error_ref: A unique reference code for tracking and debuggingmessage: A human-readable description of the errorstatus_code: The HTTP status codeparams: Additional error parameters (if any)
Understanding Error Scopes
Every error response includes anerror_scope field that indicates what caused the error:
| Scope | Description | Typical Action |
|---|---|---|
input | The input data provided is invalid | Fix the input format or value |
param | A parameter in the request is invalid | Check parameter requirements in the docs |
auth | Authentication or authorization issue | Verify your API key and permissions |
server | Server-side error | Retry with backoff, or contact support |
Handling Rate Limit Errors (429)
When you exceed rate limits, you’ll receive a429 Too Many Requests response. Use the Retry-After header to know when to retry.
Example Implementation:
Error Categories
Input & Validation Errors (400)
These errors occur when your request contains invalid data. Do not retry — fix the input first.INVALID_INPUT
INVALID_INPUT
Description: The input data is invalid or incorrectly formatted.Common Causes:
- Invalid URL format
- Missing required identifiers
- Malformed query parameters
message field for details, then verify your input against the endpoint’s documentation.BAD_PARAMETERS
BAD_PARAMETERS
Description: One or more parameters in the request are invalid.Common Causes:
- Parameter value out of allowed range
- Incompatible parameter combinations
- Wrong data type for a parameter
Authentication & Access Errors (401, 403)
These errors indicate permission or authentication issues.UNAUTHORIZED (401)
UNAUTHORIZED (401)
FORBIDDEN (403)
FORBIDDEN (403)
Description: You don’t have access to this resource.Common Causes:
- Insufficient plan permissions
- Resource restricted to specific accounts
Not Found Errors (404)
These errors indicate the requested resource doesn’t exist.NOT_FOUND
NOT_FOUND
Description: The resource you requested doesn’t exist or is no longer available.Common Causes:
- Profile has been deleted or deactivated
- Company page no longer exists
- Invalid identifier (typo in URL or ID)
NO_RESULT
NO_RESULT
Description: The query returned no results.Common Causes:
- Search criteria too narrow
- No matching data found
Server Errors (500, 503)
These errors indicate something went wrong on our end.INTERNAL_ERROR (500)
INTERNAL_ERROR (500)
Description: An unexpected server error occurred.Resolution: Retry with exponential backoff. If persistent, contact [email protected] with the
error_ref value.SERVICE_UNAVAILABLE (503)
SERVICE_UNAVAILABLE (503)
Best Practices
-
Always check
error_label: Use this field to programmatically handle different error types. -
Log the
error_ref: This unique reference helps our support team investigate issues quickly. - Implement exponential backoff: For retryable errors (429, 500, 503), wait progressively longer between retries.
- Don’t retry input errors: 400-level errors (except 429) require fixing your request, not retrying.
If you encounter persistent errors or need help debugging, contact [email protected] with the
error_ref from your error response.