Bing Maps REST API why is location-data returning Medium confidence instead of High for well-established address?

RJBreneman 201 Reputation points
2023-04-10T16:52:34.12+00:00

Sample Address: 339 Avenue A Ronkonkoma, NY Bing Maps REST lookup URL: http://dev.virtualearth.net/REST/v1/Locations?addressLine=339%20Avenue%20A&adminDistrict=NY&locality=Ronkonkoma&countryRegion=US&postalCode=11779-1939&maxRes=1&key= Response: {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http://dev.virtualearth.net/Branding/logo_powered_by.png","copyright":"Copyright © 2023 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":1,"resources":[{"__type":"Location:http://schemas.microsoft.com/search/local/ws/rest/v1","bbox":[40.837435582429322,-73.086149138768491,40.845161017570675,-73.07253426123151],"name":"339 Avenue A, Ronkonkoma, NY 11779","point":{"type":"Point","coordinates":[40.8412983,-73.0793417]},"address":{"addressLine":"339 Avenue A","adminDistrict":"NY","adminDistrict2":"Suffolk County","countryRegion":"United States","formattedAddress":"339 Avenue A, Ronkonkoma, NY 11779","locality":"Ronkonkoma","postalCode":"11779"},"confidence":"Medium","entityType":"Address","geocodePoints":[{"type":"Point","coordinates":[40.8412983,-73.0793417],"calculationMethod":"Rooftop","usageTypes":["Display"]},{"type":"Point","coordinates":[40.8412818,-73.0795088],"calculationMethod":"Rooftop","usageTypes":["Route"]}],"matchCodes":["Good"]}]}],"statusCode":200,"statusDescription":"OK","traceId":"74e5cc66aa254a3f9e4319bf4d3186dd|CHI001BAE3|0.0.0.1|Ref A: 9B91F2BA951E4042903EA83C9A5686EB Ref B: CH1EDGE2006 Ref C: 2023-04-07T22:00:10Z"} According to: https://learn.microsoft.com/en-us/bingmaps/rest-services/locations/location-data "If the location information in the query is ambiguous, and there is no additional information to rank the locations (such as user location or the relative importance of the location), the confidence is set to Medium." This address has been in existence for decades. Bing Map in a browser seems quite confident about it. Why is this API only returning a Medium confidence? Thanks.

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
{count} votes

Accepted answer
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2023-04-13T16:38:14.3566667+00:00

    UPDATE: There is a hotfix address this issue. It should be updated by the end of the week

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2023-04-12T22:22:31.6766667+00:00

    Hi @RJBreneman ,

    You are making the structured call so that is exactly the format that should get you the best results. I will pass this question to our Geocoder team but would like to explain the difference between our API and the consumer experience as they are not exactly the same.

    For the API call, you are using a REST endpoint that does not have the context the browser supplies to our Web SDK. What you are using in the Bing.com/maps experience is closer to AutoSuggest within our Web SDK. As a developer, you can check out this option at https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/autosuggestui and try multiple addresses. Note that it will suggest multiple results and you pick the one to disambiguate, which the REST geocoder does not have. From my experience, a new medium confidence result means that there is a new address in the data that is very close to the one you are searching for. In this case start typing "339 Avenue A" in the AutoSuggest UI and you will see multiple options and these might be the source of the "medium" confidence.

    Would you try using the "StrictMatch" or "sm" option (https://learn.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-address) to force a match to the country and admindistrict to see if that ups the confidence?

    Sincerely, IoTGirl

    1 person found this answer helpful.