Skip to main content
HTTP errors use a JSON envelope:
param and request_id are omitted when unavailable. A request ID can also appear in the X-Request-Id response header.

HTTP status codes

The API redacts upstream response bodies and implementation details. A failed Entity Search status contains only status.error: "internal error"; already prepared results can still be fetched. Not every status applies to every endpoint. Credit balance does not reserve credits and therefore does not return search billing, task, or idempotency errors. Entity Search also returns 422 invalid_request_error when entity_type is xiaohongshu or wechat and enable_web_search is omitted or set to false. The wechat entity type searches WeChat Official Accounts.

Task-level failures

An Entity Search task can fail after create_task succeeds. In that case, Status returns HTTP 200 with the failure nested under status:
The task failed, but its five ready results remain available through Fetch.

Retry guidance

Log the HTTP status, error type, request_id, X-Request-Id, and leads_search_id. Never log the API key or sensitive objective and result data.