Skip to main content

Interactive widget code generator

The Addressfinder widget is highly customisable, this interactive tool was created to make basic configuration easy and get you verifying addresses in minutes.

Configure your widget settings below and copy the generated code to your website.

Basic Configuration

You can get a Licence Key from the Addressfinder Portal or use our ADDRESSFINDER_DEMO_KEY to get started.

The ID of your address input field

Australia Address Options

+

Australia Location Search

+

Options for collecting additional metadata

+

Advanced Options

+

Generated Code

  
<script>
(function() {
// Generated code for country AU
var widget
function initAddressFinder() {
widget = new AddressFinder.Widget(
document.getElementById('address'),
'ADDRESSFINDER_DEMO_KEY',
'AU',
{
key: "ADDRESSFINDER_DEMO_KEY",
input: "#address",
address_params: {
source: "gnaf,paf"
},
address_metadata_params: {}
}
);

widget.on('address:select', function(fullAddress, metaData) {
resetFields();
document.getElementById('address_text').value = metaData.full_address;
});
};

function resetFields() {
const fields = ['address_text'];
fields.forEach(id => {
const el = document.getElementById(id);
if (el) el.value = '';
});
}

function downloadAddressfinder() {
var script = document.createElement('script');
script.src = 'https://api.addressfinder.io/assets/v3/widget.js';
script.async = true;
script.onload = initAddressFinder;
document.body.appendChild(script);
};

document.addEventListener('DOMContentLoaded', downloadAddressfinder);
})();
</script>

Implementation Notes:

  • Place this code just before the closing </body> tag of your page.
  • Make sure to include the Addressfinder script only once per page.
  • For multiple address fields on the same page, use different input IDs and configuration objects.