Get publicly available Google Cloud pricing information (original) (raw)

Skip to main content

Get publicly available Google Cloud pricing information

This page shows you how to use the Cloud Billing Catalog API to:

If you have custom contract pricing, you can use thePricing APIto get prices that are applicable to your Cloud Billing account.

Before you begin

Before you can use the Cloud Billing Catalog API, you'll need to enable the Cloud Billing API and get an API key.

Enable the Cloud Billing API.

Roles required to enable APIs

To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

Enable the API

When you are prompted to confirm the Google Cloud project you intend to use for the Cloud Billing Catalog API, we recommend you use a project that is set up to contain all of your FinOps and billing administration needs for a Cloud Billing account, including where the Cloud Billing API is enabled.

Learn more about the benefits to using a FinOps-focused projectfor your billing administration use cases.

Get an API key

Calling the Cloud Billing Catalog API requires an API Key. You can find details about API Keys inUsing API Keys.

Listing public services from the catalog

In this step you will get a list of all public services including relevant metadata about each service.

The following code snippet lists all public services in the catalog.

Request:

GET https://cloudbilling.googleapis.com/v1/services?key=<var>API_KEY</var>

Response:

{
  "services": [
    {
      "name": "[SERVICE_NAME]",
      "serviceId": "[SERVICE_ID]",
      "displayName": "[DISPLAY_NAME]",
    },
    [...]
  ],
  "nextPageToken": "[NEXT_PAGE_TOKEN]"
}

Where:

Results are paginated, and are limited to 5000 SKUs per page. The response includes a nextPageToken that you can use to get the next 5000 results. To fetch the next batch, set pageToken=[NEXT_PAGE_TOKEN]. To reduce the number of SKUs per page, setpageSize=[CUSTOM_PAGE_SIZE]. When all items have been listed, no token is returned.

Getting the list of SKUs for a service

The following code snippet lists the SKUs in the catalog for the specified service:

Request:

GET https://cloudbilling.googleapis.com/v1/services/SERVICE_ID/skus?key=<var>API_KEY</var>

Where:

Response:

{
  "skus": [
    {
        "name": "[SKU_NAME]",
        "skuId": "[SKU_ID]",
        "description": "[SKU_DESCRIPTION]",
        "category": {
            "serviceDisplayName": "[SVC_DISPLAY_NAME]",
            "resourceFamily": "[FAMILY]",
            "resourceGroup": "[GROUP]",
            "usageType": "[USAGE]",
        },
        "serviceRegions": [
          "[REGION]"
        ],
        "pricingInfo": [
          {
              "effectiveTime": "[TIME]",
              "summary": "[SUMMARY]",
              "pricingExpression": {
                  "usageUnit": "[USAGE_UNIT]",
                  "usageUnitDescription": "[USAGE_UNIT_DESCRIPTION]",
                  "baseUnit": "[BASE_UNIT]",
                  "baseUnitDescription": "[BASE_UNIT_DESCRIPTION]",
                  "baseUnitConversionFactor": [BASE_CONVERSION_FACTOR],
                  "displayQuantity": [DISPLAY_QUANTITY],
                  "tieredRates": [
                    {
                        "startUsageAmount": [START_AMOUNT],
                        "unitPrice": {
                            "currencyCode": "[CURRENCY_CODE]",
                            "units": [UNITS],
                            "nanos": [NANOS],
                        },
                    }
                  ],
              },
              "aggregationInfo": {
                  "aggregationLevel": enum("[AGGREGATION_LEVEL]"),
                  "aggregationInterval": enum("[AGGREGATION_INTERVAL]"),
                  "aggregationCount": [AGGREGATION_COUNT],
              },
              "currencyConversionRate": [CONVERSION_RATE],
          }
        ],
        "serviceProviderName": "[SERVICE_PROVIDER]",
        "geoTaxonomy": {
          "type": "[TAXONOMY_TYPE]",
          "regions": [
          "[REGION]"
        ]
      }
    }
  ],
  "nextPageToken": "[NEXT_PAGE_TOKEN]"
}

Where:

The cost of the SKU is units + nanos. For example, a cost of $1.75 is represented as units=1 and nanos=750,000,000.

Results are paginated, and are limited to 5000 SKUs per page. The response includes a nextPageToken that you can use to get the next 5000 results. To fetch the next batch, set pageToken=[NEXT_PAGE_TOKEN]. To reduce the number of SKUs per page, setpageSize=[CUSTOM_PAGE_SIZE]. When all items have been listed, no token is returned.

Pricing and SKU information is also available in thepricing table reportor theCloud Billing pricing export to BigQuery.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-06-15 UTC.