You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Search for a location using Azure Maps Search services
3
3
description: Learn about the Azure Maps Search service. See how to use this set of APIs for geocoding, reverse geocoding, fuzzy searches, and reverse cross street searches.
4
-
author: farazgis
5
-
ms.author: fsiddiqui
6
-
ms.date: 8/9/2024
4
+
author: sinnypan
5
+
ms.author: sipa
6
+
ms.date: 9/24/2025
7
7
ms.topic: how-to
8
8
ms.service: azure-maps
9
-
ms.subservice: routing
9
+
ms.subservice: search
10
+
zone_pivot_groups: azure-maps-search
10
11
---
11
12
12
13
# Search for a location using Azure Maps Search services
13
14
14
15
The [Search] service is a set of RESTful APIs designed to help developers search addresses, places, and business listings by name, category, and other geographic information. In addition to supporting traditional geocoding, services can also reverse geocode addresses and cross streets based on latitudes and longitudes. Latitude and longitude values returned by the search can be used as parameters in other Azure Maps services, such as [Route] and [Weather].
15
16
17
+
:::zone pivot="search-previous"
18
+
16
19
This article demonstrates how to:
17
20
18
21
* Request latitude and longitude coordinates for an address (geocode address location) by using [Search Address].
19
22
* Search for an address or Point of Interest (POI) using [Fuzzy Search].
20
23
* Use [Reverse Address Search] to translate coordinate location to street address.
21
-
*Translate coordinate location into a human understandable cross street using [Search Address Reverse Cross Street], most often needed in tracking applications that receive a GPS feed from a device or asset, and wish to know where the coordinate is located.
24
+
*Use the [Search Address Reverse Cross Street] API to convert a coordinate location into a human-readable cross street. This is especially useful in tracking applications that receive GPS data from devices or assets and need to determine the nearest street-level location for those coordinates.
22
25
23
26
## Prerequisites
24
27
@@ -27,9 +30,9 @@ This article demonstrates how to:
27
30
28
31
>[!IMPORTANT]
29
32
>
30
-
> In the URL examples in this article you will need to replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
33
+
> In the URL examples in this article, you need to replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
31
34
32
-
This article uses the [bruno] application, but you can choose a different API development environment.
35
+
This article uses the [Bruno] application, but you can choose a different API development environment.
33
36
34
37
## Request latitude and longitude for an address (geocoding)
35
38
@@ -38,7 +41,9 @@ The example in this section uses [Get Search Address] to convert an address into
38
41
> [!TIP]
39
42
> If you have a set of addresses to geocode, you can use [Post Search Address Batch] to send a batch of queries in a single request.
40
43
41
-
1. Open the bruno app, select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
44
+
1. Open the [Bruno] application.
45
+
46
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
42
47
43
48
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
44
49
@@ -74,7 +79,9 @@ The example in this section uses `Fuzzy Search` to search the entire world for *
74
79
> [!IMPORTANT]
75
80
> To geobias results to the relevant area for your users, always add as many location details as possible. For more information, see [Best Practices for Search].
76
81
77
-
1. Open the bruno app, select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
82
+
1. Open the [Bruno] application.
83
+
84
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
78
85
79
86
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
80
87
@@ -122,15 +129,17 @@ The example in this section uses `Fuzzy Search` to search the entire world for *
122
129
123
130
This example demonstrates making reverse searches using a few of the optional parameters that are available. For the full list of optional parameters, see [Reverse Search Parameters].
124
131
125
-
1. Open the bruno app, select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
132
+
1. Open the [Bruno] application.
133
+
134
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
126
135
127
136
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
1. Select the run button, and review the response body. You should see one query result. The response includes key address information about Safeco Field.
142
+
1. Select the run button, and review the response body. You should see one query result. The response includes key address information about T-Mobile Park.
134
143
135
144
1. Next, add the following key/value pairs to the **Params** section:
136
145
@@ -145,20 +154,22 @@ This example demonstrates making reverse searches using a few of the optional pa
145
154
146
155
1. Select the run button, and review the response body.
147
156
148
-
1. Next, add the `entityType` key, and set its value to `Municipality`. The `entityType` key overrides the `returnMatchType` key in the previous step. `returnSpeedLimit` and `returnRoadUse` also need removed since you're requesting information about the municipality. For all possible entity types, see [Entity Types].
157
+
1. Next, add the `entityType` key, and set its value to `Municipality`. The `entityType` key overrides the `returnMatchType` key in the previous step. `returnSpeedLimit` and `returnRoadUse` also need removed since you're requesting information about the municipality. For all possible entity types, see [Entity Types].
1. Select the run button. Compare the results to the results returned in step 5. Because the requested entity type is now `municipality`, the response doesn't include street address information. Also, the returned `geometryId` can be used to request boundary polygon through Azure Maps Get [Search Polygon API].
161
+
1. Select the run button. Compare the results to the results returned in step 5. Because the requested entity type is now `municipality`, the response doesn't include street address information. Also, the returned `geometryId` can be used to request boundary polygon through Azure Maps Get [Search Polygon API].
153
162
154
163
> [!TIP]
155
-
> For more information on these as well as other parameters, see [Reverse Search Parameters].
164
+
> For more information, see [Reverse Search Parameters].
156
165
157
166
## Search for cross street using Reverse Address Cross Street Search
158
167
159
168
This example demonstrates how to search for a cross street based on the coordinates of an address.
160
169
161
-
1. Open the bruno app, select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
170
+
1. Open the [Bruno] application.
171
+
172
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
162
173
163
174
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
164
175
@@ -168,6 +179,194 @@ This example demonstrates how to search for a cross street based on the coordina
168
179
169
180
1. Select the run button, and review the response body. Notice that the response contains a `crossStreet` value of `South Atlantic Street`.
170
181
182
+
:::zone-end
183
+
184
+
:::zone pivot="search-latest"
185
+
186
+
This article demonstrates how to:
187
+
188
+
* Request latitude and longitude coordinates for an address (geocode address location) by using [Get Geocoding].
189
+
* Search for a partial address using [Get Geocode Autocomplete].
190
+
* Use [Get Reverse Geocoding] to translate coordinate location to street address.
191
+
* Translate coordinate location into a human understandable cross street using [Get Reverse Geocoding], most often needed in tracking applications that receive a GPS feed from a device or asset, and wish to know where the coordinate is located.
192
+
193
+
## Prerequisites
194
+
195
+
* An [Azure Maps account]
196
+
* A [subscription key]
197
+
198
+
>[!IMPORTANT]
199
+
>
200
+
> In the URL examples in this article, you need to replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
201
+
202
+
This article uses the [Bruno] application, but you can choose a different API development environment.
203
+
204
+
## Request coordinates for an address using Get Geocoding
205
+
206
+
The example in this section uses [Get Geocoding] to convert an address into latitude and longitude coordinates. This process is also called *geocoding*. In addition to returning the coordinates, the response also returns detailed address properties such as street, postal code, municipality, and country/region information.
207
+
208
+
> [!TIP]
209
+
> If you have a set of addresses to geocode, you can use [Get Geocoding Batch] to send a batch of queries in a single request.
210
+
211
+
1. Open the [Bruno] application.
212
+
213
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
214
+
215
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
216
+
217
+
```http
218
+
GET https://atlas.microsoft.com/geocode?api-version=2025-01-01&subscription-key={Your-Azure-Maps-Subscription-key}&query=400 Broad St, Seattle, WA 98109
219
+
```
220
+
221
+
1. Select the **Create** button.
222
+
223
+
1. Select the run button.
224
+
225
+
This request searches for a specific address: `400 Broad St, Seattle, WA 98109`. Next, search an address that has more than one possible location.
226
+
227
+
1. In the **Params** section, change the `query` key to `400 Broad, Seattle`, then select the run button.
228
+
229
+
1. Next, try setting the `query` key to `400 Broa`, then select the run button.
230
+
231
+
The response includes results from multiple countries/regions. To [geobias] results to the relevant area for your users, always add as many location details as possible to the request.
232
+
233
+
## Use Get Geocode Autocomplete for partial address search
234
+
235
+
The [Get Geocode Autocomplete] API supports both single-line and free-form address inputs, making it ideal for scenarios where a complete address is unavailable. You can submit either a full or partial address as the query. To enhance the accuracy and relevance of the results, it's recommended to constrain the search by specifying coordinates or a bounding box.
236
+
237
+
This example demonstrates how to use the Get Geocode Autocomplete API to search the entire North American continent for partial input like "university of w." It then shows how to narrow the search scope to a specific country or region using the `countryRegion` parameter. Finally, it demonstrates how to use the `coordinates` parameter to focus the search to a specific area.
238
+
239
+
> [!IMPORTANT]
240
+
> To geobias results to the relevant area for your users, always add as many location details as possible. For more information, see [Best Practices for Search].
241
+
242
+
1. Open the [Bruno] application.
243
+
244
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
245
+
246
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
247
+
248
+
```http
249
+
https://atlas.microsoft.com/geocode:autocomplete?api-version=2025-06-01-preview&query=university of w&bbox=-168,-52,5,84&subscription-key={Your-Azure-Maps-Subscription-key}
250
+
```
251
+
252
+
1. Select the run button, then review the response body.
253
+
254
+
> [!NOTE]
255
+
> The `bbox` parameter in the URL defines a bounding box that encompasses **Canada**, the **United States**, **Mexico**, **Greenland**, and parts of the **Caribbean**. It returns several universities located within this area, including:
256
+
>
257
+
> - **University of Washington** in King County, Washington State, USA
258
+
> - **University of Waterloo** in Waterloo, Ontario, Canada
259
+
> - **University of Wyoming** in Laramie, Wyoming, USA
260
+
> - **University of Windsor** in Windsor, Ontario, Canada
261
+
> - **University of West Florida** in Escambia County, Florida, USA
262
+
263
+
Next, narrow down the area included in your search to the United States, using the `countryRegion` parameter.
264
+
265
+
1. Open the [Bruno] application.
266
+
267
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
268
+
269
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
270
+
271
+
```http
272
+
https://atlas.microsoft.com/geocode:autocomplete?api-version=2025-06-01-preview&query=university of w&bbox=-168,-52,5,84&countryRegion=us&subscription-key={Your-Azure-Maps-Subscription-key}
273
+
```
274
+
275
+
1. Select the run button, then review the response body.
276
+
277
+
> [!NOTE]
278
+
> The `bbox` parameter in the URL defines the same bounding box as in the previous example, however the `countryRegion=us` parameter limits results to the United States. It returns several universities located within this area, including:
279
+
>
280
+
> - **University of Washington** in King County, Washington State, USA
281
+
> - **University of Wyoming** in Laramie, Wyoming, USA
282
+
> - **University of West Florida** in Escambia County, Florida, USA
283
+
> - **University of Wisconsin-Superior** in Douglas County, Wisconsin, USA
284
+
> - **University of Wisconsin-Stout** in Menomonie, Dunn County, Wisconsin, USA
285
+
286
+
Next, focus your search to include more results in a specific area within the defined `countryRegion`, using the `coordinates` parameter. This results in more items returned near the specified area that would otherwise not make the list.
287
+
288
+
1. Open the [Bruno] application.
289
+
290
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
291
+
292
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
293
+
294
+
```http
295
+
https://atlas.microsoft.com/geocode:autocomplete?api-version=2025-06-01-preview&query=university of w&bbox=-168,-52,5,84&countryRegion=us&coordinates=-122.136791,47.642232&subscription-key={Your-Azure-Maps-Subscription-key}
296
+
```
297
+
298
+
1. Select the run button, then review the response body.
299
+
300
+
> [!NOTE]
301
+
> The `bbox` and `countryRegion` parameters in this URL define the same boundaries as in the previous example, however the `coordinates=-122.136791,47.642232` parameter focuses the search results to the specified area. It returns a local university that would otherwise not be returned.
302
+
>
303
+
> - **University of Washington** in King County, Washington State, USA
304
+
> - **University of Washington, Tacoma** in Tacoma, Pierce County, Washington State, USA
305
+
> - **University of Wyoming** in Laramie, Wyoming, USA
306
+
> - **University of West Florida** in Escambia County, Florida, USA
307
+
> - **University of Wisconsin-Stout** in Menomonie, Dunn County, Wisconsin, USA
308
+
309
+
## Search for a street address using Get Reverse Geocoding
310
+
311
+
[Get Reverse Geocoding] translates coordinates into human readable street addresses. This API is often used for applications that consume GPS feeds and want to discover addresses at specific coordinate points.
312
+
313
+
> [!IMPORTANT]
314
+
> To [geobias] results to the relevant area for your users, always add as many location details as possible. For more information, see [Best Practices for Search].
315
+
316
+
> [!TIP]
317
+
> If you have a set of coordinate locations to reverse geocode, you can use [Get Reverse Geocoding Batch] to send a batch of queries in a single request.
318
+
319
+
This example demonstrates making reverse searches using a few of the optional parameters that are available. For the full list of optional parameters, see [Get Reverse Geocoding Parameters].
320
+
321
+
1. Open the [Bruno] application.
322
+
323
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
324
+
325
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
1. Select the run button, and review the response body. You should see one query result. The response includes key address information about T-Mobile Park.
332
+
333
+
1. Next, add the following parameter to the request: `resultTypes=Postcode1`
1. Select the run button, and compare the results to the results returned previously. Because the requested result type is now `Postcode1`, the response doesn't include street address information, just the zip code.
340
+
341
+
## Search for cross street using Get Reverse Geocoding
342
+
343
+
This example demonstrates how to search for a cross street based on the coordinates of an address.
344
+
345
+
1. Open the [Bruno] application.
346
+
347
+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
348
+
349
+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
1. Select the run button, and review the response body.
356
+
357
+
The response includes an `intersection` section that identifies the street portion of the returned address: *NE 8th St*. It also specifies the intersecting street: *164th Ave NE*, and provides the full cross street as: *NE 8th St and 164th Ave NE*.
358
+
359
+
```json
360
+
"intersection": {
361
+
"baseStreet": "NE 8th St",
362
+
"displayName": "NE 8th St and 164th Ave NE",
363
+
"intersectionType": "Near",
364
+
"secondaryStreet1": "164th Ave NE"
365
+
}
366
+
```
367
+
368
+
:::zone-end
369
+
171
370
## Next steps
172
371
173
372
> [!div class="nextstepaction"]
@@ -176,6 +375,7 @@ This example demonstrates how to search for a cross street based on the coordina
0 commit comments