The BreakBlocks API implements rate limiting to ensure fair access and prevent abuse. Rate limits are applied on a per-account basis.
| User Type | Requests/Minute | Requests/Hour | Requests/Day |
|---|---|---|---|
| Anonymous/Browser | 20 | 600 | 5000 |
| Standard User | 60 | 2000 | 20000 |
| API Key User | 100 | 3000 | 50000 |
| Patreon Supporter | Unlimited | Unlimited | Unlimited |
Each response includes headers showing your current rate limit status:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 45 X-RateLimit-Reset: 1704725400
X-RateLimit-Reset contains a Unix timestamp indicating when your rate limit will reset.
When you exceed the rate limit, the API returns a 429 Too Many Requests status code:
HTTP/1.1 429 Too Many Requests
Retry-After: 45
X-RateLimit-Reset: 1704725400
{
"success": false,
"message": "Rate limit exceeded. Try again in 45 seconds."
}The following endpoints have relaxed rate limits and are exempt from standard throttling:
/metadata/* - Version, country, and region metadata (1 request per second limit)When you receive a 429 response, check the Retry-After header and wait that many seconds before retrying:
// JavaScript with retry logic
async function fetchWithRetry(url, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
const response = await fetch(url);
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After') || 60;
console.log(`Rate limited. Waiting ${retryAfter} seconds...`);
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
continue;
}
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
}
throw new Error('Max retries exceeded');
}
const data = await fetchWithRetry('https://api.breakblocks.com/api/v0.1/servers/find?limit=10');X-RateLimit-Remaining to avoid hitting limitsFor batch operations, implement controlled throttling to stay within limits:
// JavaScript - Process servers with delay
async function processServersWithThrottle(ips, delayMs = 500) {
for (const ip of ips) {
const response = await fetch(`https://api.breakblocks.com/api/v0.1/status/ping/${ip}/25565`);
const data = await response.json();
console.log(data);
// Wait between requests to avoid rate limit
await new Promise(resolve => setTimeout(resolve, delayMs));
}
}
// Process 1 server every 500ms (120 servers/minute = well under 60/minute limit)
await processServersWithThrottle(serverList, 500);If you need higher rate limits, consider: