API Limits and Quotas

Understanding rate limits, storage quotas, and data size restrictions to optimize your game's API usage

What you'll learn:

  • • Rate limiting for different API endpoints and how to handle them
  • • Storage quotas by subscription tier (Free, Pro, Enterprise)
  • • Maximum data sizes for saves, events, and configuration values
  • • Best practices for staying within limits and optimizing usage
  • • How to monitor usage and troubleshoot limit-related errors

Rate Limits

Per-API Key Request Limits

Rate limits are enforced per API key to ensure fair usage and system stability

Endpoint Method Limit Purpose
Player Saves PUT 100/minute Save game progress
Player Loads GET 200/minute Load game progress
Analytics Events POST 500/minute Track player behavior
Live Config GET 60/minute Fetch configuration
Authentication POST 120/minute Player login
Dashboard API endpoints have higher limits (100-300/minute) as they're used for management, not gameplay.

Rate Limit Response Headers

Every API response includes headers to help you track your usage:

When Rate Limit is Exceeded

Data Size Limits

Maximum Data Sizes per Request

Individual request size limits to ensure optimal performance and prevent abuse

Data Type Maximum Size Description
Player Saves 10 KB JSON data per save operation
Analytics Events 1 KB Per individual event including properties
Event Properties 512 B Properties object only, nested objects allowed

Data Size Exceeded Response

Storage Quotas by Tier

Total Storage Limits per Game

Maximum total storage for all player saves and analytics events combined

Tier Storage Limit Estimated Capacity Features
Free
Perfect for prototypes
10 MB ~1,000 saves, ~10,000 events Automatic cleanup, Best effort backup
Pro Recommended
For growing games
100 MB ~10,000 saves, ~100,000 events Priority support, Daily backups
Enterprise
For AAA studios
1 GB ~100,000+ saves, ~1M+ events Dedicated support, Real-time backup

Storage Usage Headers

API responses include storage usage information to help you monitor your quota:

Storage Quota Exceeded Response

Best Practices & Monitoring

Staying Within Limits

Strategies for efficient API usage and monitoring your consumption

Rate Limit Best Practices

  • • Implement exponential backoff with jitter for retries
  • • Batch analytics events instead of sending individually
  • • Cache config values locally and check for updates periodically
  • • Monitor rate limit headers and adjust request patterns
  • • Use offline queuing for saves when rate limited

Storage Optimization

  • • Use efficient JSON structures (avoid deeply nested objects)
  • • Store only essential game state, not UI preferences
  • • Implement local data pruning for old analytics events
  • • Monitor storage usage headers to track consumption
  • • Consider data compression for large save files

Example: Handling Rate Limits in Code

Troubleshooting Limit Issues

Getting frequent 429 rate limit errors

Your app is making too many requests. Implement request queuing and respect the rate limit headers.

Save data rejected with "Data too large" error

Your save data exceeds the 10KB limit. Optimize data structure or split into multiple saves.

Storage quota exceeded errors

Your game has reached the storage limit for your tier. Consider upgrading your plan or implementing data cleanup strategies.

Analytics events being rejected

Individual events exceed 1KB or properties exceed 512B. Reduce event payload size or frequency.