Skip to content

Commit 04e80e8

Browse files
committed
Added autocomplete 'resultTypeGroups=Address' section.
1 parent 16089be commit 04e80e8

1 file changed

Lines changed: 57 additions & 7 deletions

File tree

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

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ The example in this section uses [Get Geocoding] to convert an address into lati
234234
235235
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.
236236
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.
237+
### Search for a place
238+
239+
This example demonstrates how to use the Get Geocode Autocomplete API to search for a place in 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.
238240
239241
> [!IMPORTANT]
240242
> 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].
@@ -306,6 +308,51 @@ Next, focus your search to include more results in a specific area within the de
306308
> - **University of West Florida** in Escambia County, Florida, USA
307309
> - **University of Wisconsin-Stout** in Menomonie, Dunn County, Wisconsin, USA
308310
311+
### Search for an address
312+
313+
This example demonstrates how to use the Get Geocode Autocomplete API to search for an address for Disneyland in southern California using partial input like "dis" using the `coordinates` parameter to focus the search to a specific area.
314+
315+
> [!IMPORTANT]
316+
> 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].
317+
318+
1. Open the [Bruno] application.
319+
320+
1. Select **NEW REQUEST** to create the request. In the **NEW REQUEST** window, set **Type** to **HTTP**. Enter a **Name** for the request.
321+
322+
1. Select the **GET** HTTP method in the **URL** drop-down list, then enter the following URL:
323+
324+
```http
325+
https://atlas.microsoft.com/geocode:autocomplete?api-version=2025-06-01-preview&query=dis&coordinates=-117.920219,33.809570&resultTypeGroups=address&subscription-key={Your-Azure-Maps-Subscription-key}
326+
```
327+
328+
1. Select the run button, then review the response body.
329+
330+
Notice that the response contains *place* values that include:
331+
332+
| Property name | Property value |
333+
|------------------|------------------------------------------|
334+
| typeGroup | Place |
335+
| type | AmusementPark |
336+
| formattedAddress | Disney California Adventure Park, Calif. |
337+
| name | Disney California Adventure Park |
338+
339+
> [!NOTE]
340+
> The `type` property is most relavent when `resultTypeGroups=property`. For a list of what types are available, see the [Autocomplete ResultType Enum]. To specify what types to search for, include the `resultTypes` [URI parameter]. For an example, see the [Autocomplete API call to search for 'Muir Woods', filtered by park and populated place resultTypes, place resultTypeGroups] sample.
341+
342+
1. The query inserted the value *place* for the `resultTypeGroups` parameter as the default value for this query since none was provided. To get 'address' information instead of 'place' information, include the `resultTypeGroups=address` parameter:
343+
344+
```http
345+
https://atlas.microsoft.com/geocode:autocomplete?api-version=2025-06-01-preview&query=dis&coordinates=-117.920219,33.809570&subscription-key={Your-Azure-Maps-Subscription-key}&resultTypeGroups=address
346+
```
347+
348+
Notice that the response contains *address* values that include:
349+
350+
| Property name | Property value |
351+
|------------------|----------------------------------------------|
352+
| typeGroup | Address |
353+
| streetName | Disneyland |
354+
| formattedAddress | Disneyland, Anaheim, CA 92802, United States |
355+
309356
## Search for a street address using Get Reverse Geocoding
310357
311358
[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.
@@ -375,36 +422,39 @@ This example demonstrates how to search for a cross street based on the coordina
375422
> [!div class="nextstepaction"]
376423
> [Best practices for Azure Maps Search service]
377424
378-
[Get Geocode Autocomplete]: /rest/api/maps/search/get-geocode-autocomplete
425+
[Autocomplete API call to search for 'Muir Woods', filtered by park and populated place resultTypes, place resultTypeGroups]: /rest/api/maps/search/get-geocode-autocomplete?#autocomplete-api-call-to-search-for-'muir-woods',-filtered-by-park-and-populated-place-resulttypes,-place-resulttypegroups
426+
[Autocomplete ResultType Enum]: /rest/api/maps/search/get-geocode-autocomplete?#autocompleteresulttypeenum
379427
[Azure Maps account]: quick-demo-map-app.md#create-an-azure-maps-account
428+
[Azure Maps geocoding coverage]: geocoding-coverage.md
380429
[Azure Maps Search service]: /rest/api/maps/search?view=rest-maps-1.0&preserve-view=true
381430
[Best practices for Azure Maps Search service]: how-to-use-best-practices-for-search.md
382431
[Best Practices for Search]: how-to-use-best-practices-for-search.md#geobiased-search-results
432+
[bruno]: https://www.usebruno.com/
383433
[Entity Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#entitytype
384434
[Fuzzy Search URI Parameters]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true#uri-parameters
385435
[Fuzzy Search]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true
386436
[geobias]: glossary.md#geobias
387-
[Get Geocoding]: /rest/api/maps/search/get-geocoding
437+
[Get Geocode Autocomplete]: /rest/api/maps/search/get-geocode-autocomplete
388438
[Get Geocoding Batch]: /rest/api/maps/search/get-geocoding-batch
389-
[Get Reverse Geocoding]: /rest/api/maps/search/get-reverse-geocoding
390-
[Get Reverse Geocoding Parameters]: /rest/api/maps/search/get-reverse-geocoding#uri-parameters
439+
[Get Geocoding]: /rest/api/maps/search/get-geocoding
391440
[Get Reverse Geocoding Batch]: /rest/api/maps/search/get-reverse-geocoding-batch
441+
[Get Reverse Geocoding Parameters]: /rest/api/maps/search/get-reverse-geocoding#uri-parameters
442+
[Get Reverse Geocoding]: /rest/api/maps/search/get-reverse-geocoding
392443
[Get Search Address Reverse]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
393444
[Get Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
394445
[point of interest]: /rest/api/maps/search/getsearchpoi?view=rest-maps-1.0&preserve-view=true#searchpoiresponse
395446
[Post Search Address Batch]: /rest/api/maps/search/postsearchaddressbatch
396447
[Post Search Address Reverse Batch]: /rest/api/maps/search/postsearchaddressreversebatch?view=rest-maps-1.0&preserve-view=true
397-
[bruno]: https://www.usebruno.com/
398448
[Reverse Address Search Results]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#searchaddressreverseresult
399449
[Reverse Address Search]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
400450
[Reverse Search Parameters]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
401451
[Road Use Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
402452
[Route]: /rest/api/maps/route
403453
[Search Address Reverse Cross Street]: /rest/api/maps/search/getsearchaddressreversecrossstreet?view=rest-maps-1.0&preserve-view=true
404454
[Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
405-
[Azure Maps geocoding coverage]: geocoding-coverage.md
406455
[Search Polygon API]: /rest/api/maps/search/getsearchpolygon?view=rest-maps-1.0&preserve-view=true
407456
[Search]: /rest/api/maps/search?view=rest-maps-1.0&preserve-view=true
408457
[subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
409458
[URI Parameter reference]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true#uri-parameters
459+
[URI parameter]: /rest/api/maps/search/get-geocode-autocomplete?##uri-parameters
410460
[Weather]: /rest/api/maps/weather

0 commit comments

Comments
 (0)