Rate Limiting
The JJHub API enforces per-user rate limits to ensure fair usage and platform stability. Every API response includes rate limit headers so you can monitor your consumption in real time.Rate Limit Tiers
| Tier | Limit | Window | Applies to |
|---|---|---|---|
| Authenticated | 5,000 requests | Per hour | All API endpoints (with valid token or session) |
| Unauthenticated | 60 requests | Per hour | All API endpoints (no credentials) |
| Search | 30 requests | Per minute | /api/search/* endpoints |
Response Headers
Every API response includes three rate limit headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed in the current window |
X-RateLimit-Remaining | Number of requests remaining in the current window |
X-RateLimit-Reset | UTC epoch timestamp (in seconds) when the current window resets |
Example: Normal Response Headers
Exceeding the Rate Limit
When you exceed the rate limit, the API returns a429 Too Many Requests response with a Retry-After header indicating how many seconds to wait before making another request.
Retry-After header or X-RateLimit-Reset timestamp to determine when to resume requests.
Checking Your Rate Limit Status
You can check your current rate limit status without consuming a rate limit slot by inspecting the headers on any successful API response:X-RateLimit-Reset epoch timestamp to a human-readable time:
Best Practices
Use Conditional Requests
UseIf-None-Match and If-Modified-Since headers for resources you have already fetched. A 304 Not Modified response does not count against your rate limit.
Cache Responses Locally
Cache API responses on the client side using theETag and Last-Modified response headers. This reduces unnecessary requests and keeps you well within your rate limit.
Implement Exponential Backoff
If you receive a429 response, wait for the duration specified by the Retry-After header. For general error retries, use exponential backoff with jitter:
- Wait 1 second, then retry
- Wait 2 seconds, then retry
- Wait 4 seconds, then retry
- Continue doubling the wait time up to a maximum of 60 seconds