A mind that is stretched by a new experience can never go back to its old dimensions.

Google Geocoding API added “score”

February 28th, 2013 Posted in geek out

At Opower, we use the Google Geocoding API to help us find latitude and longitude for customer’s sites. Today, they pushed out a new field, called “score” that isn’t part of their API. Here is the new response body with lots of information redacted:

“results”: [
“address_components”: [

“long_name”: “New Jersey”,
“short_name”: “NJ”,

…”formatted_address”: “…, Teaneck, NJ 07666, USA”,
“location_type”: “ROOFTOP”,

“score”: 0.8022069931030273,

“types”: [
“status”: “OK”

We don’t yet know what it is or what it’s used for, but I suspect that it’s a score or confidence interval of how good Google things the result is. It caused a few JSON Parsers to bork since we were counting on the fields listed in the API to be the only ones in the request. That was not a wise assumption, and we used this Jackson annotation to prevent this from happening again:

@JsonIgnoreProperties(ignoreUnknown = true)
  1. One Response to “Google Geocoding API added “score””

  2. By rajat on May 1, 2013

Post a Comment

CommentLuv badge