GeocodeAddressAllCountries

The GeocodeAddressAllCountries service takes an input address from any supported country and returns the latitude and longitude coordinates for the address.

Resource URL

JSON endpoint:

https://OnDemandServer/rest/GeocodeAddressAllCountries/results.json

XML endpoint:

https://OnDemandServer/rest/GeocodeAddressAllCountries/results.xml

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example with JSON Response

The following example requests a JSON response:

https://spectrum.precisely.com/rest/GeocodeAddressAllCountries/results.json​?Data.AddressLine1=Level+1,+68+Waterloo+Rd&Data.City=Macquarie+Park&Data.StateProvince=NSW&Data.PostalCode=2113&Data.Country=AUS

The JSON returned by this request would be:

{"Output": [{
   "StreetDataType": "1",
   "AddressLine1": "68-72 WATERLOO ROAD",
   "City": "MACQUARIE PARK",
   "Country": "AUS",
   "LastLine": "MACQUARIE PARK NSW 2113",
   "PostalCode": "2113",
   "StateProvince": "NSW",
   "Latitude": "-33.78119417912762",
   "Longitude": "151.12195186999998",
   "HouseNumber": "68-72",
   "StreetName": "WATERLOO",
   "StreetSuffix": "ROAD",
   "Geocoder.MatchCode": "S8HPNTSCZG",
   "IsCloseMatch": "Y",
   "HouseNumberHigh": "68-72",
   "HouseNumberLow": "68-72",
   "HouseNumberParity": "E",
   "UnitNumberHigh": "102",
   "UnitNumberLow": "102",
   "SegmentParity": "L",
   "Country.ISO": "AU",
   "Country.UPU": "AUS",
   "Country.Name": "AUSTRALIA",
   "LocationPrecision": "16",
   "NumberOfCandidateRanges": "16",
   "NumberOfRangeUnits": "1",
   "CoordinateSystem": "epsg:4326",
   "AUS.GNAF_PID": "GANSW716948084",
   "AUS.GNAF_CONFIDENCE": "1",
   "AUS.GNAF_GEOCODE_LEVEL": "7",
   "AUS.GNAF_RELIABILITY": "2",
   "AUS.MESH_BLOCK_ID": "10672502000",
   "Ranges": [],
   "user_fields": []
}]}

Example with XML Response

The following example requests an XML response:

https://spectrum.precisely.com/rest/GeocodeAddressAllCountries/results.xml​?Data.AddressLine1=Level+1,+68+Waterloo+Rd&Data.City=Macquarie+Park&Data.StateProvince=NSW&Data.PostalCode=2113&Data.Country=AUS

The XML returned by this request would be:

<xml.GeocodeAddressAllCountriesResponse xmlns="http://www.pb.com/spectrum/services/GeocodeAddressAllCountries">
   <Output>
      <Row>
         <StreetDataType>1</StreetDataType>
         <AddressLine1>68-72 WATERLOO ROAD</AddressLine1>
         <City>MACQUARIE PARK</City>
         <Country>AUS</Country>
         <LastLine>MACQUARIE PARK NSW 2113</LastLine>
         <PostalCode>2113</PostalCode>
         <StateProvince>NSW</StateProvince>
         <Latitude>-33.78119417912762</Latitude>
         <Longitude>151.12195186999998</Longitude>
         <HouseNumber>68-72</HouseNumber>
         <StreetName>WATERLOO</StreetName>
         <StreetSuffix>ROAD</StreetSuffix>
         <Geocoder.MatchCode>S8HPNTSCZG</Geocoder.MatchCode>
         <IsCloseMatch>Y</IsCloseMatch>
         <HouseNumberHigh>68-72</HouseNumberHigh>
         <HouseNumberLow>68-72</HouseNumberLow>
         <HouseNumberParity>E</HouseNumberParity>
         <UnitNumberHigh>102</UnitNumberHigh>
         <UnitNumberLow>102</UnitNumberLow>
         <SegmentParity>L</SegmentParity>
         <Country.ISO>AU</Country.ISO>
         <Country.UPU>AUS</Country.UPU>
         <Country.Name>AUSTRALIA</Country.Name>
         <LocationPrecision>16</LocationPrecision>
         <NumberOfCandidateRanges>16</NumberOfCandidateRanges>
         <NumberOfRangeUnits>1</NumberOfRangeUnits>
         <CoordinateSystem>epsg:4326</CoordinateSystem>
         <AUS.GNAF_PID>GANSW716948084</AUS.GNAF_PID>
         <AUS.GNAF_CONFIDENCE>1</AUS.GNAF_CONFIDENCE>
         <AUS.GNAF_GEOCODE_LEVEL>7</AUS.GNAF_GEOCODE_LEVEL>
         <AUS.GNAF_RELIABILITY>2</AUS.GNAF_RELIABILITY>
         <AUS.MESH_BLOCK_ID>10672502000</AUS.MESH_BLOCK_ID>
         <Ranges/>
         <user_fields/>
      </Row>
   </Output>
</xml.GeocodeAddressAllCountriesResponse>