Rate Limiting
Overview
Joo.nz implements rate limiting based on user authentication (API key), not IP address. The default limit is 50 requests per minute per user, though specific endpoints may have different limits.
Rate Limit Response
When you exceed the rate limit, you'll receive:
- HTTP Status Code:
429 Too Many Requests - Error Response:
{
"code": "to_many_requests",
"message": "Rate limit exceeded. Please try again later.",
"err": "Maximum request rate reached"
}
Best Practices
- Implement exponential backoff for retries
- Batch requests when possible
- Cache responses where appropriate
- Queue requests for high-volume operations
Example Error Handling
async function makeApiRequest(url) {
try {
const response = await fetch(url, {
headers: {
'Authorization': 'YOUR-API-KEY'
}
});
if (response.status === 429) {
// Wait for 60 seconds before retrying
await new Promise(resolve => setTimeout(resolve, 60000));
return makeApiRequest(url);
}
return await response.json();
} catch (error) {
console.error('Request failed:', error);
throw error;
}
}
For higher rate limits, consider upgrading your plan or contact support@joo.nz.