Skip to main content

search

Creates, updates, deletes, gets or lists a search resource.

Overview

Namesearch
TypeResource
Idazure.maps_search.search

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_geocodingexecendpointtop, query, addressLine, countryRegion, bbox, view, coordinates, adminDistrict, adminDistrict2, adminDistrict3, locality, postalCode, Accept-Language, x-ms-client-idUse 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_geocoding_batchexecendpointx-ms-client-id, Accept-LanguageUse to send a batch of queries to the Geocoding _ API in a single request. The Get Geocoding Batch API is an HTTP POST request that sends batches of up to 100 queries to the Geocoding _ API in a single request. Submit Synchronous Batch Request ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to 100 for this API. POST Body for Batch Request ^^^^^^^^^^^^^^^^^^^^^^^^^^^ To send the geocoding queries you will use a POST request where the request body will contain the batchItems array in json format and the Content-Type header will be set to application/json. Here's a sample request body containing 2 geocoding queries: A geocoding batchItem object can accept any of the supported geocoding URI parameters __. The batch should contain at least 1 query. Batch Response Model ^^^^^^^^^^^^^^^^^^^^ The batch response contains a summary component that indicates the totalRequests that were part of the original batch request and successfulRequests i.e. queries which were executed successfully. The batch response also includes a batchItems array which contains a response for each and every query in the batch request. The batchItems will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types: * GeocodingResponse _ - If the query completed successfully. * Error - If the query failed. The response will contain a code and a message in this case.
get_polygonexeccoordinates, endpointview, resultType, resolution, x-ms-client-id, Accept-LanguageUse to get polygon data of a geographical area shape such as a city or a country region. The Get Polygon API is an HTTP GET request that supplies polygon data of a geographical area outline such as a city or a country region.
get_reverse_geocodingexeccoordinates, endpointresultTypes, view, x-ms-client-id, Accept-LanguageUse to get a street address and location info from longitude and latitude coordinates. The Get Reverse Geocoding API is an HTTP GET request used to translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Useful in tracking applications where you receive a GPS feed from the device or asset and wish to know the address associated with the coordinates. This endpoint will return address information for a given coordinate.
get_reverse_geocoding_batchexecendpointx-ms-client-id, Accept-LanguageUse to send a batch of queries to the Reverse Geocoding _ API in a single request. The Get Reverse Geocoding Batch API is an HTTP POST request that sends batches of up to 100 queries to Reverse Geocoding _ API using a single request. Submit Synchronous Batch Request ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to 100 for this API. POST Body for Batch Request ^^^^^^^^^^^^^^^^^^^^^^^^^^^ To send the reverse geocoding queries you will use a POST request where the request body will contain the batchItems array in json format and the Content-Type header will be set to application/json. Here's a sample request body containing 2 reverse geocoding queries: A reverse geocoding batchItem object can accept any of the supported reverse geocoding URI parameters __. The batch should contain at least 1 query. Batch Response Model ^^^^^^^^^^^^^^^^^^^^ The batch response contains a summary component that indicates the totalRequests that were part of the original batch request and successfulRequests i.e. queries which were executed successfully. The batch response also includes a batchItems array which contains a response for each and every query in the batch request. The batchItems will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types: * GeocodingResponse _ - If the query completed successfully. * Error - If the query failed. The response will contain a code and a message in this case.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
coordinatesarrayThe coordinates of the location that you want to reverse geocode. Example: &coordinates=lon,lat. Required.
endpointstringThe service endpoint host (no scheme). (default: )
Accept-Languagestring
addressLinestringThe 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. If query is given, should not use this parameter.. Default value is None.
adminDistrictstringThe country subdivision portion of an address, such as WA. If query is given, should not use this parameter.. Default value is None.
adminDistrict2stringThe county for the structured address, such as King. If query is given, should not use this parameter.. Default value is None.
adminDistrict3stringThe named area for the structured address. If query is given, should not use this parameter.. Default value is None.
bboxarrayA rectangular area on the earth defined as a bounding box object. The sides of the rectangles 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. Default value is None.
coordinatesarrayA 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. Default value is None.
countryRegionstringSignal for the geocoding result to an ISO 3166-1 Alpha-2 region/country code _ that is specified e.g. FR./ If query is given, should not use this parameter.. Default value is None.
localitystringThe locality portion of an address, such as Seattle. If query is given, should not use this parameter.. Default value is None.
postalCodestringThe postal code portion of an address. If query is given, should not use this parameter.. Default value is None.
querystringA string that contains information about a location, such as an address or landmark name. Default value is None.
resolutionstringResolution determines the amount of points to send back. If not specified, the default is medium resolution. Known values are: "small", "medium", "large", and "huge". Default value is "medium".
resultTypestringThe geopolitical concept to return a boundary for. If not specified, the default is countryRegion result type. Known values are: "countryRegion", "adminDistrict", "adminDistrict2", "postalCode", "postalCode2", "postalCode3", "postalCode4", "neighborhood", and "locality". Default value is "countryRegion".
resultTypesarraySpecify entity types that you want in the response. Only the types you specify will be returned. If the point cannot be mapped to the entity types you specify, no location information is returned in the response. Default value is all possible entities. A comma separated list of entity types selected from the following options. * Address * Neighborhood * PopulatedPlace * Postcode1 * AdminDivision1 * AdminDivision2 * CountryRegion These entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is returned in the response. Default value is None.
topintegerMaximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20. Default value is 5.
viewstringA 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. Default value is None.
x-ms-client-idstring

Lifecycle Methods

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.

EXEC azure.maps_search.search.get_geocoding 
@endpoint='{{ endpoint }}' --required,
@top='{{ top }}',
@query='{{ query }}',
@addressLine='{{ addressLine }}',
@countryRegion='{{ countryRegion }}',
@bbox='{{ bbox }}',
@view='{{ view }}',
@coordinates='{{ coordinates }}',
@adminDistrict='{{ adminDistrict }}',
@adminDistrict2='{{ adminDistrict2 }}',
@adminDistrict3='{{ adminDistrict3 }}',
@locality='{{ locality }}',
@postalCode='{{ postalCode }}',
@Accept-Language='{{ Accept-Language }}',
@x-ms-client-id='{{ x-ms-client-id }}'
;