为什么Google Geocoding API在没有密钥的情况下可以工作? [英] Why does the Google Geocoding API work without key?
问题描述
我正在阅读Google Geocoding API的文档,并且注意到它说地理编码请求中需要一个密钥,但是当我执行" https://地图时. googleapis.com/maps/api/geocode/json?address=LosAngeles,美国",它给了我预期的结果.
I'm reading the documentation for the Google Geocoding API, and I noticed that it says that a key is required in a geocoding request, but when I do "https://maps.googleapis.com/maps/api/geocode/json?address=LosAngeles,usa" it gives me the expected result.
这是为什么?文档是否有误?一定数量的请求后,它会开始询问密钥吗?还是我不了解的东西?
Why is this? Is the documentation wrong? Will it start asking for the key after a certain amount of requests? Or is there something I'm not understanding?
推荐答案
大多数地理编码API请求都不需要提供密钥.如果您不提供密钥,则Google将使用基于IP的配额来确定您何时达到每日2,500个查询的限制.
Providing a key is not required for most geocoding API requests. When you do not provide a key, Google will use an IP-based quota to determine when you reach the 2,500-queries daily limit.
某些参数需要为密钥,并且不允许基于IP的配额.这些在文档中明确标记为:
Some parameters require a key and will not allow IP-based quota. These are explicitly marked in the documentation with:
注意:该参数仅适用于包含API密钥或客户端ID的请求.
Note: This parameter is available only for requests that include an API key or a client ID.
当前,这仅适用于反向地理编码中的两个参数:result_type
和location_type
.
Currently, this is only for two parameters in reverse geocoding: result_type
and location_type
.
这篇关于为什么Google Geocoding API在没有密钥的情况下可以工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!