Cloud Cost Sense

Google Cloud API Gateway Cost: Calls, Egress, and Backends

Estimate Google Cloud API Gateway cost from monthly API calls, data transfer, backend compute, logging, monitoring, and retries.

Price API calls by billing-account tier

API Gateway charges for calls it reports to Service Control. The first 2 million API calls per month per billing account are free, calls from 2 million through 1 billion cost $3.00 per million, and calls above 1 billion cost $1.50 per million. Apply each tier progressively instead of multiplying every call by one rate, and confirm the current price if your billing currency is not USD.

Count requests at the gateway, not only successful backend responses. Client retries, polling, health traffic, rejected authentication attempts, and error responses can all increase the call total. Estimate normal traffic and a retry-heavy incident separately so a small failure rate does not hide a much larger request bill.

Add data transfer and the backend bill

Data transfer into Google Cloud is free, but data leaving Google through API Gateway uses Premium Tier data transfer pricing. Estimate response GiB from response size multiplied by successful calls, then separate internet, cross-region, and other chargeable paths. Large JSON responses and file delivery can make transfer cost more important than gateway calls.

The gateway fee does not include the service behind it. Add Cloud Run, Cloud Functions, App Engine, or other backend compute, plus database reads, storage operations, external API calls, and secrets access. Use caching, pagination, compression, and smaller response fields only where they preserve API correctness and freshness.

Budget for logs, metrics, and avoidable retries

API Gateway automatically produces request metrics, while Cloud Logging and Cloud Monitoring usage can create separate charges. Choose log sampling, exclusions, and retention intentionally, especially for high-volume successful requests. Keep enough error, latency, authentication, and request-correlation data to diagnose incidents without retaining every low-value payload.

Track gateway request count, response codes, latency, backend errors, response bytes, and retry rate together. A rising gateway bill may be valid growth, but it can also reveal aggressive polling, missing client backoff, duplicate submissions, or bots. Compare cost per successful business action rather than cost per raw request.

Add the Cloud Run backend cost behind your API Gateway estimate.