4

Have searched for answers on this for 2 days now with very little luck.

I'm developing a Drupal 7 site which has a Geofield field being autopopulated from an address field using the Google Geocoder API, but as of a couple of days ago this stopped working:

Exception: Google API returned bad status.\nStatus: OVER_QUERY_LIMIT in geocoder_google() (line 52 of /home/.../modules/geocoder/plugins/geocoder_handler/google.inc).

I can remove the proximity search filter that is sending too many requests to the Google API but I can't progress because I run into the above error every time I try to add a new record to the database (which just does one lookup to get a geocode from an address field but fails). Is there any way to unblock my site from Google's API or reset my usage? I've added an API key but to no avail. This was all working fine up until very recently, which I guess is when I unknowingly exceeded the usage limit.

I have limited API experience and am a Drupal/PHP beginner so please be gentle! Happy to provide more info, code, error messages etc if needed. Relevant Drupal 7 modules being used are OpenLayers, OpenLayers Proximity, Geofield, GeoPHP and Geocoder. Thanks for any help anyone can offer.

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
user1990405
  • 41
  • 1
  • 3
  • possible duplicate of [OVER\_QUERY\_LIMIT while using google maps](http://stackoverflow.com/questions/3529746/over-query-limit-while-using-google-maps) – Oldskool Jan 18 '13 at 12:49

1 Answers1

3

From Google Geocode Documentation:

Use of the Google Geocoding API is subject to a query limit of 2,500 geolocation requests per day. (User of Google Maps API for Business may perform up to 100,000 requests per day.) This limit is enforced to prevent abuse and/or repurposing of the Geocoding API, and this limit may be changed in the future without notice. Additionally, we enforce a request rate limit to prevent abuse of the service. If you exceed the 24-hour limit or otherwise abuse the service, the Geocoding API may stop working for you temporarily. If you continue to exceed this limit, your access to the Geocoding API may be blocked.

So, I guess you have to wait 24 hours, or upgrade to the business version.

CaffeinatedDave
  • 321
  • 1
  • 4
  • 8
  • Thanks CaffeinatedDave, I'd seen the Google usage documentation but the strange thing is that the usage reports panel shows no usage whatsoever! I'm still puzzled as to how it's reaching anywhere near the 2,500 daily quota (Google states this is 25,000?), and that's what I need to establish and fix rather than up my allowable limit which would be a temporary and unnecessarily costly workaround. – user1990405 Jan 21 '13 at 11:58
  • ...Anyway, today everything's working fine again - presumably the block has been lifted after a weekend of no site activity and no calls to the Google Geocoding API. However, it could fall over at any point when the site goes live so in the meantime I'm reluctantly going to switch off the OpenLayers Proximity search as that appears to be what's firing off the API requests, until I can find a better solution. Any Drupal/Geocoder/OpenLayers tips welcome... Thanks – user1990405 Jan 21 '13 at 11:58