Cloud Pricing API?

Anyone here with experience working with cloud resource pricing API for Google Cloud?

I'm building an Open Source application that will try to use these and I'm looking for some advice.

2 2 2,980
2 REPLIES 2

Hi @regnard ,

The key API you would typically work with is:

  • Google Cloud Billing Catalog API: This API gives you access to Google Cloud’s pricing details for different services.
  • List Services: Retrieve all the available services you can bill for (e.g., Compute Engine, BigQuery, Cloud Storage, etc.).
  • List SKUs: Get a list of specific SKUs (pricing units) for each service. This includes the prices associated with different resource types, locations, and configurations (e.g., pricing for a specific region or storage class).

    Reference doc:
  • https://cloud.google.com/billing/docs/reference/rest

Hello @regnard,

 Key Recommendations for Cloud Pricing API Integration as below:

  1. API Selection
    • Use the Cloud Billing Catalog API (cloudbilling.googleapis.com) for SKU-level pricing data.
    • For real-time cost tracking, pair with the Cloud Billing Reports API (BigQuery exports recommended).
  2. Authentication & Quotas
    • Design for least-privilege service accounts (roles: billing.viewer).
    • Implement exponential backoff for quota limits (default: 60 queries/minute).
  3. Cost Optimization
    • Cache pricing data (refresh every 24h; SKUs change infrequently).
    • Use regional pricing tiers (e.g., us-central1 vs. europe-west4).
  4. Open-Source Considerations
    • Avoid hardcoding API keys (use secret management like Secret Manager).
    • Provide fallback datasets for users without billing access.

I hope above pointers helped! 🙂

Best regards,

Suwarna