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

ParameterDefaultDescriptionTest Value
key

Your unique Addressfinder license key.

Required string

secret

Your unique secret key. You can also pass your secret key into the Authorization header of the request. Only required for server-to-server calls.

Optional string

q

The query string to be matched with the location.

Required string

formatjson

The format of the response.

Required string

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.

Optional string

state_codes

A comma-separated list of states or territories to filter results. Options: ACT, NSW, NT, QLD, SA, TAS, VIC, WA, OT.

Optional 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.

Optional string

max10

Maximum number of results to return (1–100).

Optional integer

highlight

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

Optional integer

Responses

200 A list of location autocomplete completions

NameTypeDescriptionExample
completionsarray-
    idstringThe unique location identifier.59a68aa3-0b46-4cbf-8817-e28e5dea3cad
    full_locationstringFull location as supplied by data sources.Martin Street, OUYEN VIC 3490
    state_territorystringAustralian state or territory.VIC
    location_typestringType of location.street
successbooleanTrue if the service ran successfully.true

400 Bad request

NameTypeDescriptionExample
completionsarrayAn empty array will be returned due to the error-
error_codestringA unique numerical value identifying the error that occured1004
messagestringAn informative message describing the error that occuredSecret not provided
successbooleanIndicates that the result was a failurefalse

See API Error Reference for details.