Errors

Errors come back as JSON with a stable error code you can act on.

Error format

Errors return JSON in the form {"error": "code", "message": "explanation"} with these HTTP statuses:

Error codes
StatusError codeMeaningRetry?
400bad_ipNot a valid IPv4 or IPv6 address.No, fix the request
400bad_countrycountry is not a list of two-letter codes.No, fix the request
401invalid_keyThe API key is missing, wrong or revoked.No, check the key
401key_expiredThe key has passed its expiry date.No, use another key
402subscription_requiredThe account has no plan with API access. Ended trials and subscriptions move to the Free plan, so this is rare.No, check your plan on the Billing page
403ip_not_allowedThe request IP is not in the allowed server IPs of the key.No, update the key settings
403origin_not_allowedThe website domain is not allowed for the key, or the key is not enabled for browsers.No, update the key settings
403browser_only_keyThe key is restricted to browser use on its allowed domains.No, use a server key
404not_foundThe path does not exist.No, check the URL
429rate_limitedPer-second or daily limit reached.Yes, after a short wait
500server_errorA problem on our side.Yes, after a short wait

When to retry

When the IP geolocation API returns an error, retry only 429 and 500 responses, once, after a short pause. Every other error stays the same until you change the request, the key or the plan, so log it and let the visitor continue rather than blocking them.

Need a hand? Search the Help Center or open a support ticket. We usually reply within one business day.