Sample code for address lookup
This page provides sample code to help you set up Postcoder address lookup.
Create a global address finder with JavaScript
These JavaScript examples are designed to help you add Postcoder address lookup to your website, without the need to write your own code from scratch.
Address autocomplete
This example displays real-time suggestions as the user types in their address or postcode, and populates an address form with the selected address. It uses the autocomplete/find endpoint for the suggestions and the autocomplete/retrieve endpoint to retrieve the selected address. All countries are supported.
Address and postcode lookup
This example displays a list of addresses that match the postcode or address entered by the user after they click the Find button, and populates an address form with the selected address. It uses the address endpoint and supports all countries.
Implement address lookup in other languages
These examples show how to make a request to the address endpoint to look up an address.