views:

58

answers:

1

I'm using a autosuggestion for adresses through google maps API that I want to be as fast as possible.

Currently, I have added a 10ms delay to my script in order to avoid being banned for to many requests, is this necessary. How many requests can be made without getting banned?

Ps, i'd love some appropriate tags for this, I really can't come up with anything good.

+1  A: 

I'm not sure if I fully understand your question. But in any case Google Maps like most other APIs has a limit on the number of requests you are allowed to perform daily:

You have a limit of 2,500 requests per day per IP for geocoding requests made by a regualr user, see here. If you are a premier user the limit is 100,000 requests per day per IP, however, you have a 15,000 requests/day limit when using the Javascript API or the Flash Maps API, see here.

As for too many requests at the same time, since it depends on the load google allow on their servers (which may change) I recommend you do what google suggested in the above document.

Query as much as you can and when you receive a 620 error code throttle back the speed of your requests. If you do that you will be able to dynamically determine how many requests they will allow you to do in any given time.

Unless someone can provide you with a hard limit... I know the hard limit specified in the premier user faq is said to be 10 requests/second:

"These limits apply to each Maps API Premier client id and must be shared across all applications and IP addresses using a given client id. There is also a rate limit of 10 requests per second that applies to all Google Maps API Web Services. If you need higher usage limits, please contact your Maps API Premier Account Manager for purchase information."

Asaf