最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How many requests can be made to Google Maps API without being banned? - Stack Overflow

programmeradmin0浏览0评论

I'm using an autosuggestion for addresses 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 too many requests. Is this necessary? How many requests can be made without getting banned?

P.S. I'd love some appropriate tags for this, I really can't e up with anything good.

I'm using an autosuggestion for addresses 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 too many requests. Is this necessary? How many requests can be made without getting banned?

P.S. I'd love some appropriate tags for this, I really can't e up with anything good.

Share Improve this question edited Oct 6, 2011 at 2:59 Ellie K 9031 gold badge18 silver badges36 bronze badges asked Aug 29, 2010 at 13:51 HimmatorsHimmators 15k39 gold badges136 silver badges232 bronze badges 4
  • 1 Windows isn't going to give you much better than 15ms resolution anyway. That seems way too fast; have you tried what the interface feels like at 100ms? Also, when somebody's typing fairly fast, it's likely that they're not paying attention to auto-suggest anyway. Perhaps you could also monitor keystrokes and only try to auto-suggest when keystrokes are more than 250ms apart. – Pointy Commented Aug 29, 2010 at 14:04
  • The api adds some additional delay, and so does the API, i'm pretty new to javascript and trying to cut the low haning fruit of custumisation. You could try the script in any of the two topp fileds (till and från) on dev.resihop.nu it only works in webkit (and maybe IE) right now for some reason... – Himmators Commented Aug 29, 2010 at 14:13
  • It actually seems to work pretty well for me (google chrome on linux) as it is. I'm not a good usability test subject because I'm a web developer, however. – Pointy Commented Aug 29, 2010 at 14:23
  • I believe it's to slow, the value in that field has to contain an adress from that dropdown to validate, and a lot of people pletet their input and go to the next input before the suggestion box even appear. – Himmators Commented Aug 29, 2010 at 14:31
Add a ment  | 

3 Answers 3

Reset to default 2

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 remend 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."

This information has probably changed since @Asaf answered the question on 29 August 2010, certainly for regular users (non-Premier), as there were updates effective 1 October 2011 for usage of Google Maps API. These are the new limits for non-Premier users:

From October 1st 2011, mercial web sites and apps using the Maps API at no cost may generate:

  • max of 2,500 calls/day, if modified using Styled Maps feature
  • max of 25,000 calls/day in total

There are currently no limits on the number of web based JavaScript or Flash maps a site can generate. The Google Maps API Web Services and Google Static Maps API do have daily limits that are specified in their documentation. Also

Non-profits and applications deemed in the public interest (as determined by Google at its discretion) are not subject to these transaction limits.

Criteria for applications deemed in the public interest follow.

Also, Google says that your app won't just stop working if you exceed usage limits, but you WILL be contacted by a "Maps API Premier sales manager" if your site qualifies for and consistently exceeds the free usage allowances.

Final suggestion: The GeoCoding Strategies section for regular users, which mentions how often you can submit requests before getting flagged and uses of caching, server side requests etc. hasn't been updated since June 2010. It might be worth glancing at that link. @Asaf didn't include it specifically in his (very fine answer), although I found it on a page that he did provide the URL for.

Check below Google documentation regarding Google Map Api Usage Limit:

https://developers.google./maps/documentation/business/faq#usage_limits

https://developers.google./maps/documentation/business/articles/usage_limits

http://maps.google.co.in/help/maps/getmaps/pare.html

发布评论

评论列表(0)

  1. 暂无评论