G-NAF Addresses

Suggest addresses as someone types

G-NAF only. Unlike /v1/typeahead, which also returns suburbs and places, every result here is a resolved address, so nothing has to be filtered out.

Matching is a prefix of the street line, so type it as it is written: number first, then the street. A unit in front is understood and resolves to the unit's own record, not the building's: 3/90 Bay Road returns the pid of unit 3, and 90 Bay Road returns the pid of the parcel. unit 3, u3, apt 3 and 3 90 are read the same way. A trailing postcode narrows.

Each result carries its id. Store that, not the text: the text is however your user typed it that day, the id is the address. An Australian result carries the same value under address_detail_pid, which is G-NAF's own column name.

get/v1/addresses

Request

  • Base URL: https://api.locio.com.au
  • URL: https://api.locio.com.au/v1/addresses
  • Auth: HTTP bearer

Query parameters

qstring required
limitinteger
countrystring

Which country's addresses to search, as a two letter ISO 3166-1 code. Defaults to AU.

Only a secret key may send it. A public key is scoped to the country the request came from, which Cloudflare resolves from the browser's address, and this parameter is ignored on one: a key that sits in a page cannot choose what it may see.

A country no address data is loaded for answers 200 with an empty data, a country_code and a note saying so. That is not an error: it is the right answer for somebody typing from a country you do not hold.

Response

Matching addresses, best first.

country_codestring

The country these results were searched in. AU today. Distinct from an address's own country, which is the country's name.

notestring

Why the answer is empty when empty is correct: no address data is loaded for this country, or the country could not be determined. Absent on an ordinary answer.

Example response

{
  "data": [
    {
      "id": "GATAS717990791",
      "address_detail_pid": "GAVIC411711441",
      "gnaf_pid": "GAVIC411711441",
      "formatted": "Shop 3, 145 Sydney Road, Coburg VIC 3058",
      "components": {
        "building_name": "Piermont Resort",
        "flat_type": "Shop",
        "flat_number": "3",
        "level_type": "Level",
        "level_number": "3",
        "number_first": "145",
        "number_first_suffix": "A",
        "number_last": "437",
        "street_name": "Sydney",
        "street_type": "Road",
        "street_suffix": "West",
        "locality_name": "Coburg",
        "state": "VIC",
        "postcode": "3058",
        "lot_number": "3"
      },
      "lat": -37.7409,
      "lng": 144.9654,
      "mesh_block": "60049060000",
      "gnaf": {
        "date_created": "2004-04-29",
        "legal_parcel_id": "3\\RP4791",
        "alias_principal": "PRINCIPAL",
        "primary_secondary": "SECONDARY",
        "primary_pid": "GAVIC422078857",
        "geocode_type": "FRONTAGE CENTRE SETBACK"
      },
      "country_code": "AU"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.