Google Places API限制 [英] Google Places API Limits

查看:318
本文介绍了Google Places API限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 Google Places Autocompleter 。它完美的工作,我尝试使用提供的代码。不过,我看到他们提到了每个API密钥的限制。首先,我没有一个API密钥,它的工作原理。其次,他们是否限制每个客户端IP(浏览我的网站的浏览器),每个域或其他什么东西?我没有看到关于没有API密钥的限制吗?



如果他们限制每个域名,sub1.domain.com和sub2.domain.com会有相同的限制吗?



我似乎无法在Google文档中找到任何关于此的信息,这就是我在这里问的原因。感谢!



编辑:所以我注册了一个API密钥,但他们不告诉我要在哪里包含它以使用Places Autocomplete?

$ b $就关键而言,它仅适用于Places网络服务:

maps / documentation / places /rel =noreferrer> https://developers.google.com/maps/documentation/places/



您的文档链接指向Places库 - 这是JavaScript API v3的一项服务。一个关键不是必需的,但是当你加载Maps JS时(& key = {yourkey} /developers.google.com/maps/documentation/javascript/tutorial#HelloWorldrel =noreferrer> https://developers.google.com/maps/documentation/javascript/tutorial#HelloWorld )。


  • 放置Web服务:需要密钥

  • 放置JavaScript服务:无需密钥


我不知道特定的自动完成限制,但JS API有限制这里提到: https://developers.google.com/maps/documentation/javascript/usage 。基本上,每天25,000地图加载,如果需要,可以选择购买更多。



希望有帮助。


I am looking into the Google Places Autocompleter. It works perfectly, I tried using the code provided.

However I see they mention something about limits per API key. First of all, I don't have an API key, and it works. I dont see a limit regarding no API keys?

Secondly, do they limit per client IP (the browser that is viewing my site), per domain, or something else?

If they limit per domain, will sub1.domain.com and sub2.domain.com share the same limit?

I can't seem to find anything regarding this in the Google documentation, which is why I am asking here. Thanks!

Edit: So I signed up for an API key, but they dont tell me where to include it to use the Places Autocomplete?

解决方案

As far as the key is concerned, it's only required for the Places web service: https://developers.google.com/maps/documentation/places/

Your doc link is to the Places library - that's a service of the JavaScript API v3. A key isn't required there, though you can include one by adding &key={yourkey} when you load the Maps JS (https://developers.google.com/maps/documentation/javascript/tutorial#HelloWorld).

So:

  • Places web service: key required
  • Places JavaScript service: no key required

I don't know about specific autocomplete limits, but the JS API has limits mentioned here: https://developers.google.com/maps/documentation/javascript/usage. Basically, 25,000 map loads per day, with the option to purchase more if required.

Hope that helps.

这篇关于Google Places API限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆