Search - Get Search Address Reverse

Use to get a street address and location info from latitude and longitude coordinates.
The Get Search Address Reverse API is and HTTP GET request that returns a street address or location when given latitude and longitude coordinates.

There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located. This endpoint will return address information for a given coordinate.

GET https://atlas.microsoft.com/search/address/reverse/{format}?api-version=1.0&query={query}
GET https://atlas.microsoft.com/search/address/reverse/{format}?api-version=1.0&query={query}&language={language}&returnSpeedLimit={returnSpeedLimit}&heading={heading}&radius={radius}&number={number}&returnRoadUse={returnRoadUse}&roadUse={roadUse}&allowFreeformNewline={allowFreeformNewline}&returnMatchType={returnMatchType}&entityType={entityType}&view={view}

URI Parameters

Name In Required Type Description
format
path True

ResponseFormat

Desired format of the response. Value can be either json or xml.

api-version
query True

string

Version number of Azure Maps API.

query
query True

number[]

The applicable query specified as a comma separated string composed by latitude followed by longitude e.g. "47.641268,-122.125679".

allowFreeformNewline
query

boolean

Format of newlines in the formatted address.

If true, the address will contain newlines. If false, newlines will be converted to commas.

entityType
query

GeographicEntityType

Specifies the level of filtering performed on geographies. Narrows the search for specified geography entity types, e.g. return only municipality. The resulting response will contain the geography ID as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that geography via Get Search Polygon API. The following parameters are ignored when entityType is set:

  • heading
  • number
  • returnRoadUse
  • returnSpeedLimit
  • roadUse
  • returnMatchType
heading
query

integer

The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place

language
query

string

Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used.

Please refer to Supported Languages for details.

number
query

string

Street number as a string. If a number is sent in along with the request, the response may include the side of the street (Left/Right) and also an offset position for that number

radius
query

integer

The radius in meters to for the results to be constrained to the defined area

returnMatchType
query

boolean

Include information on the type of match the geocoder achieved in the response.

returnRoadUse
query

boolean

Boolean. To enable return of the road use array for reverse geocodes at street level

returnSpeedLimit
query

boolean

Boolean. To enable return of the posted speed limit

roadUse
query

RoadUseType[]

To restrict reverse geocodes to a certain type of road use. The road use array for reverse geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet

view
query

LocalizedMapView

The View parameter (also called the "user region" parameter) allows you to show the correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions have different views of such regions, and the View parameter allows your application to comply with the view required by the country/region your application will be serving. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.

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

Request Header

Name Required Type Description
x-ms-client-id

string

Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Microsoft Entra ID security in Azure Maps see the following articles for guidance.

Responses

Name Type Description
200 OK

ReverseSearchAddressResult

OK

Other Status Codes

ErrorResponse

An unexpected error occurred.

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.

To 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.

Note

  • 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.
  • The Authorization URL is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations.
  • The Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
  • Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.
  • 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 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.

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.

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: query

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.

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.

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

Searches addresses for coordinates 37.337,-121.89

Sample request

GET https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&query=37.337,-121.89

Sample response

{
  "summary": {
    "queryTime": 5,
    "numResults": 1
  },
  "addresses": [
    {
      "address": {
        "streetNumber": "31",
        "routeNumbers": [],
        "streetName": "N 2nd St",
        "streetNameAndNumber": "31 N 2nd St",
        "countryCode": "US",
        "countrySubdivisionCode": "CA",
        "countrySubdivisionName": "California",
        "municipality": "San Jose",
        "postalCode": "95113",
        "country": "United States of America",
        "countryCodeISO3": "USA",
        "freeformAddress": "31 N 2nd St, San Jose CA 95113",
        "extendedPostalCode": "951131217"
      },
      "position": "37.337090,-121.889820"
    }
  ]
}

Definitions

Name Description
Address

The address of the result

BoundingBoxCompassNotation

The bounding box of the location.

Entity

Entity type source of the bounding box. For reverse-geocoding this is always equal to position.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

GeographicEntityType

Geography entity type. Present only when entityType was requested and is available.

LatLongPairAbbreviated

A location represented as a latitude and longitude using short names 'lat' & 'lon'.

LocalizedMapView

The View parameter (also called the "user region" parameter) allows you to show the correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions have different views of such regions, and the View parameter allows your application to comply with the view required by the country/region your application will be serving. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.

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

MatchType

Types of match for a reverse address search operation.

QueryType

The type of query being returned: NEARBY or NON_NEAR.

ResponseFormat

Desired format of the response. Value can be either json or xml.

ReverseSearchAddressResult

This object is returned from a successful Search Address Reverse call

ReverseSearchAddressResultItem

Result object for a Search Address Reverse response

RoadUseType

Describes the possible uses of a road.

SearchSummary

Summary object for a Search API response.

Address

The address of the result

Name Type Description
boundingBox

BoundingBoxCompassNotation

The bounding box of the location.

buildingNumber

string

The building number on the street. DEPRECATED, use streetNumber instead.

country

string

country/region name

countryCode

string

Country (Note: This is a two-letter code, not a country/region name.)

countryCodeISO3

string

ISO alpha-3 country code

countrySecondarySubdivision

string

County

countrySubdivision

string

State or Province

countrySubdivisionCode

string

countrySubdivisionCode prefixed by countryCode ( countryCode-countrySubdivisionCode ) and the hyphen forms the ISO 3166-2 code. Examples: TX for Texas, SCT for Scotland and ON for Ontario.

countrySubdivisionName

string

The full name of a first level of country/region administrative hierarchy. This field appears only in case countrySubdivision is presented in an abbreviated form. Only supported for USA, Canada, and United Kingdom.

countryTertiarySubdivision

string

Named Area

crossStreet

string

The name of the street being crossed.

extendedPostalCode

string

Extended postal code (availability is dependent on the region).

freeformAddress

string

An address line formatted according to the formatting rules of a Result's country/region of origin, or in the case of a country/region, its full country/region name.

localName

string

An address component that represents the name of a geographic area or locality that groups multiple addressable objects for addressing purposes, without being an administrative unit. This field is used to build the freeformAddress property. localName represents the postal municipality. Depending on the location, localName is the commonly known name of a city or town. For the commonly known name of a city or town, use localName instead of municipality.

municipality

string

City / Town
Note: municipality represents the residential municipality. Depending on the location, the municipality value may differ from the commonly known name of a city or town. For the commonly known name of the city or town, it’s suggested that the localName value be used instead of the municipality value.

municipalitySubdivision

string

Sub / Super City

neighbourhood

string

A Neighbourhood is a geographically localized area within a city or town with distinctive characteristics and social interactions between inhabitants.

postalCode

string

Postal Code / Zip Code

routeNumbers

string[]

The codes used to unambiguously identify the street

street

string

The street name. DEPRECATED, use streetName instead.

streetName

string

The street name.

streetNameAndNumber

string

The street name and number.

streetNumber

string

The building number on the street.

BoundingBoxCompassNotation

The bounding box of the location.

Name Type Description
entity

Entity

Entity type source of the bounding box. For reverse-geocoding this is always equal to position.

northEast

string

North-east latitude,longitude coordinate of the bounding box as comma-separated floats

southWest

string

South-west latitude,longitude coordinate of the bounding box as comma-separated floats

Entity

Entity type source of the bounding box. For reverse-geocoding this is always equal to position.

Name Type Description
position

string

Position entity

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

GeographicEntityType

Geography entity type. Present only when entityType was requested and is available.

Name Type Description
Country

string

country/region name

CountrySecondarySubdivision

string

County

CountrySubdivision

string

State or Province

CountryTertiarySubdivision

string

Named Area

Municipality

string

City / Town

MunicipalitySubdivision

string

Sub / Super City

Neighbourhood

string

Neighbourhood

PostalCodeArea

string

Postal Code / Zip Code

LatLongPairAbbreviated

A location represented as a latitude and longitude using short names 'lat' & 'lon'.

Name Type Description
lat

number

Latitude property

lon

number

Longitude property

LocalizedMapView

The View parameter (also called the "user region" parameter) allows you to show the correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions have different views of such regions, and the View parameter allows your application to comply with the view required by the country/region your application will be serving. By default, the View parameter is set to “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. Alternatively, you have the option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that you are authorized to access via Azure Maps is made available. Example: view=IN.

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

Name Type Description
AE

string

United Arab Emirates (Arabic View)

AR

string

Argentina (Argentinian View)

Auto

string

Return the map data based on the IP address of the request.

BH

string

Bahrain (Arabic View)

IN

string

India (Indian View)

IQ

string

Iraq (Arabic View)

JO

string

Jordan (Arabic View)

KW

string

Kuwait (Arabic View)

LB

string

Lebanon (Arabic View)

MA

string

Morocco (Moroccan View)

OM

string

Oman (Arabic View)

PK

string

Pakistan (Pakistani View)

PS

string

Palestinian Authority (Arabic View)

QA

string

Qatar (Arabic View)

SA

string

Saudi Arabia (Arabic View)

SY

string

Syria (Arabic View)

Unified

string

Unified View (Others)

YE

string

Yemen (Arabic View)

MatchType

Types of match for a reverse address search operation.

Name Type Description
AddressPoint

string

HouseNumberRange

string

Street

string

QueryType

The type of query being returned: NEARBY or NON_NEAR.

Name Type Description
NEARBY

string

Search was performed around a certain latitude and longitude with a defined radius

NON_NEAR

string

Search was performed globally, without biasing to a certain latitude and longitude, and no defined radius

ResponseFormat

Desired format of the response. Value can be either json or xml.

Name Type Description
json

string

The JavaScript Object Notation Data Interchange Format

xml

string

The Extensible Markup Language

ReverseSearchAddressResult

This object is returned from a successful Search Address Reverse call

Name Type Description
addresses

ReverseSearchAddressResultItem[]

Addresses array

summary

SearchSummary

Summary object for a Search Address Reverse response

ReverseSearchAddressResultItem

Result object for a Search Address Reverse response

Name Type Description
address

Address

The address of the result

matchType

MatchType

Information on the type of match.

One of:

  • AddressPoint
  • HouseNumberRange
  • Street
position

string

Position property in the form of "{latitude},{longitude}"

roadUse

RoadUseType[]

Describes the possible uses of a road.

RoadUseType

Describes the possible uses of a road.

Name Type Description
Arterial

string

LimitedAccess

string

LocalStreet

string

Ramp

string

Rotary

string

Terminal

string

SearchSummary

Summary object for a Search API response.

Name Type Description
fuzzyLevel

integer

The maximum fuzzy level required to provide Results.

geoBias

LatLongPairAbbreviated

Indication when the internal search engine has applied a geospatial bias to improve the ranking of results. In some methods, this can be affected by setting the lat and lon parameters where available. In other cases it is purely internal.

limit

integer

Maximum number of responses that will be returned

numResults

integer

Number of results in the response.

offset

integer

The starting offset of the returned Results within the full Result set.

query

string

The query parameter that was used to produce these search results.

queryTime

integer

Time spent resolving the query, in milliseconds.

queryType

QueryType

The type of query being returned: NEARBY or NON_NEAR.

totalResults

integer

The total number of Results found.