Sample code for address lookup
This page provides sample code to help you set up Postcoder address lookup.
You'll need an API key for these examples. Not got one? Sign up for a free trial.
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.
Address lookup in other languages
These examples show how to make a request to the address endpoint to look up an address.