Why am I OVER_QUERY_LIMIT when using Google's Geocoder API?

匆匆过客 提交于 2020-01-07 04:02:19

问题


I have this application that lets me put in an address and get the lat/lng via Google's Geocoding API. I use AJAX to call a PHP script which creates the Google Geocoder API call, it looks like this:

    $base_url = "http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=";
    $address = urlencode($addy1 . ' ' . $addy2);
    $url = $base_url.$address;

where $addy1 is the street address and $addy2 is the City/State/Zip in the proper format for geocoding.

When I perform a file_get_contents on that $url, I consistently get a 'status'=>OVER_QUERY_LIMIT.

I do not come even close to reaching the 2500 query limit per day. I have tried maybe 15 different addresses so far today, and I didn't work at all yesterday.

As an aside, we have been having this issue since Monday morning. We did recently move the application to a cloud solution. Is it possible that we are receiving an OVER_QUERY_LIMIT due to the nature of shared IP's on the cloud?

I don't have any other solutions for this. Using an API Key ends with a REQUEST_DENIED response, since the Geocoding API doesn't use an API Key


回答1:


We have been having this issue since Monday morning. We did recently move the application to a cloud solution. Is it possible that we are receiving an OVER_QUERY_LIMIT due to the nature of shared IP's on the cloud?

This is the most likely answer. Can you move the geocoding to the client side?

EDIT: another option would be to see if you can get a dedicated IP address for your server that does the geocoding.

Similar query from 2011



来源:https://stackoverflow.com/questions/11348870/why-am-i-over-query-limit-when-using-googles-geocoder-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!