v10

latestSwagger 2.02026-07-13648173.5 KB

Use to get ranked list of suggested entities based on a user's location and a partial query.

Given a request with a user's location and a partial query that serves as the prefix of a full query string (referred to as a query prefix), the Azure Maps Autocomplete API returns a list of suggested entities that the user is most likely searching for. These entities are ranked from most to least likely.

get/geocode:autocomplete

Query parameters

api-versionstring required

The API version to use for this operation.

querystring required

Required. The user's query prefix.

Example: "1 Micro" or "Muir Woods".

coordinatesnumber[]

Required when bbox is not provided. 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

Note: coordinates becomes a secondary signal if bbox is provided.

bboxnumber[]

Required when coordinates is not provided. 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)

topinteger

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

resultTypeGroupsstring[]

A comma separated list of returned entity type groups. The possible values are

  • Address
  • Place
resultTypesstring[]

A comma separated list of returned entity types. When type group is set to Address, the supported types are:

  • Address
  • RoadBlock

All other types belong to the Place type group. These may include entities such as AdminDivision1, Neighborhood, PopulatedPlace, and more. Default value is all possible entity types.

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.

countryRegionstring

Signal for the autocomplete result to an ISO 3166-1 Alpha-2 region/country code that is specified e.g. FR. Only results in the specified country/region will be returned.

Headers

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.

Accept-Languagestring

Language in which search results should be returned.

Please refer to Supported Languages for details.

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.