Skip to main content
This page provides a comprehensive reference for understanding and handling errors across the Captain Data API.

Quick Reference Table


Error Response Structure

The API uses a consistent error response format across endpoints (except the subscription plan rate-limit body). When an error occurs, you receive a response with the following structure:
Each error response includes:
  • error_label: A machine-readable identifier for the error type (use this for branching)
  • error_scope: Which part of the request failed (input, param, integ, or config)
  • error_ref: A unique reference for support and debugging
  • message: A human-readable description
  • status_code: The HTTP status code
  • params: Additional public details when available (keys starting with _ are never returned)

Understanding Error Scopes

Every error response may include an error_scope field:

Handling Rate Limit Errors (429)

Captain Data v1 has one customer-facing rate limit: your subscription plan (requests per second and per minute). When that plan limit is exceeded, the response uses the nested plan-limit shape (error.code, error.details.Retry-After, X-RateLimit-*). See Rate Limits for the full example and header meanings. Other transient failures may return the standard error body with status_code: 429 and error_label: "GENERIC_ERROR". Retry those with exponential backoff. Do not expect provider-specific labels or per-window appendix values in the public response. Example Implementation (plan limit + standard 429):
For plan-tier tables and the nested rate-limit body, see Rate Limits.

Error Categories

Input & Validation Errors (400)

These errors occur when your request contains invalid data. Do not retry — fix the request first.
Description: One or more query or path parameters are invalid.Common Causes:
  • Parameter value out of allowed range
  • Incompatible parameter combinations (for example XOR identifiers)
  • Expired or invalid pagination cursor
Resolution: Review parameter constraints in the endpoint documentation. Check params.error when present.
Description: The request body or input payload is invalid for this endpoint.Common Causes:
  • Invalid URL format
  • Missing required identifiers
  • Payload shape the action does not accept
Resolution: Check the message and params fields, then verify your input against the endpoint docs.

Authentication & Access Errors

These errors indicate permission, authentication, or subscription issues.
Description: Your API key is missing/invalid, or your workspace cannot access this resource.Common Causes:
  • Missing or invalid X-API-Key header
  • No active subscription
  • Workspace not allowed to call this endpoint
Resolution: Verify your API key in Developer Settings and check your subscription.

Not Found & Empty Results

These labels indicate the resource is missing or the query returned nothing.
Description: The resource you requested does not exist or is no longer available.Common Causes:
  • Profile or company page removed
  • Invalid identifier (typo in URL or UID)
Resolution: Verify the URL or uid. If valid, the resource may have been removed — no retry needed.
Description: The query completed but returned no matches.Common Causes:
  • Search or find criteria too narrow
  • No matching person or company in the dataset
Resolution: Treat as an empty result set. Broaden your search criteria if needed.

Transient & Server Errors

These errors indicate a temporary failure. Retry with backoff.
Description: An unexpected or collapsed server-side failure. Provider-specific labels are not exposed on the public v1 API; they surface as GENERIC_ERROR when returned to clients.Resolution: Retry with exponential backoff when status_code is 429 or 5xx. If it persists, contact support@captaindata.com with the error_ref value.
Description: An upstream call failed while fulfilling the request (for example on enrich or find).Resolution: Retry with backoff. If persistent, contact support with error_ref.

Best Practices

  1. Always check error_label: Branch on this field for programmatic handling.
  2. Log the error_ref: This unique reference helps our support team investigate issues quickly.
  3. Implement exponential backoff: For retryable errors (plan 429, GENERIC_ERROR with 429/5xx, HTTP_ERROR), wait progressively longer between retries.
  4. Don’t retry validation errors: BAD_PARAMETERS and BAD_INPUT require fixing the request.
  5. Ignore private params: Any field whose name starts with _ is internal and never returned to clients.
If you encounter persistent errors or need help debugging, contact support@captaindata.com with the error_ref from your error response.