APIGatewayCost.com

How to Reduce Your API Gateway Bill

10 strategies organized by effort and impact. Quick wins you can implement today, architecture changes for next sprint, and procurement tactics for next quarter. Most teams can cut their API gateway bill by 30-60%.

Tier 1: Quick Wins (20-40% savings)

Implement in minutes to hours. No architecture changes required.

1

Switch AWS REST API to HTTP API

70% on request charges

AWS HTTP API costs $1.00/million vs $3.50/million for REST API. Most workloads (Lambda proxy, JWT auth, CORS) work identically on HTTP API. Migration requires updating the API type in CloudFormation/Terraform and testing. No backend code changes.

Example: 100M requests/month: REST API = $350, HTTP API = $100. Savings: $250/month ($3,000/year).

2

Enable response compression

60-80% on data transfer

Enable gzip or brotli compression at the gateway level. JSON API responses typically compress 70-85%. This directly reduces data transfer costs, which are often the largest portion of the bill at scale.

Example: 100M requests at 20 KB avg payload: uncompressed = $172/month data transfer. With 75% compression = $43/month. Savings: $129/month.

3

Use gateway-level caching

10-50% on request + transfer costs

Cache responses for endpoints that return the same data for identical requests (product catalogs, configuration, reference data). Even a modest cache hit rate dramatically reduces both request charges and data transfer.

Example: 1 GB cache on AWS = $20/month. If 30% of 100M requests hit cache, you save 30M request charges ($30) + data transfer ($29). Net saving: $39/month.

4

Leverage free tiers strategically

100% for small workloads

Cloudflare: 3M requests/month free forever. Kong: 1M requests/month free forever. AWS: 1M requests/month free for 12 months. For dev/staging environments and small APIs, route through free-tier providers instead of your production gateway.

Example: Dev API at 500K requests/month: route through Cloudflare free tier instead of AWS. Savings: $50/month.

Tier 2: Architecture Changes (15-30% savings)

Requires development work. Plan for next sprint or quarter.

5

Implement request batching

20-50% on request charges

Instead of making 10 individual API calls, batch them into a single request with multiple operations. This reduces the number of gateway calls by the batch size. Works well for read-heavy workloads where clients fetch multiple resources.

Example: Client fetches 5 resources per page load. Batching: 5x fewer gateway calls = 80% reduction in request charges for that flow.

6

Use field selection / sparse responses

30-60% on data transfer

Implement GraphQL-style field selection or query parameters that let clients request only the fields they need. Reduces payload sizes, which directly reduces data transfer costs. JSON payloads with 10 fields where the client needs 3 are 70% oversized.

Example: Full product response: 15 KB. With field selection: 4 KB. At 50M requests/month: data transfer drops from $68 to $18. Savings: $50/month.

7

Route internal traffic differently

20-40% on total gateway costs

Not all API traffic needs to go through the paid gateway. Internal service-to-service calls within the same VPC can use a service mesh (Istio, Linkerd) or direct calls. Reserve the API gateway for external-facing traffic only.

Example: 60% of your 100M monthly calls are internal. Routing internal calls through a service mesh: 60M fewer gateway calls. Savings: $60/month on AWS HTTP API.

Tier 3: Procurement Strategies (30-60% savings)

Requires vendor conversations. Plan for next budget cycle.

8

Negotiate enterprise pricing

40-70% off list price

All six providers offer custom pricing for large volumes. Committed annual contracts with minimum spend guarantees unlock the deepest discounts. The threshold for negotiation is roughly $5,000/month in gateway spend.

Example: At $10,000/month list price, a 50% enterprise discount saves $5,000/month ($60,000/year). Even a 30% discount saves $36,000/year.

9

Evaluate Cloudflare as primary gateway

80-90% vs AWS

Cloudflare API Gateway costs $0.15/million requests with zero data transfer charges. For public-facing REST APIs, this is 85-95% cheaper than AWS. The trade-off: no native AWS service integration (Lambda, SQS). If your backend is containerized or serverless beyond AWS, Cloudflare is worth serious evaluation.

Example: 100M requests/month at 10 KB avg: AWS HTTP API = $195. Cloudflare = $15. Annual savings: $2,160.

10

Consider self-hosted for high volume

30-50% at 500M+ req/mo

At very high volumes (500M+ requests/month), self-hosting Kong OSS or Traefik eliminates per-request charges. You pay infrastructure costs ($400-800/month) and engineering time (8-16 hrs/month). The break-even depends on your engineering cost and current provider.

Example: 500M requests on AWS HTTP API = $947/month. Self-hosted Kong on Kubernetes = $600/month infra + ~$1,600/month eng time. Only worth it if you already have a platform team.

Before and After: 3 Scenarios

Startup (10M requests/month on AWS REST API)

Before

$35/month (REST API) + $9/month (data transfer) = $44/month

After

Switch to HTTP API + enable compression: $10 + $2 = $12/month

$32/month (73% reduction)

Growth (100M requests/month on AWS HTTP API)

Before

$100/month (requests) + $95/month (data transfer) = $195/month

After

Switch to Cloudflare: $15/month total (zero data transfer)

$180/month (92% reduction)

Enterprise (500M requests/month on Azure Standard)

Before

$677/month (flat tier) + $41/month (data transfer) = $718/month

After

Negotiate 40% discount + enable compression: $406 + $10 = $416/month

$302/month (42% reduction)

Frequently Asked Questions

What is the fastest way to reduce API gateway costs?
Switch from AWS REST API to HTTP API. This single change saves 70% on request charges with no code changes for most workloads. If you are already on HTTP API, enable response compression (gzip/brotli) to reduce data transfer costs by 60-80%.
How much can I save by switching to Cloudflare?
Cloudflare charges $0.15/million requests (vs AWS HTTP API $1.00/million) with zero data transfer fees. At 100M requests/month with 10 KB payloads, switching from AWS HTTP API to Cloudflare saves roughly $180/month ($195 to $15). The savings increase with traffic volume and payload size.
Is caching worth the cost?
Almost always yes. A 1 GB cache on AWS costs $20/month. If that cache serves even 10% of your requests (10M out of 100M), you save $10 in request charges and $9.50 in data transfer, paying for itself. The ROI increases with traffic volume and cache hit rate.
When should I negotiate enterprise pricing?
Contact the vendor when you spend over $5,000/month on API gateway fees. Discounts of 40-70% off list price are common for 1-3 year committed contracts. At $10,000/month list price, a 50% enterprise discount saves $60,000/year.