Geocoding

Applies to: see pricing tiers.

In many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.

[!Important] By using this feature, you agree to the preview legal terms. See the Preview Supplemental Terms for additional details.

get/geocode

Query parameters

api-versionstring required

Version number of Azure Maps API.

topinteger

Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20.

querystring

A string that contains information about a location, such as an address or landmark name.

addressLinestring

The official street line of an address relative to the area, as specified by the locality, or postalCode, properties. Typical use of this element would be to provide a street address or any official address.

If query is given, should not use this parameter.

countryRegionSetstring[]

Comma separated string of country or region codes(ISO 3166-1 Alpha-2), e.g. FR,ES. This will limit the search to the specified countries. Only the first country code will be used for the Geocoder.

If query is given, should not use this parameter.

bboxnumber[]

A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by latitude and longitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.

Example: lon1,lat1,lon2,lat2

viewstring

A string that represents an ISO 3166-1 Alpha-2 region/country code. This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.

Please refer to Supported Views for details and to see the available Views.

locationnumber[]

A point on the earth specified as a latitude and longitude. When you specify this parameter, the user’s location is taken into account and the results returned may be more relevant to the user. Example: &location=lon,lat

adminDistrictstring

The country subdivision portion of an address, such as WA.

If query is given, should not use this parameter.

adminDistrict2string

The county for the structured address, such as King.

If query is given, should not use this parameter.

adminDistrict3string

The named area for the structured address.

If query is given, should not use this parameter.

localitystring

The locality portion of an address, such as Seattle.

If query is given, should not use this parameter.

postalCodestring

The postal code portion of an address.

If query is given, should not use this parameter.

strictMatch'notstrict' | 'strict'

Restrict the geocoding result to the country or region that is specified in the countryRegionSet field and the state, province or territory specified in the adminDistrict field.

If query is given, should not use this parameter.

Headers

Accept-Languagestring

Language in which search results should be returned.

Please refer to Supported Languages for details.

Parameters

../../../Common/preview/2022-09-01-preview/common.json#/components/parameters/ClientId — unresolved $ref

Response

OK

Changes