Skip to main content
When a request fails, the API returns a consistent JSON error body with an HTTP status code. This page covers every error you might encounter, what causes it, and how to handle it.

Error shape

Every error response has the same structure:
The error field is a stable, machine-readable code you can match on in your code. The message field is a human-readable explanation that may change over time, so don’t parse it programmatically.

Error codes

Client errors (4xx)

These indicate a problem with the request. Fix the issue before retrying.

Rate limits per product

Each product has its own per-second budget per API key. Hitting one cap does not affect the others — a customer using the routing API at full speed has full geocoding capacity available in parallel. Note that /v1/routing/find-and-route and /v1/routing/search-along-route count against the geocoding cap, not the routing cap, because they internally perform a geocode. When you exceed a cap, the response is 429 too_many_requests with a retryAfter field giving the milliseconds until your next request will succeed.

Server errors (5xx)

These indicate a problem on our side. They are usually transient and safe to retry.

Handling errors in code

Check the HTTP status code first, then read the error field for specifics:

Retry strategy

Some errors are transient and safe to retry. Use exponential backoff with jitter to avoid thundering herd problems, where all your retries hit the server at the same time:

Common mistakes

Make sure you’re using the x-api-key header (not Authorization or api-key), and that your key starts with sk_live_. Keys passed as query parameters or in the request body are not recognised.
Check that latitude is between -90 and 90, and longitude is between -180 and 180. A common mistake is swapping lat/lon. If your latitude is something like 51.5 but your longitude is 151.2, the coordinates may point to an area with no road network data.