API Quotas without any Application ID

2019-04-11 19:31发布

We know lots of API's are provided to us by anyone or any company to develop our applications. Some of them requires subscription and gives you an access token or a secret key etc. You can access and use these API's with these keys, and this keys make them understand how many accesses occured for a specific application. Until here, everything seems to be legit for me.

But, what about google apis? For example,

http://maps.googleapis.com/maps/api/elevation/xml?locations=48.3412,9.5479&sensor=true

This webservice(API) gives us the elevation for given coordinates. There is no key given in the string. But they also declares that they have some quotas(usage limits) and 2500 requests can be fulfilled for a day, otherwise it will stop working for you.

Assume, I have a phone application which calls this webservice as XML and parses it; or have a desktop application which does the same thing. So how will google be able to understand how many requests done for my phone application? Does my application send same identification stuff for different phones to Google? or This quota only valid for one machine?

I'm puzzled a bit, can you please enlighten me? Thanks

3条回答
Rolldiameter
2楼-- · 2019-04-11 19:43

These quotas work on a per-machine basis, so you've essentially got a quota per IP address.

查看更多
Anthone
3楼-- · 2019-04-11 19:51

Here is some hint I understood.

The following snippet is pasted from Elevation API's docs page.

The Elevation API may only be used in conjunction with displaying results on a Google map; using elevation data without displaying a map for which elevation data was requested is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.

Maps API only allow authorized requests. which means you are taking a key for this elevation API too.

ADDED

How will excess usage by a site be calculated and billed? Excerpt from this link

Excess usage over the usage limit for each Maps API service is calculated at the end of each day. If your site generates excess usage every day for 90 consecutive days we will notify you that you need to respond in one of the following ways: one, two, three....etc.

I think what matters here is a referer which gives the webapp domain name when the user accesses your webapp.. Now the question is what if I use another server of mine to get the elevation json and display on my webapp...

In an ethical sense, 3 requests per second on average, continuously - should be a great and big app - no one will save on the payments over such a traffic. Technically though, this question is still an unsolved one.

查看更多
聊天终结者
4楼-- · 2019-04-11 19:52

UPDATE:

According to the documentation (https://developers.google.com/maps/documentation/elevation/intro) Elevation API is no more allowed to work without API_KEY. Google implemented new free quota limit, with automatic billing over quota (or the possiblity to enable a "premium" plan)

Anyway, at September 2016 API_KEY is not yet really mandatory, Elevation API still works without API_KEY, but it takes count over a global quota limit. It happens quite often that at a request without API_KEY you get an "over_quota" or "server_busy" error. I think that they are reducing the global quota, because errors are going to be more frequent.

Here some info: https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update

OLD ANSWER:

I think Google use per IP quota, if no API-Key is specified.

I deduced it from here:

All Elevation API applications should use an API key. Including a key in your request:

  • Allows you to monitor your application's API usage in the Google Developers Console.
  • Enables per-key instead of per-IP-address quota limits.
  • Ensures that Google can contact you about your application if necessary.

at this link https://developers.google.com/maps/documentation/elevation

查看更多
登录 后发表回答