Skip to content

Commit 7d31770

Browse files
authored
Merge pull request #284211 from stevemunk/postman-to-bruno-how-to-search-for-address
Updates to the how-to article 'Search for a location using Azure Maps Search services'
2 parents 30eff6e + 6e673c1 commit 7d31770

File tree

6 files changed

+51
-42
lines changed

6 files changed

+51
-42
lines changed

articles/azure-maps/glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ The following list describes common words used with the Azure Maps services.
151151

152152
## G
153153

154+
<a name="geobias"></a> **Geobias**: A geospatial bias to improve the ranking of results. In some methods, this can be affected by setting the longitude and latitude parameters where available. In other cases it is purely internal.
155+
154156
<a name="geocode"></a> **Geocode**: An address or location that has been converted into a coordinate that can be used to display that location on a map.
155157

156158
<a name="geocoding"></a> **Geocoding**: Or _forward geocoding_, is the process of converting address of location data into coordinates.

articles/azure-maps/how-to-search-for-address.md

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Search for a location using Azure Maps Search services
33
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.
44
author: farazgis
55
ms.author: fsiddiqui
6-
ms.date: 10/28/2021
6+
ms.date: 8/9/2024
77
ms.topic: how-to
88
ms.service: azure-maps
99
ms.subservice: routing
@@ -25,36 +25,44 @@ This article demonstrates how to:
2525
* An [Azure Maps account]
2626
* A [subscription key]
2727

28-
This tutorial uses the [Postman] application, but you may choose a different API development environment.
28+
>[!IMPORTANT]
29+
>
30+
> In the URL examples in this article you will need to replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
31+
32+
This article uses the [bruno] application, but you can choose a different API development environment.
2933

3034
## Request latitude and longitude for an address (geocoding)
3135

3236
The example in this section uses [Get Search Address] 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.
3337

34-
>[!TIP]
35-
>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.
38+
> [!TIP]
39+
> 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.
3640
37-
1. In the Postman app, select **New** to create the request. In the **Create New** window, select **HTTP Request**. Enter a **Request name** for the request.
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.
3842

39-
2. Select the **GET** HTTP method in the builder tab and enter the following URL. In this request, we're searching for a specific address: `400 Braod St, Seattle, WA 98109`. For this request, and other requests mentioned in this article, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
43+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
4044

4145
```http
4246
https://atlas.microsoft.com/search/address/json?&subscription-key={Your-Azure-Maps-Subscription-key}&api-version=1.0&language=en-US&query=400 Broad St, Seattle, WA 98109
4347
```
4448
45-
3. Select the blue **Send** button. The response body contains data for a single location.
49+
1. Select the **Create** button.
50+
51+
1. Select the run button.
4652
47-
4. Next, search an address that has more than one possible locations. In the **Params** section, change the `query` key to `400 Broad, Seattle`. Select the blue **Send** button.
53+
This request searches for a specific address: `400 Broad St, Seattle, WA 98109`. Next, search an address that has more than one possible location.
54+
55+
1. In the **Params** section, change the `query` key to `400 Broad, Seattle`, then select the run button.
4856
4957
:::image type="content" source="./media/how-to-search-for-address/search-address.png" alt-text="Search for address":::
5058
51-
5. Next, try setting the `query` key to `400 Broa`.
59+
1. Next, try setting the `query` key to `400 Broa`, then select the run button.
5260
53-
6. Select the **Send** button. 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.
61+
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.
5462
5563
## Fuzzy Search
5664
57-
[Fuzzy Search] supports standard single line and free-form searches. We recommend that you use the Azure Maps Search Fuzzy API when you don't know your user input type for a search request. The query input can be a full or partial address. It can also be a Point of Interest (POI) token, like a name of POI, POI category or name of brand. Furthermore, to improve the relevance of your search results, constrain the query results using a coordinate location and radius, or by defining a bounding box.
65+
[Fuzzy Search] supports standard single line and free-form searches. We recommend that you use the Azure Maps Search Fuzzy API when you don't know your user input type for a search request. The query input can be a full or partial address. It can also be a Point of Interest (POI) token, like a name of POI, POI category or name of brand. Furthermore, to improve the relevance of your search results, constrain the query results using a coordinate location and radius, or by defining a bounding box.
5866
5967
> [!TIP]
6068
> Most Search queries default to `maxFuzzyLevel=1` to improve performance and reduce unusual results. Adjust fuzziness levels by using the `maxFuzzyLevel` or `minFuzzyLevel` parameters. For more information on `maxFuzzyLevel` and a complete list of all optional parameters, see [Fuzzy Search URI Parameters].
@@ -66,30 +74,30 @@ The example in this section uses `Fuzzy Search` to search the entire world for *
6674
> [!IMPORTANT]
6775
> 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].
6876
69-
1. In the Postman app, select **New** to create the request. In the **Create New** window, select **HTTP Request**. Enter a **Request name** for the request.
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.
7078
71-
2. Select the **GET** HTTP method in the builder tab and enter the following URL. For this request, and other requests mentioned in this article, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
79+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
7280
7381
```http
74-
https://atlas.microsoft.com/search/fuzzy/json?&api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=pizza
82+
https://atlas.microsoft.com/search/fuzzy/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=pizza
7583
```
7684
7785
> [!NOTE]
7886
> The _json_ attribute in the URL path determines the response format. This article uses json for ease of use and readability. To find other supported response formats, see the `format` parameter definition in the [URI Parameter reference] documentation.
7987
80-
3. Select **Send** and review the response body.
88+
1. Select the run button, then review the response body.
8189
82-
The ambiguous query string for "pizza" returned 10 [point of interest result] (POI) in both the "pizza" and "restaurant" categories. Each result includes details such as street address, latitude and longitude values, view port, and entry points for the location. The results are now varied for this query, and aren't tied to any reference location.
90+
The ambiguous query string for "pizza" returned 10 [point of interest] (POI) results in both the "pizza" and "restaurant" categories. Each result includes details such as street address, latitude and longitude values, view port, and entry points for the location. The results are now varied for this query, and aren't tied to any reference location.
8391
84-
In the next step, you'll use the `countrySet` parameter to specify only the countries/regions for which your application needs coverage. For a complete list of supported countries/regions, see [Search Coverage].
92+
In the next step, you'll use the `countrySet` parameter to specify only the countries/regions for which your application needs coverage. For a complete list of supported countries/regions, see [Azure Maps geocoding coverage].
8593
86-
4. The default behavior is to search the entire world, potentially returning unnecessary results. Next, search for pizza only in the United States. Add the `countrySet` key to the **Params** section, and set its value to `US`. Setting the `countrySet` key to `US` bounds the results to the United States.
94+
1. The default behavior is to search the entire world, potentially returning unnecessary results. Next, search for pizza only in the United States. Add the `countrySet` key to the **Params** section, and set its value to `US`. Setting the `countrySet` key to `US` bounds the results to the United States.
8795
8896
:::image type="content" source="./media/how-to-search-for-address/search-fuzzy-country.png" alt-text="Search for pizza in the United States":::
8997
9098
The results are now bounded by the country code and the query returns pizza restaurants in the United States.
9199
92-
5. To get an even more targeted search, you can search over the scope of a lat/lon coordinate pair. The following example uses the lat/lon coordinates of the Seattle Space Needle. Since we only want to return results within a 400-meters radius, we add the `radius` parameter. Also, we add the `limit` parameter to limit the results to the five closest pizza places.
100+
1. To get an even more targeted search, you can search over the scope of a lat/lon coordinate pair. The following example uses the lat/lon coordinates of the Seattle Space Needle. Since we only want to return results within a 400-meters radius, we add the `radius` parameter. Also, we add the `limit` parameter to limit the results to the five closest pizza places.
93101
94102
In the **Params** section, add the following key/value pairs:
95103
@@ -100,48 +108,48 @@ The example in this section uses `Fuzzy Search` to search the entire world for *
100108
| radius | 400 |
101109
| limit | 5 |
102110
103-
6. Select **Send**. The response includes results for pizza restaurants near the Seattle Space Needle.
111+
1. Select run. The response includes results for pizza restaurants near the Seattle Space Needle.
104112
105113
## Search for a street address using Reverse Address Search
106114
107115
[Get Search Address Reverse] 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.
108116
109117
> [!IMPORTANT]
110-
> 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].
118+
> 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].
111119
112120
> [!TIP]
113121
> If you have a set of coordinate locations to reverse geocode, you can use [Post Search Address Reverse Batch] to send a batch of queries in a single request.
114122
115123
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].
116124
117-
1. In the Postman app, select **New** to create the request. In the **Create New** window, select **HTTP Request**. Enter a **Request name** for the request.
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.
118126
119-
2. Select the **GET** HTTP method in the builder tab and enter the following URL. For this request, and other requests mentioned in this article, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key. The request should look like the following URL:
127+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
120128
121129
```http
122-
https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=47.591180,-122.332700&number=1
130+
https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=47.591180,-122.332700
123131
```
124132
125-
3. Select **Send**, and review the response body. You should see one query result. The response includes key address information about Safeco Field.
133+
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.
126134
127-
4. Next, add the following key/value pairs to the **Params** section:
135+
1. Next, add the following key/value pairs to the **Params** section:
128136
129-
| Key | Value | Returns
130-
|-----|------------|------|
131-
| number | 1 |The response may include the side of the street (Left/Right) and also an offset position for the number.|
137+
| Key | Value | Returns |
138+
|-----|-------|---------|
139+
| number | 1 |The response can include the side of the street (Left/Right) and also an offset position for the number.|
132140
| returnSpeedLimit | true | Returns the speed limit at the address.|
133141
| returnRoadUse | true | Returns road use types at the address. For all possible road use types, see [Road Use Types].|
134-
| returnMatchType | true| Returns the type of match. For all possible values, see [Reverse Address Search Results].
142+
| returnMatchType | true| Returns the type of match. For all possible values, see [Reverse Address Search Results]. |
135143
136144
:::image type="content" source="./media/how-to-search-for-address/search-reverse.png" alt-text="Search reverse.":::
137145
138-
5. Select **Send**, and review the response body.
146+
1. Select the run button, and review the response body.
139147
140-
6. Next, we 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].
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].
141149
142150
:::image type="content" source="./media/how-to-search-for-address/search-reverse-entity-type.png" alt-text="Search reverse entityType.":::
143151
144-
7. Select **Send**. 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].
152+
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].
145153
146154
> [!TIP]
147155
> For more information on these as well as other parameters, see [Reverse Search Parameters].
@@ -150,17 +158,15 @@ This example demonstrates making reverse searches using a few of the optional pa
150158
151159
This example demonstrates how to search for a cross street based on the coordinates of an address.
152160
153-
1. In the Postman app, select **New** to create the request. In the **Create New** window, select **HTTP Request**. Enter a **Request name** for the request.
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.
154162
155-
2. Select the **GET** HTTP method in the builder tab and enter the following URL. For this request, and other requests mentioned in this article, replace `{Your-Azure-Maps-Subscription-key}` with your Azure Maps subscription key. The request should look like the following URL:
163+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
156164
157165
```http
158-
https://atlas.microsoft.com/search/address/reverse/crossstreet/json?&api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=47.591180,-122.332700
166+
https://atlas.microsoft.com/search/address/reverse/crossstreet/json?api-version=1.0&subscription-key={Your-Azure-Maps-Subscription-key}&language=en-US&query=47.591180,-122.332700
159167
```
160168
161-
:::image type="content" source="./media/how-to-search-for-address/search-address-cross.png" alt-text="Search cross street.":::
162-
163-
3. Select **Send**, and review the response body. Notice that the response contains a `crossStreet` value of `South Atlantic Street`.
169+
1. Select the run button, and review the response body. Notice that the response contains a `crossStreet` value of `South Atlantic Street`.
164170
165171
## Next steps
166172
@@ -177,20 +183,21 @@ This example demonstrates how to search for a cross street based on the coordina
177183
[Entity Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#entitytype
178184
[Fuzzy Search URI Parameters]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true#uri-parameters
179185
[Fuzzy Search]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true
186+
[geobias]: glossary.md#geobias
180187
[Get Search Address Reverse]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
181188
[Get Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
182-
[point of interest result]: /rest/api/maps/search/getsearchpoi?view=rest-maps-1.0&preserve-view=true#searchpoiresponse
189+
[point of interest]: /rest/api/maps/search/getsearchpoi?view=rest-maps-1.0&preserve-view=true#searchpoiresponse
183190
[Post Search Address Batch]: /rest/api/maps/search/postsearchaddressbatch
184191
[Post Search Address Reverse Batch]: /rest/api/maps/search/postsearchaddressreversebatch?view=rest-maps-1.0&preserve-view=true
185-
[Postman]: https://www.postman.com/
192+
[bruno]: https://www.usebruno.com/
186193
[Reverse Address Search Results]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#searchaddressreverseresult
187194
[Reverse Address Search]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
188195
[Reverse Search Parameters]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
189196
[Road Use Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
190197
[Route]: /rest/api/maps/route
191198
[Search Address Reverse Cross Street]: /rest/api/maps/search/getsearchaddressreversecrossstreet?view=rest-maps-1.0&preserve-view=true
192199
[Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
193-
[Search Coverage]: geocoding-coverage.md
200+
[Azure Maps geocoding coverage]: geocoding-coverage.md
194201
[Search Polygon API]: /rest/api/maps/search/getsearchpolygon?view=rest-maps-1.0&preserve-view=true
195202
[Search]: /rest/api/maps/search?view=rest-maps-1.0&preserve-view=true
196203
[subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
69.4 KB
Loading
68.6 KB
Loading
164 KB
Loading
142 KB
Loading

0 commit comments

Comments
 (0)