Geocoder API Developer's Guide

Information on How a Request Was Parsed

A user wants to debug a failed request and needs to know how the Geocoder API is parsing the specified address 2 Kingdom Street, Paddington, London, W2 5BD.

Request

The following GET request uses the parameter responseattributes=parsedRequest (or short: responseattributes=pr) to specify the point around which addresses are provided and the parameter mode to define the action taken.

https://geocoder.ls.hereapi.com/6.2/geocode.json
?apiKey={YOUR_API_KEY}
&responseattributes=parsedRequest
&searchtext=2%20Kingdom%20Street%20Paddington%20London%20W2%205BD
Note: This example uses a HERE API Key to authenticate your request. For information on other possible options, see Authentication Guide. For examples of how to use the other authentication options with the Geocoder API, see Authentication Examples.

Response

The response to the request contains the following information blocks:
  • metadata about the information used in determining the route
  • detailed information on how Geocoder API interprets the searchtext value
{
  "Response": {
    "MetaInfo": {
      "Timestamp": "2016-11-09T15:11:59.912+0000"
    },
    "View": [
      {
        "_type": "SearchResultsViewType",
        "ViewId": 0,
        "Result": [
          {
            "Relevance": 1,
            "MatchLevel": "houseNumber",
            "MatchQuality": {
              "City": 1,
              "District": 1,
              "Street": [
                1
              ],
              "HouseNumber": 1,
              "PostalCode": 0.97
            },
            "MatchType": "interpolated",
            "Location": {
              "LocationId": "NT_mC6S4gxIlpYMUs-ivIr3YC_yA",
              "LocationType": "point",
              "DisplayPosition": {
                "Latitude": 51.5193849,
                "Longitude": -0.1816464
              },
              "NavigationPosition": [
                {
                  "Latitude": 51.51925,
                  "Longitude": -0.1816464
                }
              ],
              "MapView": {
                "TopLeft": {
                  "Latitude": 51.5205091,
                  "Longitude": -0.183453
                },
                "BottomRight": {
                  "Latitude": 51.5182607,
                  "Longitude": -0.1798398
                }
              },
              "Address": {
                "Label": "2 Kingdom Street, London, W2 6BL, United Kingdom",
                "Country": "GBR",
                "State": "England",
                "County": "London",
                "City": "London",
                "District": "Paddington",
                "Street": "Kingdom Street",
                "HouseNumber": "2",
                "PostalCode": "W2 6BL",
                "AdditionalData": [
                  {
                    "value": "United Kingdom",
                    "key": "CountryName"
                  },
                  {
                    "value": "England",
                    "key": "StateName"
                  },
                  {
                    "value": "London",
                    "key": "CountyName"
                  }
                ]
              }
            },
            "ParsedRequest": {
              "Label": "2 Kingdom Street, London, W2 5BD",
              "City": "London",
              "District": "Paddington",
              "Street": [
                "Kingdom Street"
              ],
              "HouseNumber": "2",
              "PostalCode": "W2 5BD",
              "AddressLine": [
                "2 Kingdom Street",
                "London",
                "W2 5BD"
              ]
            }
          }
        ]
      }
    ]
  }
}