Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with google geocode API : Getting "partial_match" in response

I am using google Geocode API to get the lat long of particular address.

when I am searching for "364 S Side Square, Carlinville, IL 62626, USA" in google search or google maps it gives the accurate pin point on google search result or maps result.

but same time when i am searching the same address using Geocode API using below request call, it gives "partial_match" : true

http://maps.googleapis.com/maps/api/geocode/json?address=364 S Side Square, Carlinville, IL 62626, USA&sensor=false

any one knows why it gives "partial_match" : true in response ?

what changes i have to do in the API request so that i won't get "partial_match" ?

like image 742
DOTNET Team - WeblineIndia Avatar asked Dec 06 '17 05:12

DOTNET Team - WeblineIndia


People also ask

What happens when you exceed the Google geocoding API rate limit py4e?

According to Google's API Usage and Billing page, there is a limit of 50 requests per second. If you exceed this amount, subsequent requests to the API will fail with the OVER_DAILY_LIMIT or OVER_QUERY_LIMIT status code and the geocoded data will not be returned.

What is the maximum limit for the number of geocode requests?

While there is no maximum number of requests per day, the following usage limit is still in place for the Geocoding API: 50 requests per second, calculated as the sum of client-side and server-side queries.


1 Answers

To understand the nature of the partial match flag for the '364 S Side Square, Carlinville, IL 62626, USA' let's have a look at this address in geocoder tool:

https://google-developers.appspot.com/maps/documentation/utils/geocoder/#q%3D364%2520S%2520Side%2520Square%252C%2520Carlinville%252C%2520IL%252062626%252C%2520USA

Indeed, the search string and formatted address in the result are exactly the same, however, we have to pay attention to other values like location_type and place_id

enter image description here

As you can see the location type is RANGE_INTERPOLATED and the place ID has a long value Ei0zNjQgUyBTaWRlIFNxdWFyZSwgQ2FybGludmlsbGUsIElMIDYyNjI2LCBVU0E. This means Google doesn't have an exact address feature in their database and tries to interpolate where this address might be located. In case if address exists in the Google database, you will see a location type ROOFTOP and a shorter place ID (something similar to ChIJrTLr-GyuEmsRBfy61i59si0).

Resuming aforementioned, the partial match flag in your example indicates that exact street address feature doesn't exist in the Google database.

This also can be confirmed by the following sentence in the documentation:

Partial matches most often occur for street addresses that do not exist within the locality you pass in the request.

https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses

You also have an option to report a missing address to Google following the help center:

https://support.google.com/maps/answer/6320846

I hope my answer addresses your doubt!

like image 142
xomena Avatar answered Sep 24 '22 21:09

xomena