Search for content

Locations by Text

Allows finding locations (i.e. localities, postal codes, streets or houses) matching an address given as a single string.

Input

When input data is not separated into individual fields for postal code, city or street, all input data of an address can be combined into one single field. This is especially useful for interactive searches.

This endpoint also supports requesting a specific language and setting country filters.

Country filters reduce the search space of geocoding and can improve performance. Country codes should be ISO 3166-1 alpha-2 and separated by a comma. In countries such as US, RU, AU, CA, and IN results can also be filtered by country subdivision specified as ISO 3166-2. In case the requested subdivision is not available, the results are filtered by the country and a warning is attached to the response.

Output

If the request succeeds, the response is a list of records. The list is empty if no matching record is found. Each record contains the actual address and its geographical position, along with a matching score and the location type.

Geographical Positions:

Each returned record has one or two geographical positions:

  • reference position: the rooftop position of the house, the centre of the city or the postal code area.
  • road access position (optional): the position where you would start driving.
"referencePosition": {
    "latitude": 52.02085876464844,
    "longitude": 4.363800048828125
},
"roadAccessPosition": {
    "latitude": 52.020320892333984,
    "longitude": 4.364419937133789
},

 

Address Fields:

An address has the following fields. Depending on data availability and result type (e.g. city, address), some fields may be empty.

"address": {
    "countryName": "Nederland",
    "state": "Zuid-Holland",
    "province": "",
    "postalCode": "2612 XZ",
    "city": "Delft",
    "district": "",
    "subdistrict": "",
    "street": "Aan 't Verlaat",
    "houseNumber": "33F",
    "countryCodeIsoAlpha2": "NL",
    "countryCodeIsoAlpha3": "NLD",
    "countryCode": "NL"
},
"formattedAddress": "Aan 't Verlaat 33F, 2612 XZ Delft

 

The returned address fields will be in the language spoken in that country or region unless otherwise requested by the language parameter.

Location Type:

Each record has a location type, common location types are:

  • locality (e.g. Boston)
  • postal code (e.g. 10557 Berlin)
  • street section (e.g. Avenue des Champs-Élysées, 75008 Paris)
  • address (e.g. 10 Downing St, London SW1A 2AA)
"locationType": "EXACT_ADDRESS"

 

Score:

The total score value ranges from 100 (a perfect match) down to 0 and helps to determine if a geocoding result is precise enough to use in further processing steps. The total score is also used to sort the result list.

The address scores indicate how well each result field is matched by the corresponding input. 
Address scores are only returned if the input parameter results includes the value ADDRESS_SCORES.

"quality": {
    "totalScore": 100,
    "addressScores": {
        "country": 0,
        "state": 0,
        "postalCode": 0,
        "city": 100,
        "street": 100,
        "houseNumber": 100
    }
}

Find a detailed explanation of the scores together with some examples in the Scores concept.

To allow for improvements, the actual score values may be subject to change.

Errors:

The search is limited by an internal timeout. If a request takes very long, it will be aborted. This may typically happen if the server is very busy. When that happens, an error response will be returned:

{
    "description": "The request could not be processed due to an internal error.",
    "errorCode": "GENERAL_INTERNAL_SERVER_ERROR",
    "traceId": "e0f3b45a721e4f2d8b3f0ca5ebfb2166",
    "errorId": "fdf1e24b-e180-4205-8a22-21e5d5336187"
}