Location Autocomplete API
This API lets you search for streets, suburbs, and/or states — referred to as "locations". This API works in tandem with the Location Metadata API to collect metadata associated with the selected location.
Endpoint
Australia
https://api.addressfinder.io/api/au/location/autocomplete
Parameters
Parameter | Description | Test Value |
---|---|---|
key | Your unique Addressfinder license key. Type: string required | |
secret | Your unique secret key from Portal Credentials. You can also pass your secret key into the Type: string | |
q | The query string to be matched with the location. Type: string required | |
format | The format of the response. Default value: Type: json string required | |
location_types | A comma-separated list of location types to filter the results. Leave empty to allow any location type. Options are Type: string | |
state_codes | A comma-separated list of states or territories to filter results. Options: ACT, NSW, NT, QLD, SA, TAS, VIC, WA, OT. Type: string | |
domain | Used to identify in the Addressfinder Portal which of your services is calling the API for activity monitoring purposes. The domain needs to be registered in the Portal. Type: string | |
max | Maximum number of results to return (1–100). Default value: Type: 10 integer | |
highlight | Set to Type: integer |
Responses
200 A list of location autocomplete completions
Name | Description | Example |
---|---|---|
completions | Type: array | - |
id | The unique location identifier. Type: string | 59a68aa3-0b46-4cbf-8817-e28e5dea3cad |
full_location | Full location as supplied by data sources. Type: string | Martin Street, OUYEN VIC 3490 |
state_territory | Australian state or territory. Type: string | VIC |
location_type | Type of location. Values are street , locality (suburb), or state .Type: string | street |
success | True if the service ran successfully. Type: boolean | true |
400 Bad request
Name | Description | Example |
---|---|---|
completions | An empty array will be returned due to the error Type: array | - |
error_code | A unique numerical value identifying the error that occured Type: string | 1004 |
message | An informative message describing the error that occured Type: string | Secret not provided |
success | Indicates that the result was a failure Type: boolean | false |
See API Error Reference for details.