Step 1: Choose API key

You will need a valid API key in order to use this component within your website.

Step 2: Customise the AutoSuggest Component

The preview and code change as you type. See the tutorial for every attribute.

Type a country name or code, then choose from the list. Backspace removes the last country.
Clip to bounding box(clip_to_bounding_box)
Clip to circle(clip_to_circle)
PreviewLive API

Loading the component…

Type a 3 word address, for example filled.count.so, and choose a suggestion.

The real component, run through this site with its demo key. Your code uses YOUR_API_KEY.

Step 3: Add the component to a form

  1. Add these scripts between the <head></head> tags.

    HTML
    <script type="module" src="https://cdn.what3words.com/javascript-components@5.0.5/dist/what3words/what3words.esm.js"></script>
    <script nomodule src="https://cdn.what3words.com/javascript-components@5.0.5/dist/what3words/what3words.js"></script>
  2. Add the component within an HTML form element.

    HTML
    <what3words-autosuggest
      api_key="YOUR_API_KEY">
      <input
        type="text"
        placeholder="e.g. ///lock.spout.radar"
        autocomplete="off"
      />
    </what3words-autosuggest>

Follow the full instructions in the AutoSuggest Component tutorial to add it to your own page.

Using an e-commerce platform? Try one of our plugins instead…

esc
↑ ↓ to choose↵ to openesc to close