Get Geocoding can not deal with typos in query string

Martin Müller 5 Reputation points
2025-07-14T09:09:49.81+00:00

I'm using the Azure Maps Get Geocoding endpoint with version 2025-01-01.

According to the documentation, "the geocoder is very tolerant of typos and incomplete addresses".

However, this does not seem to be the case at all.

For example the query string "Almend 5, 4460 Gelterkinden, Switzerland" returns the following address as a result:

Hohenrainstrasse 5, 4133 Pratteln

With confidence high and matchCode good. However, this is a completely different municipality.
Note that the query string has a simple typo: It should be "Allmend" instead of "Almend".

Querying with the corrected address "Allmend 5, 4460 Gelterkinden, Switzerland" gives the correct result:

Allmend 5, 4460 Gelterkinden

Im experimenting using the following URL:

https://atlas.microsoft.com/geocode?api-version=2025-01-01&query=Almend 5, 4460 Gelterkinden&subscription-key=xxx

Am I doing something wrong when geocoding an address with typos?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 3,716 Reputation points Microsoft Employee Moderator
    2025-07-17T22:02:30.9933333+00:00

    Hi Martin,

    there is a big difference between using a Query API that takes a string of characters and a structured address API that takes components of the address separately. The Query API will take one character at a time and try to match against multiple parts of an address. For higher accuracy you can remove ambiguity if you know the address components and separate them in the call.

    https://learn.microsoft.com/en-us/rest/api/maps/search/get-geocoding?view=rest-maps-2025-01-01&viewFallbackFrom=rest-maps-2024-04-01&tabs=HTTP

    See the sample GET https://atlas.microsoft.com/geocode?api-version=2025-01-01&addressLine=15127 NE 24th Street&adminDistrict=WA&locality=Redmond

    This points the geocoder to which part is the street address, City and Sate separately so the house number will not be matched to a postal code for example. Your breakouts could be:

    addressLine=
    locality=
    postalCode=4460
    countryRegion=
    

    If you know the address breakdown, it is always best to use it as it will provide results with better context.

    Sincerely,

    IoTGirl


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.