Rate Limit Overview
The Country State City API implements rate limiting to ensure fair usage and optimal performance for all users. Rate limits are enforced per API key and reset hourly.Current Rate Limits
Plan | Monthly Requests | Daily Requests | Rate Limit |
---|---|---|---|
Community (Free) | 3,000 | 100 | 2 req/second |
Supporter | 30,000 | 1,000 | 10 req/second |
Professional | 150,000 | 5,000 | 25 req/second |
View Full Pricing Details
Compare plans, features, and pricing options
Rate Limit Headers
Every API response includes rate limit information in the headers:Header | Description |
---|---|
X-RateLimit-Limit | Total requests allowed in current window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the limit resets |
X-RateLimit-Window | Rate limit window in seconds (3600 = 1 hour) |
Monitoring Your Usage
Rate Limit Exceeded (HTTP 429)
When you exceed your rate limit, the API returns a429 Too Many Requests
status:
Best Practices
Implement Exponential Backoff
Cache Responses Effectively
Implement intelligent caching to reduce API calls:
- Cache country/state data for 24+ hours (rarely changes)
- Cache city data for 12+ hours
- Use ETags and conditional requests when available
- Implement local fallbacks for critical data
Batch Requests Efficiently
Plan your requests to maximize efficiency:
- Fetch broader datasets when possible (all countries vs individual requests)
- Use hierarchical endpoints strategically
- Implement request queuing for high-volume applications
Monitor and Alert
Set up monitoring to track your API usage:Upgrading Your Plan
Need higher rate limits? Contact Us:Contact Sales
Discuss custom rate limits and enterprise features for your specific needs.