Geo Engine Docs

Traffic controls

Rate limiting

Review the default quotas, optional server-enabled request overrides, response headers, and deployment behavior.

Rate limiting

Every API request is rate limited. Quotas are stored in process memory and use a rolling request window. No Redis connection, table, or new environment credential is required.

Default quotas

Protected routes scope limits to the authenticated consuming application and API group. Public routes scope limits to the client IP and API group. Forward geocoding, reverse geocoding, and full-address autocomplete share one quota.

API group Default Maximum override
Address API 200 requests per 60 seconds 500 per 60 seconds
Distance API 1,000 combined per 60 seconds per application 1,000 combined per 60 seconds per application
Geofencing API 1,000 combined per 60 seconds per application 1,200 combined per 60 seconds per application
Forward, reverse, and address autocomplete 60 combined per 60 seconds 120 combined per 60 seconds
IP geocoding 30 per 60 seconds 60 per 60 seconds
Timezone geocoding 30 per 60 seconds 60 per 60 seconds

An additional pre-authentication safety limit allows 1,200 requests per client IP per minute across routes. Configure TRUST_PROXY_HOPS to match the trusted reverse proxy chain so IP-based protection uses the actual client IP.

Optional request overrides

Overrides are disabled by default. The server operator must set RATE_LIMITER=true in the Geo Engine environment to enable them. Keep it false for a public documentation deployment so callers cannot raise the documented defaults.

When enabled, send either or both headers:

Header Meaning Validation
rate-limit Requests allowed in the selected rolling window Positive whole number; cannot exceed that API group’s maximum override
rate-time Window duration in seconds Whole number from 1 to 300

If a header is omitted, its endpoint default is used. The configured override is still subject to the API group’s maximum per-minute ceiling.

curl --get 'http://localhost:8000/geocoding/forward' \
  --header 'x-app-id: postman' \
  --header 'x-api-key: <credential-id>.<secret>' \
  --header 'x-provider-key: photon-komoot' \
  --header 'rate-limit: 100' \
  --header 'rate-time: 60' \
  --data-urlencode 'q=38 Upper Montagu Street, London'

If RATE_LIMITER=false, the override headers are ignored and the defaults apply.

Response headers and errors

API group quotas report X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Window, and X-RateLimit-Reset. Exceeding a group quota returns HTTP 429 Too Many Requests, the shared error envelope with code RATE_LIMIT_EXCEEDED, and Retry-After in seconds. The pre-authentication limit may reject a request before the group quota headers are set. Invalid enabled override headers return HTTP 400 with a specific RATE_LIMIT_OVERRIDE_* code and a human-readable message.

Deployment notes

The in-memory counters are local to one running process. They reset on restart and are not shared between serverless instances. This gives a useful per-instance baseline without Redis, but it is not a globally coordinated quota. For a public hosted service, also configure request limits at the hosting platform, gateway, or trusted BFF; suggested starting caps are 120 Address API requests and 20 open-provider geocoding requests per client IP per minute. Revisit those values using observed traffic and provider terms. A future shared store can coordinate counters across instances when one is available.