Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Is there a way to make 100% sure I'm not charged for Google Maps API beyond the free £200 monthly?

I've built a wordpress site that uses the following Google APIs:
- Places API
- Geocoding API
- Maps Javascript APIs

My site is only meant as a demo so is unlikely to ever have anything like a high amount of requests. However, I'm looking for a way or a setting that will mean I can be 100% sure that I won't ever be charged for using the Google Maps API beyond the free £200 monthly allocated credit amount? E.g. in case of DDOS attacks or other unexpected spikes in requests.

I don't mind if the solution means that my API config is deleted if the credit amount is ever exceeded, as like I said, I see this as being very unlikely under normal circumstances. The more straightforward the solution, the better as I don't want to find I've made a small mistake that means I'm suddenly charged a large unexpected amount.

Any help would be greatly appreciated.

Thanks

1 2 815
2 REPLIES 2

Hi @ontheline4321 ,

You have to set up a budget and billing alerts by following this documentation. It will help you monitor your usage and get notified when you approach or exceed your allocated credit.

When you create a budget, you'll get alerts as you get close to the free £200 credit limit. If you set the alert to 100%, you'll be notified when you reach the given credit limit. Then, you can decide to turn off the APIs or do what's needed to avoid extra charges.

Let me know if this helps.

@ontheline4321 

1) Note that the alert might not come when you hit £200 exactly because it's quite possible that the cumulative cost of your use will exceed that amount i.e. imagine that your current consumption is £190 and the next smallest consumption you make is £15 which takes you to £205.

2) The alert could also come at an inconvenient time and you don't see it immediately

3) Based on the above two factors, you should set the alert for a percentage which is lower than your budget e.g. £160, £180

4) You can also create a Google Cloud Function to turn off the API when it gets to a certain percentage of your budget. We have a blog article explaining how to do this for Google App Engine. You can look at it and tweak it for the API you're interested in 

 

... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine
    & Datastore Emulator