- Create an account, if you don’t already have one
- Create an API key for use with Address Capture
- Make one or more requests to the Capture Find endpoint with your search text
- Using the output of the Capture Find request, make a request to the Capture Retrieve endpoint
- Interpret the response from your Capture Retrieve request
Creating an account and API key
Before you can start making any requests, you’ll need to have a valid Loqate account and an API key to use with Address Capture. If you don’t have these set up already, you can:- Create an account at account.loqate.com
- Create an API key by selecting the Add a service option within your account. See our Creating API Keys page for full details – we recommend creating a generic API key for use with Address Capture
Making a simple Address Capture request
With a valid account and API key, you can now start making Address Capture requests. Address Capture consists of two main API requests:- A Find request is used to narrow down a possible list of addresses
- A Retrieve request is used to retrieve a fully formatted address
In practice, as Address Capture is a type-ahead service a Find request will often be made with only a small portion of an address. See the
Type-ahead requests section below for more information about how this works.
Address Capture endpoints
The endpoints to use are:- Find: https://api.addressy.com/Capture/Interactive/Find/v1.10/json6.ws
- Retrieve: https://api.addressy.com/Capture/Interactive/Retrieve/v1.20/json6.ws
We don’t support API connections using HTTP – make sure you are using HTTPS for all requests.
Considerations
Before you make your first Address Capture requests, here are a couple of considerations to be aware of:- All ids returned in Find or Retrieve requests are only temporary, as they change over time as the data changes
- A Retrieve may bring back multiple records for an address, for example when that address is available in multiple languages (you’ll see this in the examples below)
Example requests and responses
Below we have provided some simple examples of Capture Find and Retrieve requests. You can copy and paste these example requests into a tool such as Postman – just remember to replace the sample API key with your own valid API key.Single-address request
This example request is based on searching for ‘Loqate’ to find the address of the Loqate HQ in Chester, UK. This search will return a single address.Id
from the Find response (i.e. “GB|RM|A|4624695|A1|ENG”) and use that in a Retrieve request:
This address is available in both English (ENG) and Welsh (CYM), so the Retrieve includes both versions of the address.
Container request example
This example request is based on searching for the address of the Loqate HQ in Chester, UK, using part of the address.You don’t always have to search for complete words, so in this example we’re using “ch” to represent the first two characters of the word “Chester”.
Text
parameter and replace it with Container
.
This address is available in both English (ENG) and Welsh (CYM), so the Retrieve includes both versions of the address.
Type-ahead requests
Up to now, the examples we’ve provided all assume that you’re searching for a full address in one go. Address Capture is a type-ahead service though, designed to help find a customer’s address in just a few key presses. As such, in practice it will be making multiple Find calls as customers enter additional characters of their address. For example, as a customer types “High Street” into a search field, Address Capture will be making Find calls with gradually increasing levels of detail:&Text=H
&Text=Hi
&Text=Hig
&Text=High
&Text=High S
&Text=High St
- and so on