Skip to content

Errors

The native /v1 API uses real HTTP status codes and a flat, machine-readable error body:

{
"error": {
"code": "insufficient_balance",
"message": "Your prepaid balance is too low for this request."
},
"request_id": "req_9f2c…"
}
  • error.code is a stable snake_case string you switch on. It will not change.
  • error.message is human-readable and may change — do not parse it.
  • request_id correlates the failure with your logs and Serplify support.
  • Validation errors also include error.details: an array of { field, message } entries.
HTTPerror.codeMeaning
400bad_requestMalformed request body or parameters.
401unauthorizedMissing or invalid API key.
402insufficient_balancePrepaid wallet balance too low for the request.
402budget_exceededThe API key’s monthly spend limit has been reached.
403forbiddenThe key may not access the resource.
404not_foundResource (e.g. a task id) not found.
422invalid_locationThe location could not be resolved.
422invalid_languageThe language could not be resolved.
422invalid_keywordThe keyword is missing or invalid.
429rate_limitedToo many requests — slow down and retry.
202task_not_readyAsync task is still processing (see tasks).
502task_failedThe SERP/task could not be completed.
500internal_errorUnexpected server error.
HTTP 400
{
"error": {
"code": "bad_request",
"message": "Invalid request body.",
"details": [
{ "field": "keyword", "message": "String must contain at least 1 character(s)" },
{ "field": "location", "message": "location requires one of code, name, or coordinate." }
]
},
"request_id": "req_9f2c…"
}
  • 429 and 5xx are safe to retry with exponential backoff.
  • 402 insufficient_balance means top up your wallet first, then retry.
  • 402 budget_exceeded means the key hit its monthly cap — raise the cap or wait for the rolling 30-day window to free up, then retry.
  • 4xx validation errors (400, 422) will keep failing until the request is corrected — do not blind-retry them.