MahaVailo27
MahaVailo27

Reputation: 11

Setting a Google Places API quota?

I'm working on a project using the places api and I'm trying to stay in the free tier. The docs mention setting a daily limit, but the free-tier counts monthly quotas. If I set a 10k daily quota and I use it across different days in the month, will my 10k limit be enforced for the whole month or will I still be able to go over budget?

Upvotes: 0

Views: 2295

Answers (1)

Ricky Cuarez
Ricky Cuarez

Reputation: 768

For questions such as these that doesn't involve coding issues/errors, it is best if you file a support ticket to them directly here. So moving forward, please use their channel instead. They will be able to address all your concerns regarding billing, pricing, free trial, setting limits and API level errors.

Now, if you wish to stay within, say, the $200 free credit you get per month upon enabling billing, there are a couple of things you can do.

  1. Budget Alerts
  • Set a budget alert to warn you when you exceed your budget.

Note: this is not a hard cap on your bill, but an alert mechanism. The steps to do that are on the Billing documentation

To set up actual limits:

  1. Set a Per API Daily Limit
  • For each API, you can set limits that are handled on a daily not monthly basis. The full guide can be found here. For the calculation on what the right limit should be, please take note of the tip in the link above.

You can use a simple equation to determine your daily cap depending on how much you want to spend. For example:

(Monthly spend / price per each )/30 = requests per day cap (for one API). 

Note that your implementation may use multiple billable APIs, so adjust your equation as needed.

For instance, if you only use, say, the Maps JavaScript API, which has a cost of $7 per 1,000 loads, see this pricing sheet for your reference, you can issue 28,000 free loads per month. If you cap your Maps JavaScript API daily quota to 903 (i.e. 28,000 / 31), you will not be charged. Note that your application will run into errors once that limit is reached. Here are the steps for your convenience:

  1. Go to your dashboard: https://console.cloud.google.com/home/dashboard and click "Go to API's overview"
  2. Select the API
  3. Click quotas
  4. Under the Map Loads or Requests or Elements section (depending on the API you chose) at the very bottom, set your daily limits

Upvotes: 3

Related Questions