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
- JavaScript
- Python
- PHP
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
Batch Requests Efficiently
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.