G-NAF Addresses

Find addresses close to one that is misspelled

For when /v1/addresses/resolve found nothing. An address typed by a person is wrong often enough that "no match" is not a useful final answer: 1 gorge rd sydenhum is one address, and saying which is the point.

The suburb is corrected first, then street lines within it are scored by similarity. Include the suburb if you have it — it is what keeps this fast, and it is what makes the correction good.

This is the expensive endpoint. Every other address call is a prefix seek; this is a similarity scan, and it costs three units accordingly. Call it once on an address that failed to resolve, never on a keystroke — use /v1/addresses for that.

get/v1/addresses/similar

Request

  • Base URL: https://api.locio.com.au
  • URL: https://api.locio.com.au/v1/addresses/similar
  • 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

Addresses close to the term, best first. Empty when nothing was close enough.

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.