Understanding Rate Limits
Learn about rate limiting and how to stay within your plan's limits.
What are Rate Limits?
Rate limits control how many API requests you can make within a specific time period. This helps ensure fair usage and system stability for all users.
Rate Limit Basics
- • Rate limits are measured in requests per minute (RPM)
- • Limits are enforced on a per-API-key basis
- • Exceeding limits returns a
429 Too Many Requestserror - • Limits reset every minute on a rolling window basis
Plan Limits
| Plan | Requests per Minute | Max Categories |
|---|---|---|
| Free | 10 RPM | 1 category |
| Premium | 20 RPM | 3 categories |
How Rate Limiting Works
Rolling Window
Rate limits use a rolling window approach. This means:
- • Your request count is tracked over the last 60 seconds
- • Each request counts toward your limit for the next 60 seconds
- • As older requests age out, you can make new ones
- • Limits reset continuously, not at fixed intervals
Example (Free Tier - 10 RPM):
- • Make 10 requests at 0:00 - all succeed
- • Make 1 request at 0:01 - succeeds (9 requests from 0:00 still count)
- • Make 1 request at 1:01 - succeeds (requests from 0:00 have expired)
Rate Limit Headers
Response Headers
Every API response includes rate limit information in headers:
X-RateLimit-Limit- Your plan's rate limit (e.g., 10, 20)X-RateLimit-Remaining- Requests remaining in current windowX-RateLimit-Reset- Timestamp when the limit resetsRetry-After- Present on 429 errors, seconds to wait
Staying Within Limits
Best Practices
- • Monitor headers: Check X-RateLimit-Remaining to track usage
- • Implement backoff: Use exponential backoff when hitting limits
- • Use caching: Leverage API caching to reduce request frequency
- • Batch requests: Group requests when possible
- • Handle 429 errors: Respect Retry-After headers
- • Upgrade if needed: Consider Premium for higher limits
Checking Rate Limits
Loading code...
PageSight