Address Autocomplete
/api/v2/address_autocomplete
operationId: address_autocomplete
Live: https://gdapi.globaldata.net.au/api/v2/address_autocomplete · Sandbox: https://sandbox-gdapi.globaldata.net.au/api/v2/address_autocomplete
Address Auto-Complete is a powerful API query that can save users time and reduce errors by predicting and suggesting Australian addresses as they are being typed. This feature can be integrated into any web or mobile application to streamline data entry and improve overall data accuracy.
The address autocomplete method is used for performing address autocomplete on user entry forms using AJAX or similar. This method will return matching addresses when sent the starting characters of an address.
Match Types
The following match types are supported:
address- Match only full addresses. This search returns an address with a GNAF idstreet- Match only street names. This search returns a list of matching streets with suburb, postcode and statesuburb- Match only suburb names. This search returns a list of matching suburbs with postcode and statepostcode- Match only postcodes. This search returns a list of suburbs within the existing postcode, and the state and postcode
Sandbox environment
When simulating queries in the sandbox environment, a restricted dataset is used and a number of responses are possible. The response will be determined by the partial_address:
| Type | Partial Address | Response |
|---|---|---|
| address | Any even street number | A valid search will be performed |
| address | Any odd street number | No matches will be found |
| postcode | Any even postcode | A valid search will be performed and returned |
| postcode | Any odd postcode | No matches will be found |
| suburb | Any suburb beginning with A - H | A valid search will be performed and returned |
| suburb | Any suburb beginning with I - Z | No matches will be found |
| street | Any street beginning with A - H | A valid search will be performed and returned |
| street | Any street beginning with I - Z | No matches will be found |
In the production environment, the full Australian address database will be used to generate matches.
Request body
Content type application/json.
The details of the record to enhance
| Field | Description |
|---|---|
partial_address |
string [4..100 characters] The first 4 or more characters of the address/street/suburb/postcode to find |
type |
string or null The type of address match to find
|
max_results |
integer [1..100] or null The maximum number of results to return |
Responses
Successful response
application/json
| Field | Description |
|---|---|
message |
string A message indicating the result of the request. This will be |
api_reference |
string (uuid) A unique identifier for this request. This can be used to track the request in the logs. |
matches |
array of objects Array of matched addresses |
matches[]. |
string The type of match returned |
matches[]. |
string The GNAF address id of the address |
matches[]. |
string Complete match as a single line ready to pass to a SELECT element |
matches[]. |
string The combined street address as one string. eg 2/10 Paper St. This attribute is only returned for types address and street requests |
matches[]. |
string The matched suburb |
matches[]. |
string The matched postcode |
matches[]. |
string The matched state |
more_results |
boolean Indicates if there are more than max_results available. |