0
votes

How can I use the Google Cloud Billing APIs to retrieve my total expected bill / accumulated bill so far?

Is there an API call that simply returns the cost so far for a certain billing account?

Or alternatively, a combination of calls - one for retrieving the usage data and the other with the prices for the various Google Cloud services - to calculate the costs myself?

Thank you

2

2 Answers

-1
votes

Yes, there is an API to accomplish what you want.

You can control costs, track expenses and create alerts to notify billing administrators following this guide

Based on the comment below Alexandre answer, You can get programmatic budget notifications using Google Cloud Billing API setting up budget notifications as described in this tutorial.

I suggest you to start trying the quickstart, which performs simpler API calls.