New Google Maps Platform - How do I set my own usage limits?

Ambulare picture Ambulare · May 11, 2018 · Viewed 11.4k times · Source

In their notifications about the new billing system for the Google Maps APIs, Google very clearly state that you "can set usage limits to protect against unexpected increases". However, I haven't found any documentation regarding how to set these usage limits against an API key. Does anyone know how to do this?

To clarify, I would like to set my own daily usage limits against my API key to prevent it ever going over the free threshold for the static maps API.

Answer

xomena picture xomena · May 13, 2018

I understand Google means that you can set your custom daily quota for each individual API in order to stay within free 200$, not a global per API key/project/Billing account daily quota. As far as I know there is no such thing as limit per daily usage in $ per Billing account yet.

There are alerts that you can establish in your Billing account and receive notifications if your usage is close to the defined budget. Have a look at the following document that explain how to set alerts:

https://cloud.google.com/billing/docs/how-to/budgets?hl=en

If your project uses only Static Maps API, it is easy to set daily quota to stay within 200$ per month. The price sheet says that you can have up to 100 000 free requests per month. That means 100 000 / 31 = 3225 free requests per day. You can go to Quota section of Static Maps API in your project

https://console.developers.google.com/google/maps-apis/apis/static-maps-backend.googleapis.com/quotas?project=YOUR_PROJECT_ID&duration=PT1H

and change your daily quota as shown in my screenshots

enter image description here

edit number requests per day

enter image description here

and you are set.

I hope this helps!