Hidden API Gateway Costs
The headline per-million-requests price is only the beginning. These six cost categories routinely cause API gateway bills to run 2x to 4x higher than initial estimates. Understand them before you choose a provider.
Real-world cost breakdown at 50M requests/month (10 KB avg payload)
Data Transfer Fees
high impactData transfer is the most commonly overlooked API gateway cost. Providers charge for outbound traffic to the internet, typically $0.07 to $0.09 per GB. At scale this dominates the bill.
100M requests per month with 20 KB average response = 2,000 GB outbound = $180/month in data transfer on AWS, on top of request charges.
Minimise payload sizes through field selection and compression. Enable gzip/brotli response compression at the gateway level. Use pagination to reduce response sizes.
WAF and Security Add-ons
medium impactWeb Application Firewall protection is often a separate charge on managed gateways. If you are running a public API, you almost certainly need WAF to protect against injection attacks, DDoS, and bot abuse.
AWS WAF charges $5/month per web ACL plus $1/million requests processed. On 50M requests that is $55 in WAF fees added to your gateway bill.
Evaluate whether the cloud-native WAF is more cost-effective than a third-party WAF service. Cloudflare's WAF is included in the Pro plan at a flat fee, which often undercuts per-request WAF pricing at volume.
Response Caching Costs
medium impactCaching frequently-requested responses at the gateway reduces backend load and latency. However, dedicated cache capacity is charged per GB per hour on most platforms, creating a persistent monthly cost.
AWS API Gateway stage cache at 0.5 GB cache capacity costs $0.028/hour = $20.16/month. A 6.1 GB cache costs $175/month, charged even during zero-traffic periods.
Use cache capacity only for genuinely high-traffic endpoints. Set appropriate TTLs to avoid stale data. Consider Cloudflare's edge caching (free) or Redis at the backend layer as alternatives.
Custom Domain and SSL
low impactMapping a custom domain (api.yourcompany.com) to an API gateway requires TLS certificate provisioning and DNS configuration. Most providers handle this automatically but some charge for it.
Most providers include custom domains in the base price. AWS API Gateway charges nothing extra for custom domains but requires ACM certificate setup. Some enterprise tiers include advanced features like SNI and mutual TLS validation.
Use ACM (AWS) or the provider's built-in certificate manager for free TLS. Avoid third-party certificate management unless you have specific compliance requirements.
WebSocket Connection Fees
low impactWebSocket APIs incur separate pricing from REST/HTTP APIs. You pay for connection minutes and for messages sent in both directions, which can add up for real-time applications with long-lived connections.
AWS API Gateway WebSocket: $0.25 per million connection minutes + $1.00 per million messages. A chat app with 1,000 concurrent users connected for 8 hours/day sends 5M messages/month: $5 in messages + $12 in connection fees.
For WebSocket workloads at scale, consider Cloudflare Durable Objects or a dedicated real-time service like Ably or Pusher, which often offer simpler per-connection pricing.
Support Plan Costs
medium impactProduction API gateways typically require at minimum a developer support plan for SLA-backed response times on issues. Cloud provider support plans start at $29/month but enterprise plans can exceed $15,000/month.
AWS Business Support plan: the greater of $100/month or 10% of monthly charges. At $2,000/month in gateway costs, that is $200/month in support fees, a 10% uplift that is easy to miss in budget planning.
Factor support costs into your total cost of ownership analysis. Self-hosted gateways have zero cloud support costs but shift the burden to internal engineering teams.
Always model total cost of ownership
Build a spreadsheet with all six cost categories before choosing a provider. At 100M requests/month the spread between the cheapest and most expensive total bill can exceed $500/month. Use the cost calculator on the home page to model your specific usage pattern.