Skip to main content
29M UK properties, one API call. Get your API key →
All widgets

Address box · drop-in widget

Type a little.
Pick the address.

Type-ahead UK address search on the address field you already have. One pick fills line 1, line 2, town and postcode, and keeps the property’s UPRN for your records. No new form, no build step.

Free
To type and search
1 token
Per address picked
UPRN
On every pick

One script tag, on the form you have.

Mark the form, name the fields, paste the script. The dashboard writes this for you with your key in it.

your-checkout.htmlhtml
<form data-homedata-automap="true">
  <input name="address_line_1">
  <input name="address_line_2">
  <input name="town">
  <input name="postcode">
  <input name="uprn" type="hidden">
</form>

<script src="https://homedata.co.uk/js/homedata-address.js"
        data-token="wt_your_public_key_here"
        data-automap="form[data-homedata-automap='true']"
        defer></script>

1 · Create a key

In the dashboard’s Address search, with the domains your form lives on.

2 · Map the fields

Click them on your own page, or let common input names match themselves.

3 · Ship

Suggestions as they type. One pick fills every mapped field.

Three ways to map your fields

Pick whichever suits how your form is built. You can switch later without changing the script.

Click them

From the dashboard, open your live page with the visual mapper and click each field: search box, line 1, town, postcode, UPRN. It saves to your key; no code changes.

Name them

Inputs named address_line_1, town, postcode or uprn (and common variants like city or zip) match themselves.

Point to them

Set data-input and data-field-* on the script tag with a CSS selector for each field.

AttributeRequiredNotes
data-tokenRequiredYour public key. Works only on the domains you listed.
data-automapOptionalA selector for the form whose inputs match by name.
data-inputOptionalThe address field to search from, if you map by selector.
data-field-line1, -line2, -town, -postcode, -uprnOptionalWhere each part of the picked address goes. -lat and -lng too.
data-placeholderOptionalPlaceholder text for the search field.
data-debugOptionalLogs every step to the console while you set it up.

Listen for the pick

Every pick fires an event on the input, so your own code can use the address too.

const input = document.querySelector('[name="address_line_1"]');

input.addEventListener('hd:select', (e) => {
  const { address } = e.detail;   // line 1, town, postcode, UPRN
});

Where the address box belongs

Anywhere a customer types an address you need to be right.

Checkout and delivery

Seven keystrokes and a tap instead of four fields. A postcode that exists, on an address that exists, so fewer parcels come back.

Sign-up and onboarding

Collect a clean address the first time, with the UPRN alongside, so the record joins up with everything else you hold.

Contact and enquiry forms

A valuation request, a callback, a viewing: know exactly which property they mean before you pick up the phone.

Questions

Frequently asked

What does the address box cost?

Typing and suggestions are free. Each address a customer picks costs 1 token (1p), billed to your token balance, and brings back the UPRN and coordinates with the address.

Will it break my existing form?

No. It attaches to the address input you already have and writes only into the fields you map. Fields it has no value for, such as county, are left as the customer typed them.

Does it work with React, Vue, Webflow or WordPress?

Yes. It is one script tag with no dependencies, and it waits for inputs that render late, so forms built by a framework or a page builder are picked up when they appear.

How do I tell it which field is which?

Three ways. Open your page with the visual mapper from the dashboard and click each field. Or give your inputs common names such as address_line_1, town, postcode and uprn and let it match them. Or set data-field attributes on the script tag.

Is my key safe in the page source?

Yes. It is a public key that only works on the domains you list when you create it, so copying it to another site does nothing.

Ship it today.

Pay as you go: 100 tokens = £1. Typing is free; each address picked is 1 token.