Skip to main content

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

ParameterDescriptionTest 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 Authorization header of the request. Only required for server-to-server calls.


Type: string
q

The query string to be matched with the location.


Type: string required
format

The format of the response.


Default value: json
Type: string required
location_types

A comma-separated list of location types to filter the results. Leave empty to allow any location type. Options are street, locality (suburb), and state.


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: 10
Type: integer
highlight

Set to 1 to include a highlighted_a field in results, wrapping matching terms with <span class='af_hl'></span>.


Type: integer

Responses

200 A list of location autocomplete completions

NameDescriptionExample
completions

Type: array
-
    idThe unique location identifier.

Type: string
59a68aa3-0b46-4cbf-8817-e28e5dea3cad
    full_locationFull location as supplied by data sources.

Type: string
Martin Street, OUYEN VIC 3490
    state_territoryAustralian state or territory.

Type: string
VIC
    location_typeType of location. Values are street, locality (suburb), or state.

Type: string
street
successTrue if the service ran successfully.

Type: boolean
true

400 Bad request

NameDescriptionExample
completionsAn empty array will be returned due to the error

Type: array
-
error_codeA unique numerical value identifying the error that occured

Type: string
1004
messageAn informative message describing the error that occured

Type: string
Secret not provided
successIndicates that the result was a failure

Type: boolean
false

See API Error Reference for details.