Skip to content

Autocomplete

Autocomplete delivers low-latency suggestions optimised for prefix searches. It shares the same filters as forward search while adjusting ranking to favour short, partial text.

Try it: GET /autocomplete
NameRequiredDescription
textYesPartial query term (1–512 characters). Empty strings return HTTP 400.
sizeNoMaximum number of suggestions to return (1–40, default 10). Smaller sizes improve latency.
focus.point.lat, focus.point.lonNoBias suggestions toward a user’s current location.
boundary.circle.*, boundary.rect.*NoRestrict matches to a circular or rectangular area. Circles default to a 50 km radius.
boundary.country, boundary.gidNoLimit results to named geographies.
sources, layersNoFilter datasets or feature types (for example layers=address,street).
  • Bias results with focus.point.* or boundary.circle.* so that the first matches are local to the user.
  • Restrict layers to address or venue when building address entry flows; include locality for city pickers.
  • Trim size to the number of results you actually display to keep payloads and latency low.
  • Reuse the same API key and caching strategy as forward search; responses share the GeoJSON envelope.
Terminal window
curl -s -G 'https://api-na.geobridge.io/v1/autocomplete' \
-H 'Accept: application/json' \
-H "X-API-Key: ${GEOBRIDGE_API_KEY}" \
--data-urlencode 'text=hard rock' \
--data-urlencode 'focus.point.lat=52.5' \
--data-urlencode 'focus.point.lon=13.3' \
--data-urlencode 'size=5'
  • Autocomplete rejects missing text parameters with HTTP 400. Pre-validate input and fall back to client-side suggestions if needed.
  • A slow upstream shard may yield HTTP 408 or HTTP 504. Retry quickly or fail open to keep typing responsive.
  • Transient HTTP 5xx responses are safe to retry with short backoff windows.