Cloud Billing Budget API logo

Cloud Billing Budget API

Cloud Billing Budget API

Cloud Billing Budgets API programmatically creates and manages GCP budget alerts — set thresholds, configure notification channels, monitor across projects.

Visit site ↗Health checked 9h ago
Use it when

Replaces manual console configuration — batch-manageable

Watch for

Alerts have lag (hours) — not suitable for real-time hard limits

First check

POST /v1/billingAccounts/{billingAccount}/budgets to create — specify amount, scope (project/service), and thresholds (e.g. 50%, 90%, 100%).

Auth
CORS
No
HTTPS
Yes
Signup
?
Latency
40 ms
Protocol
REST
Pricing

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 40ms
01

About this API

GCP doesn't have "hard spending limits" (auto-shutoff on overrun), so budget alerts are the main cost-control tool. Billing Budgets API lets you script budget management — configure 50%/90%/100% alert thresholds for each project, with notification channels (email, Pub/Sub topic). Most powerful use: combined with Cloud Functions for auto-response — when budget exceeds 100%, Pub/Sub triggers a Function that auto-disables all billable services in the project (great for dev/test environments to prevent runaway costs). Also supports forecasted-spend mode — based on month-to-date trend, alerts days in advance. Compared to console UI configuration, the API's value is "auto-configure standard budgets for each new project".

02

What you can build

  • 1Set budget alerts for each GCP project
  • 2Auto-create standard budgets for new projects in CI/CD
  • 3Centrally view all budgets and consumption
  • 4Trigger Pub/Sub for auto-response (e.g. disable project on overrun)
03

Strengths & limitations

Strengths

  • Replaces manual console configuration — batch-manageable
  • Notifications via email, Pub/Sub, and auto-disable actions
  • Forecasted spending triggers early alerts

Limitations

  • Alerts have lag (hours) — not suitable for real-time hard limits
  • Cannot directly cap spending — only alerts/notifications
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://google.com/<endpoint>
05

Getting started

POST /v1/billingAccounts/{billingAccount}/budgets to create — specify amount, scope (project/service), and thresholds (e.g. 50%, 90%, 100%).

06

FAQ

Can I auto-shutdown a project when budget is exceeded?+

Not directly. Combine Pub/Sub + Cloud Function: budget exceeded → Pub/Sub message → Function calls Billing API to unlink the billing account.

How accurate are budget alerts?+

GCP spending data typically updates within 24 hours. Short-term alerts may lag (e.g. a recent spike may not trigger for hours).

07

Technical details

CORS: NoHTTPS: YesSignup: ?Open source: No
Auth type
unknown
Pricing
unknown
Protocols
REST
SDKs
python, javascript, go, java
Response time
40 ms
Last health check
5/12/2026, 7:37:30 AM
08

Tags

09

More from Google