Errors

Every error has the same shape, and its HTTP status matches its type:

  • error object required
    • type string required

      one of invalid_request, authentication_error, permission_error, not_found, conflict, rate_limit, api_error

    • code string required

      one of invalid_parameter, missing_parameter, unsupported_date_range, invalid_api_key, key_revoked, scope_not_allowed, plan_restricted, domain_not_allowed, not_found, idempotency_conflict, place_ambiguous, place_not_found, rate_limited, quota_exhausted, internal_error, engine_unavailable, timeout, time_required

    • message string required
    • param string
    • issues array of object
      Fields
      • param string required
      • message string required
    • candidates array of object
      Fields
      • place_id string required
      • name string required
      • state string
      • country string
    • request_id string required
    • doc_url string (uri) required
  • issues lists every problem in the request at once.
  • candidates comes with place_ambiguous.
  • request_id: quote it when you write to us.
  • doc_url links to the row for its code below.

Errors are never charged.

Error codes

CodeHTTPTypeMeaning
invalid_parameter400invalid_requestOne or more inputs are invalid; every problem is listed in error.issues.
missing_parameter400invalid_requestA required input is missing (the API currently reports these as invalid_parameter with issues). (reserved: not returned today)
unsupported_date_range400invalid_requestDates must be between 1900-01-01 and 2100-12-31.
invalid_api_key401authentication_errorMissing, invalid, revoked or expired API key.
key_revoked401authentication_errorRevoked keys get invalid_api_key instead, so a prober learns nothing. (reserved: not returned today)
scope_not_allowed403permission_errorThis key cannot call this operation; publishable keys may call only read-only operations without birth data.
plan_restricted403permission_errorEvery plan includes every operation, so this is not returned. (reserved: not returned today)
domain_not_allowed403permission_errorThe request's Origin is not one of this publishable key's allowed origins.
not_found404not_foundNo such operation or resource.
idempotency_conflict409conflictIdempotency keys are not supported yet. (reserved: not returned today)
place_ambiguous422invalid_requestMore than one place matches; choose one of error.candidates or send coordinates.
place_not_found422invalid_requestNo place matches; send coordinates or a place_id.
time_required422invalid_requestThis operation needs a birth time (time_accuracy exact or approximate).
rate_limited429rate_limitToo many requests per second, or too many at once, for your plan; retry after Retry-After seconds.
quota_exhausted429rate_limitThis period's credits, or the project's daily test calls, are used up.
internal_error500api_errorSomething failed on our side; quote the request_id.
engine_unavailable500api_errorThe calculation engine is not reachable; not returned today because the engine runs in-process. (reserved: not returned today)
timeout500api_errorA calculation took too long; not returned today. (reserved: not returned today)