[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Geocoding Services ]

Use unstructured geocode to obtain the coordinates that belong to a specified address which is not constructed as a formal address object. Returns a set of location data based on an unstructured address string.

The granularity of the response varies depending on the content of the string submitted. For example, inclusion of the word "corner" or its abbreviation "cnr" triggers the return of an address with intersection granularity.

If the service receives words that it is unable to parse, it returns them in a string as a "keywords" parameter in the response.

Compare Structured geocode. For an explanation of the returned object, see <geocode>.

URL

HTTP Post to <ENDPOINT>/service/geocode/unstructured

Request format

{
	"query": <string>,
	"location":<latlon>,
	"bounds":<bounds>,
    "granularity":[<granularity>]
    "pagination": {
		"size": <int>,
	    "start": <int>	
	}
}

Rules

Parameter

Mandatory?

Description

query

Y

Submit address as a <string>, not as an address object

bounds

N

In an unstructured search, bounds are not used as an absolute limit. They are taken as the first hint. That is, if a match for the address string can be found within the current bounds, it will be favoured.

location

N

A <point> object, used as the second hint. If a match cannot be found within the current bounds or close to the current location, the search extends Australia-wide

granularityN

An array of granularities. Including this property will filter results to only include listed granularities in the result. Supported granularities include:

"PROPERTY"

"STREET"

"INTERSECTION"

"SUBURB"

"SUBURBVANITY"

"POSTCODE"

"REGION"

"STATE"

"LOCALITY", a short form combination of SUBURB, POSTCODE, REGION and STATE

Default = all

pagination

expanded

Labelled attribute containing a size and start.

size

N

maximum number of results to return. Min = 1, Max = 200

Default = 20

start

N

First result to return. If "size" is 20 and your request returns a "total" of 30, submit a second request with "start" = 21 to retrieve the remaining results.

Sample request

{
	"query":
	"corner bourke street and william street, melbourne"
}

Sample response

{
  "keywords": "",
  "results": [
    {
      "id": "intersection-310047219",
      "centrePoint": {
        "lon": 144.958247,
        "lat": -37.815608
      },
      "streetPoint": {
        "lon": 144.958247,
        "lat": -37.815608
      },
      "approximated": false,
      "granularity": "INTERSECTION",
      "address": {
        "intersection": [
          {
            "name": "BOURKE",
            "type": "ST",
            "display": "BOURKE ST"
          },
          {
            "name": "WILLIAM",
            "type": "ST",
            "display": "WILLIAM ST"
          }
        ],
        "suburb": "MELBOURNE",
        "postcode": "3000",
        "regions": [
          "GREATER MELBOURNE",
          "MELBOURNE - INNER CITY SUBURBS",
          "MELBOURNE CBD",
          "MELBOURNE LGA"
        ],
        "state": "VIC",
        "display": "INTERSECTION OF BOURKE ST AND WILLIAM ST, MELBOURNE, VIC 3000"
      },
      "geometry": {
        "centre": {
          "lon": 144.958247,
          "lat": -37.815608
        },
        "street": {
          "lon": 144.958247,
          "lat": -37.815608
        }
      }
    }
  ],
  "pagination": {
    "start": 0,
    "total": 1
  }
}
NOTES
Icon

Because an unstructured address search uses bounds and location as 'hints' only, it can sometimes return results that are outside the specified bounds.

Icon

Too much extra information will cause bad results. Avoid the inclusion of sub-address elements and property names in unstructured geocode requests.

Icon

This request and response use the following objects: