# Fallback Search: Woosmap Localities then Google Places or Woosmap Address

**URL:** <https://forum.woosmap.com/t/fallback-search-woosmap-localities-then-google-places-or-woosmap-address/71>\
**Category:** Guides\
**Tags:** localities, woosmap-address\
**Created:** [March 10, 2021, 4:26pm UTC](https://forum.woosmap.com/t/fallback-search-woosmap-localities-then-google-places-or-woosmap-address/71 "2021-03-10T16:26:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gael](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.woosmap.com/gael/32/3_2.png) [@gael](https://forum.woosmap.com/u/gael)\
**Post date:** [March 10, 2021, 4:26pm UTC](https://forum.woosmap.com/t/fallback-search-woosmap-localities-then-google-places-or-woosmap-address/71/1 "2021-03-10T16:26:59Z")

</div>

> **This topic is archived.** The two community links below no longer resolve, and this fallback widget has been superseded by the MultiSearch library, which does the same thing with a configurable `fallbackBreakpoint` per API. See [Fallback concept](https://developers.woosmap.com/products/multisearch-lib/fallback-concept/) and [MultiSearch for JS](https://developers.woosmap.com/products/multisearch-lib/js/get-started/).

Woosmap Localities API is a web service that returns geographical places like **city names** , **postal codes** , **suburbs** ,… commonly used for autocompletion feature to suggest predictions as the user types.

Even if this API can satisfy most of your user’s searches, in some cases, it do not return the appropriate suggestions.

To give you the best chance to make a winning first impression, you could trigger the call to another autocomplete API like Google Places or Woosmap Address API.

The key point is to decide “when” do this fallback search.

We’ve built a small library/widget called [Localities Fallback](https://community.woosmap.com/localities-fallback-googleplaces/) which computes a **matching ratio** between the user input and for each returned localities items. If Woosmap Localities return no item with a matching **Ratio = 100** (customizable using `breakpointRatio` parameter), the widget populates the predictions pick list with Google Places or Woosmap Address items.

The **ratio** value is added to each autocomplete item and calculated as a partial levenshtein ratio of the two strings: the input from the user and the description of autocomplete item. We use a fuzzy searching algorithm.

Example with fallback search on Google Places:

https://jsfiddle.net/woosmap/zcs0rdot/embedded/result,js,html,css/dark
* * *

You can see a fallback search on Woosmap Address [here](https://community.woosmap.com/localities-fallback-googleplaces/woosmap-address/#sample)

The source code of this widget is available [on GitHub](https://github.com/woosmap/woosmap-autocomplete-searchbox).

---

<div class="post-metadata">

**Author:** ![gael](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.woosmap.com/gael/32/3_2.png) [@gael](https://forum.woosmap.com/u/gael)\
**Post date:** [September 18, 2026, 3:59pm UTC](https://forum.woosmap.com/t/fallback-search-woosmap-localities-then-google-places-or-woosmap-address/71/2 "2026-09-18T15:59:09Z")

</div>


