v10

latestSwagger 2.02026-07-13648173.5 KB

Use to get longitude and latitude coordinates of a street address or name of a place.

The Get Geocoding API is an HTTP GET request that returns the longitude and latitude coordinates of the location being searched.

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 and states. The response also returns detailed address properties such as street, postal code, municipality, and country/region information.

get/geocode

Query parameters

api-versionstring required

The API version to use for this operation.

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.

This parameter should not be used when the query parameter is included in the request.

countryRegionstring

Signal for the geocoding result to an ISO 3166-1 Alpha-2 region/country code that is specified e.g. FR.

This parameter should not be used when the query parameter is included in the request.

bboxnumber[]

A rectangular area on the earth defined as a bounding box object. The sides of the rectangle are defined by longitude and latitude 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.

Minimum size: approximately 0.00001 degrees (~0.01 meters).

Maximum size: up to the full global extent (-180,-90 to 180,90)

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.

coordinatesnumber[]

A point on the earth specified as a longitude and latitude. 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: &coordinates=lon,lat

adminDistrictstring

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

This parameter should not be used when the query parameter is included in the request.

adminDistrict2string

The county for the structured address, such as King.

This parameter should not be used when the query parameter is included in the request.

adminDistrict3string

The named area for the structured address.

This parameter should not be used when the query parameter is included in the request.

localitystring

The locality portion of an address, such as Seattle.

This parameter should not be used when the query parameter is included in the request.

postalCodestring

The postal code portion of an address.

This parameter should not be used when the query parameter is included in the request.

Headers

Accept-Languagestring

Language in which search results should be returned.

Please refer to Supported Languages for details.

x-ms-client-idstring

Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. For more information on using Microsoft Entra ID security in Azure Maps, see Manage authentication in Azure Maps.

Response

The request has succeeded.

type'FeatureCollection'

The GeoJSON object type used at the root of successful responses from the forward geocoding, reverse geocoding, and autocomplete operations (including their batch variants). The only value is FeatureCollection, as defined in RFC 7946. Get Polygon is the one exception: its response root is a GeoJSON Feature, see FeatureTypeEnum.

nextLinkstring

Contains the URL to fetch the next page of results if the response is paginated. This is useful when the response is too large to be returned in a single call, allowing users to navigate through multiple pages of results.

All 6 operations