Migration

Moving off a Google Places autocomplete integration

Autocomplete is a different kind of integration than a single geocoding call. It fires on nearly every keystroke a user makes in an address field, depends on session-based pricing or grouping in some providers, and the response needs to come back fast enough that a delay is visibly noticeable to whoever is typing. Migrating this piece carries more UX risk than a batch geocoding job precisely because users interact with it directly and in real time.

Google Places Autocomplete returns a list of predictions, each with a description string and a place_id that gets used in a follow-up details call to retrieve full address and coordinate information. That two-step pattern, predictions first, details second, is a specific interaction model that shapes a lot of front-end code built around it, including debounce timing and how selected results get displayed before the details call resolves.

This is a case where it matters to describe capability honestly. My Geocode provides address autocomplete as part of its lookup endpoints, with the request and response shaped as documented at /docs/address-autocomplete/, but the specific behavior of any autocomplete endpoint, including session grouping and result ranking, is worth testing directly against your own address data and user patterns rather than assuming a one-to-one match with Google's two-step model. Different providers structure the suggestion-to-detail flow differently, and that structural difference is usually the biggest actual migration task here, more than any single field name.

Practical steps for this migration:

  • Map out whether your current implementation needs the two-step predictions-then-details pattern, or whether a single-call suggestion endpoint would actually simplify your front-end code
  • Test debounce and minimum-character-count settings against the new endpoint's real response times under your own network conditions, rather than reusing values tuned for Google's infrastructure
  • Check how your UI handles a prediction list that comes back empty or with only one result, since ranking behavior differs meaningfully between providers and your fallback UX should not depend on receiving several suggestions

Authentication for the new endpoint works with a key as an X-API-Key header, Authorization: Bearer, HTTP Basic auth, or a query parameter. There are 2,500 free requests a day with no key at all, and 2,500 more free per key per day counted per network, beyond which pricing is prepaid credit at €0.0001 per request or an Unlimited key at €50 a month, the same rate as every other endpoint.

Because autocomplete calls can run high in volume relative to actual geocoding calls, given that most keystrokes generate a request, it is worth estimating expected daily volume against the free allowance and per-request rate before committing to a launch date, so there are no surprises in the first week of live traffic.