Use cases

Auto-filling a checkout address from a partial entry

Typing a full street address on a phone keyboard is slow and error-prone, and every typo in that process becomes a potential delivery problem later. An online store selling to a largely mobile audience looked at its checkout abandonment data and found the address field was where a disproportionate number of shoppers gave up partway through, often after multiple attempts to correct a line they had mistyped.

The fix was live suggestions. As a shopper typed into the address field, the checkout form sent the partial text to /v1/autocomplete, which returns candidate address matches shaped for exactly this kind of interactive search, updating with each new suggestion as more characters were typed. Instead of typing an entire street address and hoping it was formatted the way the store's system expected, a shopper typed the first few characters of their street and picked the right one from a short list that appeared underneath the field.

Selecting a suggestion filled in the rest of the address fields at once, street, city, region, postal code, removing several separate fields a shopper would otherwise have had to type by hand one at a time. This mattered more than it might sound like it should, since each additional field is another chance for a typo, and a typo in a postal code or a city name is often what causes an address verification step further down the line to flag an order that a shopper filled in correctly in spirit but not in the exact format the system expected.

The store kept manual entry available as a fallback, since autocomplete suggestions depend on the address existing in a recognizable form, and an unusual address, a very new building, or a rural route without a standard street name might not surface a good match. A shopper who did not see their address in the suggestion list could keep typing and submit the form manually, which the store's existing validation handled the same way it always had.

The measurable effect was fewer abandoned checkouts at the address step and a meaningful drop in the rate of orders flagged for address correction after the fact, since fewer shoppers were introducing typos into fields that autocomplete had filled in correctly for them. Neither of these numbers were dramatic on their own, but checkout abandonment is one of those metrics where small improvements compound, since every shopper who completes checkout instead of leaving is revenue that would not have existed otherwise.

Autocomplete requests scale with how much a shopper types, since each keystroke past a minimum length can trigger a new suggestion request, which is a heavier pattern than a single geocoding call per order. The store's engineering team tuned the field to wait for a short pause in typing before firing a request rather than firing on every single keystroke, which cut request volume substantially without shoppers noticing any difference in how responsive the suggestions felt. That kept the feature comfortably inside the free daily allowance for most of the year, with prepaid credit covering the busier holiday shopping season.

Documentation for the endpoint, including how to tune request timing, is at /docs/address-autocomplete/.