Search - Get Geocoding
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 {endpoint}/geocode?api-version=2026-01-01
GET {endpoint}/geocode?api-version=2026-01-01&top={top}&query={query}&addressLine={addressLine}&countryRegion={countryRegion}&bbox={bbox}&view={view}&coordinates={coordinates}&adminDistrict={adminDistrict}&adminDistrict2={adminDistrict2}&adminDistrict3={adminDistrict3}&locality={locality}&postalCode={postalCode}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
|
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
address
|
query |
string |
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 |
|
|
admin
|
query |
string |
The country subdivision portion of an address, such as WA. This parameter should not be used when the |
|
|
admin
|
query |
string |
The county for the structured address, such as King. This parameter should not be used when the |
|
|
admin
|
query |
string |
The named area for the structured address. This parameter should not be used when the |
|
|
bbox
|
query |
number[] |
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) |
|
|
coordinates
|
query |
number[] |
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 |
|
|
country
|
query |
string |
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 |
|
|
locality
|
query |
string |
The locality portion of an address, such as Seattle. This parameter should not be used when the |
|
|
postal
|
query |
string |
The postal code portion of an address. This parameter should not be used when the |
|
|
query
|
query |
string |
A string that contains information about a location, such as an address or landmark name. |
|
|
top
|
query |
integer (int32) minimum: 1maximum: 20 |
Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20. |
|
|
view
|
query |
string |
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. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| Accept-Language |
string |
Language in which search results should be returned. Please refer to Supported Languages for details. |
|
| x-ms-client-id |
string |
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. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. Media Types: "application/geo+json", "application/json" |
|
| Other Status Codes |
An unexpected error response. Media Types: "application/geo+json", "application/json" Headers x-ms-error-code: string |
Security
AadToken
These are the Microsoft Entra OAuth 2.0 Flows. When paired with Azure role-based access control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing authentication concepts. In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition requires the use of the x-ms-client-id header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the Maps management API.\n* \nThe Authorization URL is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations. \n* \nThe Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.\n* For more information on Microsoft identity platform, see Microsoft identity platform overview.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| https://atlas.microsoft.com/.default |
subscription-key
This is a shared key that is provisioned when you Create an Azure Maps account in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.\n\n With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.\n\n For publicly exposed applications, our recommendation is to use the confidential client applications approach to access Azure Maps REST APIs so your key can be securely stored.
Type:
apiKey
In:
header
SAS Token
This is a shared access signature token is created from the List SAS operation on the Azure Maps resource through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.\n\n For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the Map account resource to limit rendering abuse and regularly renew the SAS Token.
Type:
apiKey
In:
header
Examples
Search detail address 15127 NE 24th Street, Redmond, WA
Sample request
GET {endpoint}/geocode?api-version=2026-01-01&addressLine=15127 NE 24th Street&adminDistrict=WA&locality=Redmond
Sample response
Content-Type: application/geo+json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "15127 NE 24th St, Redmond, WA 98052",
"streetName": "NE 24th St",
"streetNumber": "15127",
"locality": "Redmond",
"postalCode": "98052",
"addressLine": "15127 NE 24th St"
},
"type": "Address",
"confidence": "High",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.1386787,
47.6302179
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"bbox": [
-122.14632282407,
47.626495282429325,
-122.13103917593001,
47.63422071757068
]
}
]
}
Search detail address 15127 NE 24th Street, Redmond, WA by addressLine
Sample request
GET {endpoint}/geocode?api-version=2026-01-01&addressLine=15127 NE 24th Street Redmond WA&countryRegion=US
Sample response
Content-Type: application/geo+json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "15127 NE 24th St, Redmond, WA 98052",
"streetName": "NE 24th St",
"streetNumber": "15127",
"locality": "Redmond",
"postalCode": "98052",
"addressLine": "15127 NE 24th St"
},
"type": "Address",
"confidence": "Medium",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.1386787,
47.6302179
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"bbox": [
-122.14632282407,
47.626495282429325,
-122.13103917593001,
47.63422071757068
]
}
]
}
Search detail address 15127 NE 24th Street, Redmond, WA by query
Sample request
GET {endpoint}/geocode?api-version=2026-01-01&query=15127 NE 24th Street Redmond WA
Sample response
Content-Type: application/geo+json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "15127 NE 24th St, Redmond, WA 98052",
"streetName": "NE 24th St",
"streetNumber": "15127",
"locality": "Redmond",
"postalCode": "98052",
"addressLine": "15127 NE 24th St"
},
"type": "Address",
"confidence": "High",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.1386787,
47.6302179
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"bbox": [
-122.14632282407,
47.626495282429325,
-122.13103917593001,
47.63422071757068
]
}
]
}
Search landmark Empire State Building by query
Sample request
GET {endpoint}/geocode?api-version=2026-01-01&query=empire state building
Sample response
Content-Type: application/geo+json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "NY"
}
],
"formattedAddress": "Empire State Building, NY",
"locality": "New York"
},
"type": "PointOfInterest",
"confidence": "High",
"matchCodes": [
"Ambiguous"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-73.98580932617188,
40.748435974121094
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-73.98580932617188,
40.748435974121094
]
},
"bbox": [
-73.98590850830078,
40.74833679199219,
-73.98571014404297,
40.74853515625
]
},
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "NY"
},
{
"shortName": "New York County"
}
],
"formattedAddress": "Empire State Building, NY",
"locality": "Manhattan"
},
"type": "LandmarkBuilding",
"confidence": "High",
"matchCodes": [
"Ambiguous"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-73.98500061035156,
40.74815368652344
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-73.98500061035156,
40.74815368652344
]
},
"bbox": [
-73.98710632324219,
40.747314453125,
-73.98412322998047,
40.74958038330078
]
}
]
}
Definitions
| Name | Description |
|---|---|
| Address |
The address of the result |
|
Address |
The subdivision name in the country or region for an address. |
|
Address |
Country or region with its name and ISO code. |
|
Azure. |
The error object. |
|
Azure. |
A response containing error details. |
|
Azure. |
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors. |
|
Calculation |
The method that was used to compute the geocode point. |
|
Confidence |
The level of confidence that the geocoded location result is a match. Use this value with the match code to determine for more complete information about the match. The confidence of a geocoded location is based on many factors including the relative importance of the geocoded location and the user’s location, if specified. |
|
Feature |
Specifies the |
|
Features |
A feature object. |
|
Features |
Properties of the feature. |
|
Feature |
The type of a feature must be Feature. |
|
Geocode |
A geocode point. |
|
Geocoding |
This object is returned from a successful Geocoding call |
|
Geo |
Specifies the |
|
Geo |
A valid |
| Intersection |
The address of the result. |
|
Match |
An enum representing the match code. |
|
Usage |
An enum representing the usage type. |
Address
The address of the result
| Name | Type | Description |
|---|---|---|
| addressLine |
string |
AddressLine that includes street name and number |
| adminDistricts |
The subdivision name in the country or region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it also contains the second, third, or fourth order subdivision in a country, dependency, or region. |
|
| countryRegion |
Country or region with its name and ISO code. |
|
| formattedAddress |
string |
Formatted address property |
| intersection |
The address of the result. |
|
| locality |
string |
Locality property |
| neighborhood |
string |
Neighborhood property |
| postalCode |
string |
Postal code property |
| streetName |
string |
The name of the street from formattedAddress |
| streetNumber |
string |
The number in the street, if available, from formattedAddress |
AddressAdminDistrictsItem
The subdivision name in the country or region for an address.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name for the corresponding adminDistrict field, For adminDistrict[0], this could be full name of state such as Washington, For adminDistrict[1], this could be the full name of the county |
| shortName |
string |
The short name for the corresponding adminDistrict field, For adminDistrict[0], this could be short name of state such as WA, For adminDistrict[1], this could be the short name of the county |
AddressCountryRegion
Country or region with its name and ISO code.
| Name | Type | Description |
|---|---|---|
| ISO |
string |
ISO of country/region |
| name |
string |
name of country/region |
Azure.Core.Foundations.Error
The error object.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| details |
An array of details about specific errors that led to this reported error. |
|
| innererror |
An object containing more specific information than the current object about the error. |
|
| message |
string |
A human-readable representation of the error. |
| target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Azure.Core.Foundations.InnerError
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| innererror |
Inner error. |
CalculationMethodEnum
The method that was used to compute the geocode point.
| Value | Description |
|---|---|
| Interpolation |
The geocode point was matched to a point on a road using interpolation. |
| InterpolationOffset |
The geocode point was matched to a point on a road using interpolation with an additional offset to shift the point to the side of the street. |
| Parcel |
The geocode point was matched to the center of a parcel. |
| Rooftop |
The geocode point was matched to the rooftop of a building. |
ConfidenceEnum
The level of confidence that the geocoded location result is a match. Use this value with the match code to determine for more complete information about the match.
The confidence of a geocoded location is based on many factors including the relative importance of the geocoded location and the user’s location, if specified.
| Value | Description |
|---|---|
| High |
If the confidence is set to If a request includes a location or a view, then the ranking may change appropriately. For example, a location query for "Paris" returns "Paris, France" and "Paris, TX" both with |
| Medium |
In some situations, the returned match may not be at the same level as the information provided in the request. For example, a request may specify address information and the geocode service may only be able to match a postal code. In this case, if the geocode service has a confidence that the postal code matches the data, the confidence is set to If the location information in the query is ambiguous, and there is no additional information to rank the locations (such as user location or the relative importance of the location), the confidence is set to If the location information in the query does not provide enough information to geocode a specific location, a less precise location value may be returned and the confidence is set to |
| Low |
Low |
FeatureCollectionEnum
Specifies the GeoJSON type. The only supported object type is FeatureCollection. For more information, see RFC 7946.
| Value | Description |
|---|---|
| FeatureCollection |
Specifies the |
FeaturesItem
A feature object.
| Name | Type | Description |
|---|---|---|
| bbox |
number[] (double) |
Bounding box. Projection used - EPSG:3857. Please refer to RFC 7946 for details. |
| geometry |
A valid |
|
| id |
string |
ID for feature returned |
| properties |
Properties of the feature. |
|
| type |
The type of a feature must be Feature. |
FeaturesItemProperties
Properties of the feature.
| Name | Type | Description |
|---|---|---|
| address |
The address of the result |
|
| confidence |
The level of confidence that the geocoded location result is a match. Use this value with the match code to determine for more complete information about the match. The confidence of a geocoded location is based on many factors including the relative importance of the geocoded location and the user’s location, if specified. |
|
| geocodePoints |
A collection of geocode points that differ in how they were calculated and their suggested use. |
|
| matchCodes |
One or more match code values that represent the geocoding level for each location in the response. For example, a geocoded location with match codes of Similarly, a geocoded location with match codes of The possible values are:
|
|
| type |
string |
One of: * Address * RoadBlock * RoadIntersection * Neighborhood * PopulatedPlace * Postcode1 * AdminDivision1 * AdminDivision2 * CountryRegion |
FeatureTypeEnum
The type of a feature must be Feature.
| Value | Description |
|---|---|
| Feature |
Specifies the |
GeocodePointsItem
A geocode point.
| Name | Type | Description |
|---|---|---|
| calculationMethod |
The method that was used to compute the geocode point. |
|
| geometry |
A valid |
|
| usageTypes |
The best use for the geocode point. Each geocode point is defined as a |
GeocodingResponse
This object is returned from a successful Geocoding call
| Name | Type | Description |
|---|---|---|
| features |
An array of features returned from the query. |
|
| nextLink |
string |
The is the link to the next page of the features returned. If it's the last page, no this field. |
| type |
Specifies the |
GeoJsonObjectType
Specifies the GeoJSON type. Must be one of the nine valid GeoJSON object
types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon,
GeometryCollection, Feature and FeatureCollection.
| Value | Description |
|---|---|
| Point |
|
| MultiPoint |
|
| LineString |
|
| MultiLineString |
|
| Polygon |
|
| MultiPolygon |
|
| GeometryCollection |
|
| Feature |
|
| FeatureCollection |
|
GeoJsonPoint
A valid GeoJSON Point geometry type. Please refer to RFC
7946 for details.
| Name | Type | Description |
|---|---|---|
| bbox |
number[] (double) |
Bounding box. Projection used - EPSG:3857. Please refer to RFC 7946 for details. |
| coordinates |
number[] (double) |
A |
| type |
string:
Point |
Specifies the |
Intersection
The address of the result.
| Name | Type | Description |
|---|---|---|
| baseStreet |
string |
Primary street for the location. |
| displayName |
string |
Complete name of the intersection. |
| intersectionType |
string |
Type of intersection. |
| secondaryStreet1 |
string |
The first intersecting street. |
| secondaryStreet2 |
string |
If any, the second intersecting street. |
MatchCodesEnum
An enum representing the match code.
| Value | Description |
|---|---|
| Good |
Good |
| Ambiguous |
Ambiguous |
| UpHierarchy |
UpHierarchy |
UsageTypeEnum
An enum representing the usage type.
| Value | Description |
|---|---|
| Display |
Display |
| Route |
Route |