Status & Uptime
Where to check Krawl service status, the programmatic /health endpoint, and an error-recovery playbook for agents
This page tells agents how to check whether Krawl is healthy and how to recover gracefully when it isn't.
Service status
- Live status page (human): https://docs.krawl.sh/status — real-time component status, API version, uptime, and probe latency (probes the API health endpoint on every load).
- Status JSON (programmatic):
https://docs.krawl.sh/status.json— machine-readable status with per-component state, so agents can determine retry eligibility. - Health endpoint (programmatic):
https://api.krawl.sh/health— a fast, unauthenticated liveness/readiness check suitable for automated probes.
What the status probe establishes
The page and JSON endpoint use the same bounded health probe. A successful HTTP
status alone is insufficient: both status: "ok" and db: "ok" must be present
to show operational. HTTP errors and degraded payloads show degradation; invalid
or missing payloads show unknown. Only allowlisted health fields are exposed;
raw errors and arbitrary upstream fields are discarded.
MCP, research providers, payment settlement and webhooks are not independently
probed by /health. MCP is therefore unknown, even while API health is
green. There is no incident timeline or historical availability measurement.
API uptime is the current process uptime, not a measured service SLO. The
existing page refreshes on request and does not create new status infrastructure.
The /health endpoint
GET /health requires no auth and reports liveness, version, and database
connectivity:
curl https://api.krawl.sh/health{
"status": "ok",
"version": "0.2.0",
"db": "ok",
"uptime_seconds": 1234.5
}| Field | Meaning |
|---|---|
status | ok when the database is reachable, otherwise degraded |
db | ok or error |
version | Running API version |
uptime_seconds | Process uptime |
Agent usage: Before a batch of work — or as a circuit-breaker probe after
repeated failures — call /health. If status is degraded or the request
fails/times out, back off and retry the probe rather than hammering the research
endpoints. Keep probes lightweight (e.g. every 30–60s while degraded).
Error-recovery playbook
When a request fails, decide your action from the HTTP status and the
error envelope ({error_code, message, retry_after}):
| Situation | HTTP | Action |
|---|---|---|
| Rate limited | 429 | Wait Retry-After / retry_after, retry with backoff |
| Server/transient error | 5xx | Retry with exponential backoff + jitter |
| Quota exhausted | 402 quota_exceeded | Stop; upgrade plan or wait for monthly reset |
| Bad request | 4xx (not 429) | Fix the request; do not retry as-is |
Repeated 5xx / timeouts | — | Open a local circuit breaker; probe /health before resuming |
Recommended loop for autonomous agents:
- Probe
/healthif you're starting fresh or recovering from a failure streak. - Send the request, honoring
X-RateLimit-Remainingto self-throttle. - On retryable failure (
429/5xx), back off (exponential + jitter, capped), preferring the server'sRetry-Afterhint. See the full retry playbook. - On a failure streak, open a circuit breaker: pause requests, poll
/healthuntilstatus: ok, then resume. - For long jobs, use
POST /research/async+GET /tasks/{id}polling (or webhooks) so a dropped connection never loses work — the task keeps running server-side and the result is retrievable viaGET /results/{id}.
Idempotency & not losing work
- Async tasks and lookouts run server-side. If your client crashes, the work
continues; re-fetch state with
GET /tasks/{id}orGET /lookouts/{id}. - Webhook deliveries are best-effort and may be duplicated — deduplicate on
task_id/lookout_id+event. See Webhooks.