- Google Maps PHP API has a limit of 2500 geocode requests per day (https://developers.google.com/maps/documentation/geocoding/#Limits)
(This has been bothering me for a while, and I have researched it on more than one occasion and failed to find a solid answer)
I work in Maps for Business support at Google. The following is my personal opinion, not Google’s, but let’s just say I’m rather familiar with this topic!
- Initiate geocoding in response to user interaction, and you’ll be fine even if there are short request bursts (eg. click a button to geocode several addresses).
- Catch any OVER_QUERY_LIMIT errors and handle them gracefully (eg. exponential backoff). Here is some sample code in Python.
But please do not try to busy-loop the geocoder or hammer away at it for hours on end, there are protections against abuse.
As of 2017 the client side quota is calculated against corresponding web service quota. Please have a look at Christophe Roussy’s answer.
Always read the latest you can find on an official Google website for the proper API version, a dated stackoverflow answer is not an up-to-date reference !!!
Here is what it said when I wrote this answer:
Google Maps Geocoding API Usage Limits
2,500 free requests per day, calculated as the sum of client-side and
50 requests per second, calculated as the sum of client-side and
Enable pay-as-you-go billing to unlock higher quotas:
$0.50 USD / 1000 additional requests, up to 100,000 daily.
In general I think Google is happy as long as the queries come from real human users as this is of some value to them.
There are also ways to save a few requests by caching results for up to 30 days:
Client-side geocoding through the browser is rate limited per map
session, so the geocoding is distributed across all your users and
scales with your userbase.
So, what is rate limits per map session?
As geocoding limits are per user session, there is no risk that your
application will reach a global limit as your userbase grows.
Client-side geocoding will not face a quota limit unless you perform a
batch of geocoding requests within a user session. Therefore, running
client-side geocoding, you generally don’t have to worry about your
Ok, what is the limit? Here we go
With a rate limit or 10 QPS (queries per second), on sending the 11th
request your application should check the timestamp of the first
request and wait until 1 second has passed. The same should be applied
to daily limits.
Still not clear? me too.
This is the closet answer that I found from their document and it says “rate limit of 10 requests per second”
I don’t think a user session can send 10 requests per second, thus I consider it as limitless.
I asked this recently about the Places library (or rather, researched it and came to a conclusion):
Basically, it seems that Map loads with key are limited to 25,000 per day per domain (that might not be right, but i’m pretty sure thats the case).
Geocoding limits are limited in the following way:
2,500 if you’re using an API key without setting up billing
100,000 if you’re using an API key and have set up billing
If you’re doing server-side geocoding (pre-caching results or similar), then your geocoding is per domain, and you’re going to run out of requests pretty quickly. (i.e. in a similar vein to if you’re doing places requests using the REST API like so:
service = new google.maps.Geocoder();
then the limit (2,500 or 100,000 respectively), is per end-user, so your limit scales with your user base.
According to the article you linked (under When to Use Server-Side Geocoding):
The 2,500 request limit is per IP address.
So – what exactly do you mean by limit? Limit for the hosting application, or for a client running it?
The statement above tells me that there is no limit for the “host”; without a key or enforceable referrer URLs, there is no (good) way for Google to determine from whence a geocoding request originates. That’s kind of the beauty of REST, among other things.
It also tells me that even if they could enforce it, they haven’t set a limit. This would likely be counter-productive to their business model.