none
Geocoding REST API no longer returning matches with "High" confidence in the US RRS feed

  • Question

  • We've noticed lately that requests to the Geocoding API (in the USA) are literally never coming back with "confidence": "High" anymore, it's always at best "Medium", with "matchCodes": ["Good"]  and two geocodedPoints, one with "usageType": ["Display"] and one for "usageType": ["Route"]. Nothing is ever "Ambiguous" or "UpHierarchy", so I don't think that could be the explanation. These are mostly completely normal addresses we're looking up, many even residential, but we still never get "High". I don't actually know how long this has been the case because our logs don't go back far enough (so at least 30 days), but it worked as expected at some point. Any ideas on what might have changed or what we should be doing differently?
    Tuesday, January 7, 2020 12:29 PM

Answers

All replies

  • Without looking at the specific transactions it would only be speculation.  Do you have some sample calls (with your key removed) you would like us to review?
    Tuesday, January 7, 2020 3:58 PM
    Owner
  • I'm not exaggerating when I say it's happening on literally every request we make, but here are some examples:

    http://dev.virtualearth.net/REST/v1/Locations?addressLine=167+E+Forest+View+Dr%2C+Willow+Creek%2C+CA+95573%2C+USA&key=<REMOVED>

    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 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.948277282429324,-123.62990885310738,40.956002717570684,-123.61627114689263],"name":"167
     E Forest View Dr, Willow Creek, CA 95573","point":{"type":"Point","coordinates":[40.95214,-123.62309]},"address":{"addressLine":"167 E Forest View Dr","adminDistrict":"CA","adminDistrict2":"Humboldt
     County","countryRegion":"United States","formattedAddress":"167 E Forest View Dr, Willow Creek, CA 95573","locality":"Willow Creek","postalCode":"95573"},"confidence":"Medium","entityType":"Address","geocodePoints":[{"type":"Point","coordinates":[40.95214,-123.62309],"calculationMethod":"Rooftop","usageTypes":["Display"]},{"type":"Point","coordinates":[40.952166326645,-123.623489110202],"calculationMethod":"Rooftop","usageTypes":["Route"]}],"matchCodes":["Good"]}]}],"statusCode":200,"statusDescription":"OK","traceId":"53e14370661a44b0905fef54aad9e65a|DU00000D67|0.0.0.1|Ref
     A: C4D3226364294D108C24208619058B64 Ref B: DB3EDGE0916 Ref C: 2020-01-08T15:28:55Z"}

    http://dev.virtualearth.net/REST/v1/Locations?addressLine=1123+Morse+St+NE%2C+Washington%2C+DC+20002%2C+United+States&key=<REMOVED>

    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 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":[38.900467282429325,-76.998257885431727,38.908192717570678,-76.985022114568281],"name":"1123
     Morse St NE, Washington, DC 20002","point":{"type":"Point","coordinates":[38.90433,-76.99164]},"address":{"addressLine":"1123 Morse St NE","adminDistrict":"DC","adminDistrict2":"City
     of Washington","countryRegion":"United States","formattedAddress":"1123 Morse St NE, Washington, DC 20002","locality":"Washington","postalCode":"20002"},"confidence":"Medium","entityType":"Address","geocodePoints":[{"type":"Point","coordinates":[38.90433,-76.99164],"calculationMethod":"Rooftop","usageTypes":["Display"]},{"type":"Point","coordinates":[38.9044837694532,-76.9915320616338],"calculationMethod":"Rooftop","usageTypes":["Route"]}],"matchCodes":["Good"]}]}],"statusCode":200,"statusDescription":"OK","traceId":"7cddf59c5f4e4fc2bced2f7664242cf8|DU00000B77|0.0.0.1|Ref
     A: 084AD7270D5F4607B1B104C91160FB8A Ref B: DB3EDGE1120 Ref C: 2020-01-08T15:28:01Z"}


    http://dev.virtualearth.net/REST/v1/Locations?addressLine=9001+Orvis+Way%2C+Lamont%2C+CA+93241&key=<REMOVED>

    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 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":[35.259507282429325,-118.91081741135456,35.267232717570678,-118.89820258864545],"name":"9001
     Orvis Way, Lamont, CA 93241","point":{"type":"Point","coordinates":[35.26337,-118.90451]},"address":{"addressLine":"9001 Orvis Way","adminDistrict":"CA","adminDistrict2":"Kern
     County","countryRegion":"United States","formattedAddress":"9001 Orvis Way, Lamont, CA 93241","locality":"Lamont","postalCode":"93241"},"confidence":"Medium","entityType":"Address","geocodePoints":[{"type":"Point","coordinates":[35.26337,-118.90451],"calculationMethod":"Rooftop","usageTypes":["Display"]},{"type":"Point","coordinates":[35.2636099999972,-118.904510001163],"calculationMethod":"Rooftop","usageTypes":["Route"]}],"matchCodes":["Good"]}]}],"statusCode":200,"statusDescription":"OK","traceId":"96538e3120b64787871a6bca2480532c|DU00000B75|0.0.0.1|Ref
     A: 038A27679A1546B6B10B6A3C696EC51D Ref B: DB3EDGE1623 Ref C: 2020-01-08T15:25:19Z"}

    (If there's information in these responses that should remain confidential, please let me know.)


    Wednesday, January 8, 2020 3:30 PM
  • Can you try the more structured call and see if it makes a difference?  For example:

    https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-address

    This allows the API to narrow by region first rather than use the whole line as a query string, upping the confidence that it is giving you an address in the correct location/region.

    1. http://dev.virtualearth.net/REST/v1/Locations/US/CA/95573/Willow%20Creek/167%20E%20Forest%20View%20Dr?o=xml&key={BingMapsKey}

    2http://dev.virtualearth.net/REST/v1/Locations/US/DC/20002/Washington/1123%20Morse%20St%20NE?o=xml&key={BingMapsKey}

    3http://dev.virtualearth.net/REST/v1/Locations/US/CA/93241/Lamont/9001%20Orvis%20way?o=xml&key={BingMapsKey}

    You can see in the responses above the country region and other identifiers you would use for this API method as shown at the doc link given above. You are essentially calling the same API but only providing one variable.  If you split it into more of the helpful items separated, such as city, state and postal code identified ahead of the call, the API can narrow it's search.

    http://dev.virtualearth.net/REST/v1/Locations?countryRegion={countryRegion}&adminDistrict={adminDistrict}&locality={locality}&postalCode={postalCode}&addressLine={addressLine}&userLocation={userLocation}&userIp={userIp}&usermapView={usermapView}&includeNeighborhood={includeNeighborhood}&maxResults={maxResults}&key={BingMapsKey}
    Wednesday, January 8, 2020 4:27 PM
    Owner
  • http://dev.virtualearth.net/REST/v1/Locations/US/CA/95573/Willow%20Creek/167%20E%20Forest%20View%20Dr?o=json&key=<REMOVED>

    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 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.948277282429324,-123.62990885310738,40.956002717570684,-123.61627114689263],"name":"167 E Forest View Dr, Willow Creek, CA 95573","point":{"type":"Point","coordinates":[40.95214,-123.62309]},"address":{"addressLine":"167 E Forest View Dr","adminDistrict":"CA","adminDistrict2":"Humboldt County","countryRegion":"United States","formattedAddress":"167 E Forest View Dr, Willow Creek, CA 95573","locality":"Willow Creek","postalCode":"95573"},"confidence":"High","entityType":"Address","geocodePoints":[{"type":"Point","coordinates":[40.95214,-123.62309],"calculationMethod":"Rooftop","usageTypes":["Display"]},{"type":"Point","coordinates":[40.952166326645,-123.623489110202],"calculationMethod":"Rooftop","usageTypes":["Route"]}],"matchCodes":["Good"]}]}],"statusCode":200,"statusDescription":"OK","traceId":"837c9d5c71af478e9573179008674868|DU00000D7D|0.0.0.1|Ref A: 1045F1CF822B4BE186A71AF71D84004E Ref B: DB3EDGE0706 Ref C: 2020-01-09T15:57:45Z"}

    I guess that answers that question. Can you confirm that this is how the API is meant to function, in other words that we will only get "High" confidence using the structured form of the request? (If so that should be documented somewhere, IMHO.)


    Thursday, January 9, 2020 4:05 PM
  • The documentation is pretty specific as to what each of the fields do. In many cases words like "Washington" can be a state or a street or a POI like "Washington Monument" and it is these words that can lower confidence unless they are specified as state versus anything else.

    For locations queries that are not addresses you can use the free form query (https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-query) call but since you have the address (https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-address) why not use it?

    Friday, January 10, 2020 9:49 PM
    Owner
  • Thanks for clarifying!

    The short answer is, we don't always get a broken-down address from our downstream customers, we often get a CSV and a somewhat freeform text string for the address, which can be something seemingly vague like "Sample College, Exampletown, XX" or "Bldg 5A, Ste 301, 11 Fake St Exampletown, XX". With or without ZIP/postal code. We have code that tries to parse the address given to us (sometimes we get "10-20 Fake St" meaning a single building, and sometimes it refers to every building between 10 and 20...), but our experience is that commercial geocoding services do a much better job than we do so we try to defer to you as much as possible. In any event, I'll discuss this with the team and see if we can't come up with something.

    I really appreciate you taking the time to go over this with me; it was very helpful. Thanks again!

    Tuesday, January 14, 2020 10:44 AM
  • Yes!!!! As you can imagine you are not alone in the "Random text collected as an address" scenario.  We have built a sample you can provide to those data collectors that can break that cycle.  

    You can try it out here: https://bingmapsv8samples.azurewebsites.net/#Fill%20Address%20Form%20with%20Autosuggest

    And it is explained in our example docs here:

    https://docs.microsoft.com/en-us/bingmaps/v8-web-control/map-control-concepts/autosuggest-module-examples/filling-in-an-address-form-example 

    And the base docs on Autosuggest are here:

    https://docs.microsoft.com/en-us/bingmaps/rest-services/autosuggest

    Tuesday, January 14, 2020 8:55 PM
    Owner