Guides29 June 2025
Writing your own autocomplete service
To write your own autocomplete services you will need to follow these steps and leverage Addressfinder API

Custom autocomplete service
You can write your own autocomplete service leveraging the Addressfinder API if you would like to. However you do not need to, we have created highly customisable JavaScript widget which do most of the work allowing you to make minor configuration changes to suit your needs.
We suggest developers use the widget code generator to get started. It configures the code snippet based on selected options and will save you a huge amount of time.
To write your own autocomplete service follow these guidelines
Make a GET request
Addressfinder is expecting that an HTTP GET request is made. Although an HTTP POST request is supported, it will add extra complexity for your developers. The user experience will be degraded with a POST request as a CORS pre-flight request will be required.
Use a simple request
Requests to the Addressfinder API from a browser are classified as “Cross Origin” as they are made to a different domain than the main web page. These requests are subject to the CORS mechanisms which are built into all modern browsers.
Simple requests are HTTP GET requests that meet certain criteria such as allowing headers and content types. Read more about simple requests requirements
Make a secure requests (HTTPS)
You should always make requests to our secure endpoint using HTTPS. Support of unencrypted HTTP requests is only retained for backwards compatibility purposes, and will eventually be disabled.
In addition, use of HTTPS endpoint will allow the browser to make HTTP version 2 requests. These are substantially faster, and will give a better user experience.
Request origin
For authentication, the requests must be sent from a domain which has been approved on your Addressfinder account. The Referer header, which is automatically included by the browser, is used for this purpose.
Secret parameter
You should not include the API secret token in any of your API calls. The secret is intended for server-to-server API calls only. By including the secret in a browser-based API call, this value would be visible to 3rd parties. This could result in your account being abused by malicious parties.
The Addressfinder APIs perform a safety check to ensure that the secret value has not been included. It will return a 1008 error if the secret has been included.
Domain parameter
The domain parameter is not intended for use in the web browser. If you include it, the API will return an error result.
Address Autocomplete and Metadata APIs
The Address Autocomplete API must be used in conjunction with the Address Metadata API.
We expect that several calls to the Autocomplete API would be made as the user types in a portion of their address. The results of the Autocomplete API should be displayed to the user, normally in a popup style panel.
When the user identifies the desired address, they would select that address. At that point, you should make a call to the Address Metadata API. This would return all of the individual metadata for that address.
General Request Parameters
Include other request parameters in your request string as necessary. These will determine the types of addresses and data returned in the response. Request parameters here.
Start verifying data in minutes
30 day free trial. No credit card required. Cancel anytime.