Search - Post Search Inside Geometry
Use to perform free form searches inside a one more more geometries.
The Post Search Inside Geometry
API is and HTTP POST request that allows you to perform a free form search inside a single geometry or multiple geometries. The search results that fall inside the geometry/geometries will be returned.<br><br>To send the geometry you will use a
POSTrequest where the request body will contain the
geometryobject represented as a
GeoJSONtype and the
Content-Typeheader will be set to
application/json. The geographical features to be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
GeoJSONtypes:<ul><li>**GeoJSON FeatureCollection** <br>The
geometrycan be represented as a
GeoJSON FeatureCollectionobject. This is the recommended option if the geometry contains both Polygons and Circles. The
FeatureCollectioncan contain a max of 50
GeoJSON Featureobjects. Each
Featureobject should represent either a Polygon or a Circle with the following conditions:<ul style="list-style-type:none"><li>A
Featureobject for the Polygon geometry can have a max of 50 coordinates and it's properties must be empty.</li><li>A
Featureobject for the Circle geometry is composed of a _center_ represented using a
GeoJSON Pointtype and a _radius_ value (in meters) which must be specified in the object's properties along with the _subType_ property whose value should be 'Circle'.</li></ul><br> Please see the Examples section below for a sample
FeatureCollectionrepresentation.<br><br></li><li>**GeoJSON GeometryCollection**<br>The
geometrycan be represented as a
GeoJSON GeometryCollectionobject. This is the recommended option if the geometry contains a list of Polygons only. The
GeometryCollectioncan contain a max of 50
GeoJSON Polygonobjects. Each
Polygonobject can have a max of 50 coordinates. Please see the Examples section below for a sample
GeometryCollectionrepresentation.<br><br></li><li>**GeoJSON Polygon**<br>The
geometrycan be represented as a
GeoJSON Polygonobject. This is the recommended option if the geometry contains a single Polygon. The
Polygonobject can have a max of 50 coordinates. Please see the Examples section below for a sample
Polygon` representation.
.
POST https://atlas.microsoft.com/search/geometry/{format}?api-version=1.0&query={query}
POST https://atlas.microsoft.com/search/geometry/{format}?api-version=1.0&query={query}&limit={limit}&language={language}&categorySet={categorySet}&extendedPostalCodesFor={extendedPostalCodesFor}&idxSet={idxSet}&view={view}&openingHours=nextSevenDays
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
format
|
path | True |
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 |
string |
The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL encoded. |
category
|
query |
integer[] |
A comma-separated list of category set IDs which could be used to restrict the result to specific Points of Interest categories. ID order does not matter. Maximum number of
|
|
extended
|
query |
Indexes for which extended postal codes should be included in the results. Available indexes are: Addr = Address ranges Geo = Geographies PAD = Point Addresses POI = Points of Interest Str = Streets XStr = Cross Streets (intersections) Value should be a comma separated list of index types (in any order) or None for no indexes. By default extended postal codes are included for all indexes except Geo. Extended postal code lists for geographies can be quite long so they have to be explicitly requested when needed. Usage examples: extendedPostalCodesFor=POI extendedPostalCodesFor=PAD,Addr,POI extendedPostalCodesFor=None Extended postal code is returned as an extendedPostalCode property of an address. Availability is region-dependent. |
||
idx
|
query |
A comma separated list of indexes which should be utilized for the search. Item order does not matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses, POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections) |
||
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. |
|
limit
|
query |
integer |
Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100 |
|
opening
|
query |
Hours of operation for a POI (Points of Interest). The availability of hours of operation will vary based on the data available. If not passed, then no opening hours information will be returned. Supported value: nextSevenDays |
||
view
|
query |
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. |
Request Body
Name | Type | Description |
---|---|---|
geometry | GeoJsonObject: |
A valid |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
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
Search for burger joints inside a geometry represented as a GeoJSON GeometryCollection type
Sample request
POST https://atlas.microsoft.com/search/geometry/json?api-version=1.0&query=burger&limit=2&openingHours=nextSevenDays
{
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Polygon",
"coordinates": [
[
[
-122.43576049804686,
37.7524152343544
],
[
-122.43301391601562,
37.70660472542312
],
[
-122.36434936523438,
37.712059855877314
],
[
-122.43576049804686,
37.7524152343544
]
]
]
},
{
"type": "Polygon",
"coordinates": [
[
[
-123.43576049804686,
37.7524152343544
],
[
-123.43301391601562,
37.70660472542312
],
[
-123.36434936523438,
37.712059855877314
],
[
-123.43576049804686,
37.7524152343544
]
]
]
}
]
}
}
Sample response
{
"summary": {
"query": "burger",
"queryType": "NON_NEAR",
"queryTime": 21,
"numResults": 2,
"offset": 0,
"totalResults": 4,
"fuzzyLevel": 1
},
"results": [
{
"type": "POI",
"id": "9P2i9inRyndAA-_V40J8oA",
"score": 2.0041828156,
"info": "search:ta:840061003419653-US",
"poi": {
"name": "Burger Joint",
"phone": "+1 415-349-4331",
"categorySet": [
{
"id": 7315015
}
],
"categories": [
"fast food",
"restaurant"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "restaurant"
},
{
"nameLocale": "en-US",
"name": "fast food"
}
]
}
]
},
"address": {
"streetNumber": "167",
"streetName": "Leland Avenue",
"municipality": "San Francisco",
"neighbourhood": "Visitacion Valley",
"countrySecondarySubdivision": "San Francisco",
"countrySubdivisionName": "California",
"countrySubdivisionCode": "CA",
"postalCode": "94134",
"extendedPostalCode": "94134-2844",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "167 Leland Avenue, San Francisco, CA 94134",
"localName": "San Francisco"
},
"position": {
"lat": 37.712228,
"lon": -122.407022
},
"viewport": {
"topLeftPoint": {
"lat": 37.71313,
"lon": -122.40816
},
"btmRightPoint": {
"lat": 37.71133,
"lon": -122.40589
}
},
"entryPoints": [
{
"type": "main",
"position": {
"lat": 37.71241,
"lon": -122.40693
}
}
]
},
{
"type": "POI",
"id": "hkr-N07YS6Gv2dOciQ9lwA",
"score": 2.0041515827,
"info": "search:ta:840067000526682-US",
"poi": {
"name": "Sound of Burgers",
"categorySet": [
{
"id": 7315
}
],
"categories": [
"restaurant"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "restaurant"
}
]
}
]
},
"address": {
"streetNumber": "167",
"streetName": "Leland Avenue",
"municipality": "San Francisco",
"neighbourhood": "Visitacion Valley",
"countrySecondarySubdivision": "San Francisco",
"countrySubdivision": "CA",
"countrySubdivisionName": "California",
"countrySubdivisionCode": "CA",
"postalCode": "94134",
"extendedPostalCode": "94134-2844",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "167 Leland Avenue, San Francisco, CA 94134",
"localName": "San Francisco"
},
"position": {
"lat": 37.712228,
"lon": -122.407022
},
"viewport": {
"topLeftPoint": {
"lat": 37.71313,
"lon": -122.40816
},
"btmRightPoint": {
"lat": 37.71133,
"lon": -122.40589
}
},
"entryPoints": [
{
"type": "main",
"position": {
"lat": 37.71241,
"lon": -122.40693
}
}
]
}
]
}
Search for pizza places inside a geometry represented as a GeoJSON FeatureCollection type
Sample request
POST https://atlas.microsoft.com/search/geometry/json?api-version=1.0&query=pizza&limit=2&openingHours=nextSevenDays
{
"geometry": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-122.143035,
47.653536
],
[
-122.187164,
47.617556
],
[
-122.114981,
47.570599
],
[
-122.132756,
47.654009
],
[
-122.143035,
47.653536
]
]
]
},
"properties": {}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.126986,
47.639754
]
},
"properties": {
"subType": "Circle",
"radius": 100
}
}
]
}
}
Sample response
{
"summary": {
"query": "pizza",
"queryType": "NON_NEAR",
"queryTime": 34,
"numResults": 2,
"offset": 0,
"totalResults": 21,
"fuzzyLevel": 1
},
"results": [
{
"type": "POI",
"id": "-UuwTye4GGsea4KmCLvoqQ",
"score": 2.1455535889,
"info": "search:ta:840537000108972-US",
"poi": {
"name": "Biryani & Pizza House",
"categorySet": [
{
"id": 7315036
}
],
"categories": [
"pizza",
"restaurant"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "restaurant"
},
{
"nameLocale": "en-US",
"name": "pizza"
}
]
}
]
},
"address": {
"streetNumber": "15025",
"streetName": "Northeast 24th Street",
"municipality": "Redmond",
"countrySecondarySubdivision": "King",
"countrySubdivision": "WA",
"countrySubdivisionName": "Washington",
"countrySubdivisionCode": "WA",
"postalCode": "98052",
"extendedPostalCode": "98052-5531",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "15025 Northeast 24th Street, Redmond, WA 98052",
"localName": "Redmond"
},
"position": {
"lat": 47.630786,
"lon": -122.139302
},
"viewport": {
"topLeftPoint": {
"lat": 47.63169,
"lon": -122.14064
},
"btmRightPoint": {
"lat": 47.62989,
"lon": -122.13797
}
},
"entryPoints": [
{
"type": "minor",
"position": {
"lat": 47.63079,
"lon": -122.13931
}
},
{
"type": "main",
"position": {
"lat": 47.63147,
"lon": -122.13935
}
}
]
},
{
"type": "POI",
"id": "7r095LCcCSkdoGoeLcnvsQ",
"score": 2.1454992294,
"info": "search:ta:840537000103468-US",
"poi": {
"name": "Pagliacci Pizza",
"categorySet": [
{
"id": 7315036
}
],
"url": "www.pagliacci.com/",
"categories": [
"pizza",
"restaurant"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "restaurant"
},
{
"nameLocale": "en-US",
"name": "pizza"
}
]
}
],
"openingHours": {
"mode": "nextSevenDays",
"timeRanges": [
{
"startTime": {
"date": "2024-03-14",
"hour": 10,
"minute": 0
},
"endTime": {
"date": "2024-03-14",
"hour": 11,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-17",
"hour": 10,
"minute": 0
},
"endTime": {
"date": "2024-03-17",
"hour": 11,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-18",
"hour": 10,
"minute": 0
},
"endTime": {
"date": "2024-03-18",
"hour": 11,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-19",
"hour": 10,
"minute": 0
},
"endTime": {
"date": "2024-03-19",
"hour": 11,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-20",
"hour": 10,
"minute": 0
},
"endTime": {
"date": "2024-03-20",
"hour": 11,
"minute": 0
}
}
]
}
},
"address": {
"streetNumber": "15238",
"streetName": "Bel Red Road",
"municipality": "Bellevue",
"countrySecondarySubdivision": "King",
"countrySubdivision": "WA",
"countrySubdivisionName": "Washington",
"countrySubdivisionCode": "WA",
"postalCode": "98007",
"extendedPostalCode": "98007-3815",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "15238 Bel Red Road, Bellevue, WA 98007",
"localName": "Bellevue"
},
"position": {
"lat": 47.628008,
"lon": -122.13646
},
"viewport": {
"topLeftPoint": {
"lat": 47.62891,
"lon": -122.13779
},
"btmRightPoint": {
"lat": 47.62711,
"lon": -122.13513
}
},
"entryPoints": [
{
"type": "main",
"position": {
"lat": 47.6283,
"lon": -122.13611
}
}
]
}
]
}
Search for subs joints inside a geometry represented as a GeoJSON Polygon type
Sample request
POST https://atlas.microsoft.com/search/geometry/json?api-version=1.0&query=subs&limit=2&openingHours=nextSevenDays
{
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-122.43576049804686,
37.7524152343544
],
[
-122.43301391601562,
37.70660472542312
],
[
-122.36434936523438,
37.712059855877314
],
[
-122.43576049804686,
37.7524152343544
]
]
]
}
}
Sample response
{
"summary": {
"query": "subs",
"queryType": "NON_NEAR",
"queryTime": 42,
"numResults": 2,
"offset": 0,
"totalResults": 5,
"fuzzyLevel": 1
},
"results": [
{
"type": "POI",
"id": "HOIWGiNwVv0z6bF8MO3EbA",
"score": 2.1455111504,
"info": "search:ta:840069009512242-US",
"poi": {
"name": "Adams Grub Truck",
"phone": "+1 415-307-8844",
"categorySet": [
{
"id": 7315042
}
],
"categories": [
"restaurant",
"sandwich"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "sandwich"
},
{
"nameLocale": "en-US",
"name": "restaurant"
}
]
}
]
},
"address": {
"streetNumber": "1465",
"streetName": "Carroll Avenue",
"municipality": "San Francisco",
"neighbourhood": "Bayview",
"countrySecondarySubdivision": "San Francisco",
"countrySubdivisionName": "California",
"countrySubdivisionCode": "CA",
"postalCode": "94124",
"extendedPostalCode": "94124-3604",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "1465 Carroll Avenue, San Francisco, CA 94124",
"localName": "San Francisco"
},
"position": {
"lat": 37.72328,
"lon": -122.39091
},
"viewport": {
"topLeftPoint": {
"lat": 37.72418,
"lon": -122.39205
},
"btmRightPoint": {
"lat": 37.72238,
"lon": -122.38977
}
},
"entryPoints": [
{
"type": "main",
"position": {
"lat": 37.72348,
"lon": -122.39073
}
}
]
},
{
"type": "POI",
"id": "bXbc0QxTRlkSo8GnU7EU-Q",
"score": 2.1454677582,
"info": "search:ta:840061001992959-US",
"poi": {
"name": "SUBWAY San Francisco San Francisco",
"phone": "+1 415-657-9898",
"brands": [
{
"name": "SUBWAY"
}
],
"categorySet": [
{
"id": 7315042
}
],
"categories": [
"restaurant",
"sandwich"
],
"classifications": [
{
"code": "RESTAURANT",
"names": [
{
"nameLocale": "en-US",
"name": "sandwich"
},
{
"nameLocale": "en-US",
"name": "restaurant"
}
]
}
],
"openingHours": {
"mode": "nextSevenDays",
"timeRanges": [
{
"startTime": {
"date": "2024-03-13",
"hour": 7,
"minute": 0
},
"endTime": {
"date": "2024-03-13",
"hour": 21,
"minute": 30
}
},
{
"startTime": {
"date": "2024-03-14",
"hour": 7,
"minute": 0
},
"endTime": {
"date": "2024-03-14",
"hour": 21,
"minute": 30
}
},
{
"startTime": {
"date": "2024-03-15",
"hour": 7,
"minute": 0
},
"endTime": {
"date": "2024-03-15",
"hour": 21,
"minute": 30
}
},
{
"startTime": {
"date": "2024-03-16",
"hour": 9,
"minute": 0
},
"endTime": {
"date": "2024-03-16",
"hour": 21,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-17",
"hour": 9,
"minute": 0
},
"endTime": {
"date": "2024-03-17",
"hour": 21,
"minute": 0
}
},
{
"startTime": {
"date": "2024-03-18",
"hour": 8,
"minute": 0
},
"endTime": {
"date": "2024-03-18",
"hour": 20,
"minute": 30
}
},
{
"startTime": {
"date": "2024-03-19",
"hour": 7,
"minute": 0
},
"endTime": {
"date": "2024-03-19",
"hour": 21,
"minute": 30
}
}
]
}
},
"address": {
"streetNumber": "2599",
"streetName": "San Bruno Avenue",
"municipality": "San Francisco",
"neighbourhood": "Portola",
"countrySecondarySubdivision": "San Francisco",
"countrySubdivision": "CA",
"countrySubdivisionName": "California",
"countrySubdivisionCode": "CA",
"postalCode": "94134",
"extendedPostalCode": "94134-1504",
"countryCode": "US",
"country": "United States",
"countryCodeISO3": "USA",
"freeformAddress": "2599 San Bruno Avenue, San Francisco, CA 94134",
"localName": "San Francisco"
},
"position": {
"lat": 37.729004,
"lon": -122.403956
},
"viewport": {
"topLeftPoint": {
"lat": 37.7299,
"lon": -122.40509
},
"btmRightPoint": {
"lat": 37.7281,
"lon": -122.40282
}
},
"entryPoints": [
{
"type": "main",
"position": {
"lat": 37.72892,
"lon": -122.40414
}
}
]
}
]
}
Definitions
Name | Description |
---|---|
Address |
The address of the result |
Address |
Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included. |
Bounding |
The viewport that covers the result represented by the top-left and bottom-right coordinates of the viewport. |
Bounding |
The bounding box of the location. |
Brand |
The brand associated with the POI |
Classification |
The classification for the POI being returned |
Classification |
Name for the classification |
Data |
Optional section. Reference ids for use with the Get Search Polygon API. |
Entity |
Entity type source of the bounding box. For reverse-geocoding this is always equal to position. |
Entry |
The entry point for the POI being returned. |
Entry |
The type of entry point. Value can be either main or minor. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Geographic |
Geography entity type. Present only when entityType was requested and is available. |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geo |
A valid |
Geometry |
Information about the geometric shape of the result. Only present if type == Geography. |
Lat |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
Localized |
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. |
Match |
Types of match for a reverse address search operation. |
Operating |
Opening hours for a POI (Points of Interest). |
Operating |
Hours of operation for a POI (Points of Interest). The availability of hours of operation will vary based on the data available. If not passed, then no opening hours information will be returned. Supported value: nextSevenDays |
Operating |
Represents a date and time |
Operating |
Open time range for a day |
Point |
Details of the returned POI including information such as the name, phone, url address, and classifications. |
Point |
POI category |
Query |
The type of query being returned: NEARBY or NON_NEAR. |
Response |
Desired format of the response. Value can be either json or xml. |
Search |
This object is returned from a successful Search calls. |
Search |
Result object for a Search API response. |
Search |
One of:
|
Search |
Indexes for which extended postal codes should be included in the results. Available indexes are: Addr = Address ranges Geo = Geographies PAD = Point Addresses POI = Points of Interest Str = Streets XStr = Cross Streets (intersections) Value should be a comma separated list of index types (in any order) or None for no indexes. By default extended postal codes are included for all indexes except Geo. Extended postal code lists for geographies can be quite long so they have to be explicitly requested when needed. Usage examples: extendedPostalCodesFor=POI extendedPostalCodesFor=PAD,Addr,POI extendedPostalCodesFor=None Extended postal code is returned as an extendedPostalCode property of an address. Availability is region-dependent. |
Search |
This type represents the request body for the Search Inside Geometry service. |
Search |
Summary object for a Search API response. |
Address
The address of the result
Name | Type | Description |
---|---|---|
boundingBox |
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 |
|
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 |
municipality |
string |
City / Town |
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. |
AddressRanges
Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included.
Name | Type | Description |
---|---|---|
from |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
|
rangeLeft |
string |
Address range on the left side of the street. |
rangeRight |
string |
Address range on the right side of the street. |
to |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
BoundingBox
The viewport that covers the result represented by the top-left and bottom-right coordinates of the viewport.
Name | Type | Description |
---|---|---|
btmRightPoint |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
|
topLeftPoint |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
BoundingBoxCompassNotation
The bounding box of the location.
Name | Type | Description |
---|---|---|
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 |
Brand
The brand associated with the POI
Name | Type | Description |
---|---|---|
name |
string |
Name of the brand |
Classification
The classification for the POI being returned
Name | Type | Description |
---|---|---|
code |
string |
Code property |
names |
Names array |
ClassificationName
Name for the classification
Name | Type | Description |
---|---|---|
name |
string |
Name property |
nameLocale |
string |
Name Locale property |
DataSources
Optional section. Reference ids for use with the Get Search Polygon API.
Name | Type | Description |
---|---|---|
geometry |
Information about the geometric shape of the result. Only present if type == Geography. |
Entity
Entity type source of the bounding box. For reverse-geocoding this is always equal to position.
Name | Type | Description |
---|---|---|
position |
string |
Position entity |
EntryPoint
The entry point for the POI being returned.
Name | Type | Description |
---|---|---|
position |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
|
type |
The type of entry point. Value can be either main or minor. |
EntryPointType
The type of entry point. Value can be either main or minor.
Name | Type | Description |
---|---|---|
main |
string |
|
minor |
string |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
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 |
GeoJsonFeature
A valid GeoJSON Feature
object type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
featureType |
string |
The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value. |
geometry | GeoJsonGeometry: |
A valid |
id |
string |
Identifier for the feature. |
type |
string:
Feature |
Specifies the |
GeoJsonFeatureCollection
A valid GeoJSON FeatureCollection
object type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
features |
Contains a list of valid |
|
type |
string:
Feature |
Specifies the |
GeoJsonGeometry
A valid GeoJSON
geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
type |
Geo |
Specifies the |
GeoJsonGeometryCollection
A valid GeoJSON GeometryCollection
object type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
geometries | GeoJsonGeometry[]: |
Contains a list of valid |
type |
string:
Geometry |
Specifies the |
GeoJsonLineString
A valid GeoJSON LineString
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
Coordinates for the |
type |
string:
Line |
Specifies the |
GeoJsonMultiLineString
A valid GeoJSON MultiLineString
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
Coordinates for the |
type |
string:
Multi |
Specifies the |
GeoJsonMultiPoint
A valid GeoJSON MultiPoint
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
Coordinates for the |
type |
string:
Multi |
Specifies the |
GeoJsonMultiPolygon
A valid GeoJSON MultiPolygon
object type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
Contains a list of valid |
type |
string:
Multi |
Specifies the |
GeoJsonPoint
A valid GeoJSON Point
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
A |
type |
string:
Point |
Specifies the |
GeoJsonPolygon
A valid GeoJSON Polygon
geometry type. Please refer to RFC 7946 for details.
Name | Type | Description |
---|---|---|
coordinates |
number[] |
Coordinates for the |
type |
string:
Polygon |
Specifies the |
Geometry
Information about the geometric shape of the result. Only present if type == Geography.
Name | Type | Description |
---|---|---|
id |
string |
Pass this as geometryId to the Get Search Polygon API to fetch geometry information for this result. |
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 |
OperatingHours
Opening hours for a POI (Points of Interest).
Name | Type | Description |
---|---|---|
mode |
string |
Value used in the request: none or "nextSevenDays" |
timeRanges |
List of time ranges for the next 7 days |
OperatingHoursRange
Hours of operation for a POI (Points of Interest). The availability of hours of operation will vary based on the data available. If not passed, then no opening hours information will be returned. Supported value: nextSevenDays
Name | Type | Description |
---|---|---|
nextSevenDays |
string |
Shows the hours of operation for the next week, starting with the current day in the local time of the POI. |
OperatingHoursTime
Represents a date and time
Name | Type | Description |
---|---|---|
date |
string |
Represents current calendar date in POI time zone, e.g. "2019-02-07". |
hour |
integer |
Hours are in the 24 hour format in the local time of a POI; possible values are 0 - 23. |
minute |
integer |
Minutes are in the local time of a POI; possible values are 0 - 59. |
OperatingHoursTimeRange
Open time range for a day
Name | Type | Description |
---|---|---|
endTime |
The point in the next 7 days range when a given POI is being closed, or the beginning of the range if it was closed before the range. |
|
startTime |
The point in the next 7 days range when a given POI is being opened, or the beginning of the range if it was opened before the range. |
PointOfInterest
Details of the returned POI including information such as the name, phone, url address, and classifications.
Name | Type | Description |
---|---|---|
brands |
Brand[] |
Brands array. The name of the brand for the POI being returned. |
categories |
string[] |
Categories array |
categorySet |
The list of the most specific POI categories |
|
classifications |
Classification array |
|
name |
string |
Name of the POI property |
openingHours |
Opening hours for a POI (Points of Interest). |
|
phone |
string |
Telephone number property |
url |
string |
Website URL property |
PointOfInterestCategorySet
POI category
Name | Type | Description |
---|---|---|
id |
integer |
Category ID |
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 |
|
xml |
string |
SearchAddressResult
This object is returned from a successful Search calls.
Name | Type | Description |
---|---|---|
results |
A list of Search API results. |
|
summary |
Summary object for a Search API response |
SearchAddressResultItem
Result object for a Search API response.
Name | Type | Description |
---|---|---|
address |
The address of the result |
|
addressRanges |
Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included. |
|
dataSources |
Optional section. Reference geometry id for use with the Get Search Polygon API. |
|
detourTime |
integer |
Detour time in seconds. Only returned for calls to the Search Along Route API. |
dist |
number |
Straight line distance between the result and geobias location in meters. |
entityType |
Geography entity type. Present only when entityType was requested and is available. |
|
entryPoints |
Array of EntryPoints. Those describe the types of entrances available at the location. The type can be "main" for main entrances such as a front door, or a lobby, and "minor", for side and back doors. |
|
id |
string |
Id property |
info |
string |
Information about the original data source of the Result. Used for support requests. |
matchType |
Information on the type of match. One of:
|
|
poi |
Details of the returned POI including information such as the name, phone, url address, and classifications. |
|
position |
A location represented as a latitude and longitude using short names 'lat' & 'lon'. |
|
score |
number |
The value within a result set to indicate the relative matching score between results. You can use this to determine that result x is twice as likely to be as relevant as result y if the value of x is 2x the value of y. The values vary between queries and is only meant as a relative value for one result set. |
type |
One of:
|
|
viewport |
The viewport that covers the result represented by the top-left and bottom-right coordinates of the viewport. |
SearchAddressResultType
One of:
- POI
- Street
- Geography
- Point Address
- Address Range
- Cross Street
Name | Type | Description |
---|---|---|
Address Range |
string |
|
Cross Street |
string |
|
Geography |
string |
|
POI |
string |
|
Point Address |
string |
|
Street |
string |
SearchIndexes
Indexes for which extended postal codes should be included in the results.
Available indexes are:
Addr = Address ranges
Geo = Geographies
PAD = Point Addresses
POI = Points of Interest
Str = Streets
XStr = Cross Streets (intersections)
Value should be a comma separated list of index types (in any order) or None for no indexes.
By default extended postal codes are included for all indexes except Geo. Extended postal code lists for geographies can be quite long so they have to be explicitly requested when needed.
Usage examples:
extendedPostalCodesFor=POI
extendedPostalCodesFor=PAD,Addr,POI
extendedPostalCodesFor=None
Extended postal code is returned as an extendedPostalCode property of an address. Availability is region-dependent.
Name | Type | Description |
---|---|---|
Addr |
string |
|
Geo |
string |
|
PAD |
string |
|
POI |
string |
|
Str |
string |
|
Xstr |
string |
SearchInsideGeometryRequest
This type represents the request body for the Search Inside Geometry service.
Name | Type | Description |
---|---|---|
geometry | GeoJsonObject: |
A valid |
SearchSummary
Summary object for a Search API response.
Name | Type | Description |
---|---|---|
fuzzyLevel |
integer |
The maximum fuzzy level required to provide Results. |
geoBias |
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 |
The type of query being returned: NEARBY or NON_NEAR. |
|
totalResults |
integer |
The total number of Results found. |