Skip to content

Commit cdeda27

Browse files
Merge pull request #306753 from stevemunk/resultTypeGroups-Address
Added autocomplete 'resultTypeGroups=Address' section.
2 parents d114099 + 633c9b0 commit cdeda27

1 file changed

Lines changed: 56 additions & 7 deletions

File tree

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

Lines changed: 56 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,50 @@ 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+
The examples in this section demonstrate the difference between searching for a place and searching for an address using the `resultTypeGroups` parameter of the [Get Geocode Autocomplete] API, using examples that search for Disneyland in southern California using partial input like "dis" and 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&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+
| name | Disney California Adventure Park |
337+
338+
> [!TIP]
339+
> The `type` property is most relevant when using `resultTypeGroups=place`. To view available types, refer to the [Autocomplete ResultType Enum]. To define which types to search, use the `resultTypes` [URI parameter]. For implementation details, see the [Autocomplete API call to search for 'Muir Woods', filtered by park and populated place resultTypes, place resultTypeGroups] example.
340+
341+
1. When no values are provided for the `resultTypeGroups` parameter, queries can return both place and address values. If your only interested in searching for addresses, include `resultTypeGroups=address` in your request:
342+
343+
```http
344+
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}
345+
```
346+
347+
Notice that the response contains *address* values that include:
348+
349+
| Property name | Property value |
350+
|------------------|----------------------------------------------|
351+
| typeGroup | Address |
352+
| streetName | Disneyland |
353+
| formattedAddress | Disneyland, Anaheim, CA 92802, United States |
354+
309355
## Search for a street address using Get Reverse Geocoding
310356
311357
[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 +421,39 @@ This example demonstrates how to search for a cross street based on the coordina
375421
> [!div class="nextstepaction"]
376422
> [Best practices for Azure Maps Search service]
377423
378-
[Get Geocode Autocomplete]: /rest/api/maps/search/get-geocode-autocomplete
424+
[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
425+
[Autocomplete ResultType Enum]: /rest/api/maps/search/get-geocode-autocomplete?#autocompleteresulttypeenum
379426
[Azure Maps account]: quick-demo-map-app.md#create-an-azure-maps-account
427+
[Azure Maps geocoding coverage]: geocoding-coverage.md
380428
[Azure Maps Search service]: /rest/api/maps/search?view=rest-maps-1.0&preserve-view=true
381429
[Best practices for Azure Maps Search service]: how-to-use-best-practices-for-search.md
382430
[Best Practices for Search]: how-to-use-best-practices-for-search.md#geobiased-search-results
431+
[bruno]: https://www.usebruno.com/
383432
[Entity Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#entitytype
384433
[Fuzzy Search URI Parameters]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true#uri-parameters
385434
[Fuzzy Search]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true
386435
[geobias]: glossary.md#geobias
387-
[Get Geocoding]: /rest/api/maps/search/get-geocoding
436+
[Get Geocode Autocomplete]: /rest/api/maps/search/get-geocode-autocomplete
388437
[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
438+
[Get Geocoding]: /rest/api/maps/search/get-geocoding
391439
[Get Reverse Geocoding Batch]: /rest/api/maps/search/get-reverse-geocoding-batch
440+
[Get Reverse Geocoding Parameters]: /rest/api/maps/search/get-reverse-geocoding#uri-parameters
441+
[Get Reverse Geocoding]: /rest/api/maps/search/get-reverse-geocoding
392442
[Get Search Address Reverse]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
393443
[Get Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
394444
[point of interest]: /rest/api/maps/search/getsearchpoi?view=rest-maps-1.0&preserve-view=true#searchpoiresponse
395445
[Post Search Address Batch]: /rest/api/maps/search/postsearchaddressbatch
396446
[Post Search Address Reverse Batch]: /rest/api/maps/search/postsearchaddressreversebatch?view=rest-maps-1.0&preserve-view=true
397-
[bruno]: https://www.usebruno.com/
398447
[Reverse Address Search Results]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#searchaddressreverseresult
399448
[Reverse Address Search]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true
400449
[Reverse Search Parameters]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
401450
[Road Use Types]: /rest/api/maps/search/getsearchaddressreverse?view=rest-maps-1.0&preserve-view=true#uri-parameters
402451
[Route]: /rest/api/maps/route
403452
[Search Address Reverse Cross Street]: /rest/api/maps/search/getsearchaddressreversecrossstreet?view=rest-maps-1.0&preserve-view=true
404453
[Search Address]: /rest/api/maps/search/getsearchaddress?view=rest-maps-1.0&preserve-view=true
405-
[Azure Maps geocoding coverage]: geocoding-coverage.md
406454
[Search Polygon API]: /rest/api/maps/search/getsearchpolygon?view=rest-maps-1.0&preserve-view=true
407455
[Search]: /rest/api/maps/search?view=rest-maps-1.0&preserve-view=true
408456
[subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
409457
[URI Parameter reference]: /rest/api/maps/search/getsearchfuzzy?view=rest-maps-1.0&preserve-view=true#uri-parameters
458+
[URI parameter]: /rest/api/maps/search/get-geocode-autocomplete?##uri-parameters
410459
[Weather]: /rest/api/maps/weather

0 commit comments

Comments
 (0)