On this page
Errors and limits
Response shape
Success:
{ "data": {}, "meta": { "request_id": "req_…" } }
Error:
{ "error": { "code": "UNAUTHORIZED", "message": "…" }, "request_id": "req_…" }
Error codes
| Code | HTTP | When |
|---|---|---|
BAD_REQUEST | 400 | Invalid parameters |
UNAUTHORIZED | 401 | Missing/invalid/revoked/expired API key |
FORBIDDEN | 403 | Authenticated but not allowed |
NOT_FOUND | 404 | Missing resource or expired export |
RATE_LIMITED | 429 | Account-level RPM (highest pack entitlement) |
INVALID_DSL | 400 | Query body fails structural validation |
UNKNOWN_METRIC | 400 | Metric not in catalogue |
INCOMPATIBLE_GRAIN | 400 | Metric/grain mismatch |
ENTITY_NOT_FOUND | 404 | Subject could not be resolved |
QUERY_TIMEOUT | 504 | Mongo maxTimeMS exceeded |
QUERY_TOO_COMPLEX | 400 | Complexity or interactive limit |
EXPORT_TOO_LARGE | 400 | Over EXPORT_MAX_ROWS |
CONFLICT | 409 | Export still pending |
SERVICE_UNAVAILABLE | 503 | DB / config not ready |
INTERNAL_ERROR | 500 | Unexpected failure (no Mongo leak) |
Limits
| Cap | Default |
|---|---|
Query limit | 200 |
| Query complexity | 80 |
Query maxTimeMS | 8000 |
| Export sync rows | 1000 |
| Export hard max | 5000 |
| Export TTL hours | 168 |
| Account RPM | Free 10 / Developer 60 / Growth 180 / Business 600 per minute (Upstash sliding window, shared across API keys); headers RateLimit-* / X-RateLimit-*; Retry-After on 429 |
Examples — handling 401
cURL
curl -si https://api.crunchclash.com/v1/clubs | head -n 20
JavaScript
const API_KEY = "YOUR_API_KEY";
const res = await fetch("https://api.crunchclash.com/v1/clubs");
if (res.status === 401) {
const body = await res.json();
console.error(body.error.code, body.request_id);
}
Python
import requests
r = requests.get("https://api.crunchclash.com/v1/clubs")
if r.status_code == 401:
print(r.json()["error"]["code"], r.json()["request_id"])Related: API Reference · Playground