Error response format
All API errors return JSON:HTTP status codes
| Status | Description |
|---|---|
200 | Success — target response proxied (check meta.blocked for block detection) |
401 | Unauthorized — missing API key |
403 | Forbidden — invalid API key |
429 | Rate limited. Headers include Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining |
502 | Bad gateway — no healthy agent available for this domain |
504 | Gateway timeout — target did not respond within timeout (default 30s) |
Block detection
Every fetch response includes ameta.blocked field:
meta.blocked is true:
- The agent that got blocked is automatically excluded for this domain
- Your next request will be routed to a different agent
- The response still contains the full target body for your inspection
available, limited (temporary), and unavailable (longer exclusion). Agents recover automatically.
Retry strategies
Rate limit (429)
Use exponential backoff: wait 1s, 2s, 4s, etc. CheckGET /usage for your current rate limit status.
Blocked (meta.blocked = true)
No client-side retry needed. The API automatically routes your next request to a different, healthy agent. Just keep making requests normally.Timeout (504)
- Increase the
timeoutfield in your POST body (default: 30 seconds) - Use
X-Geoto pick agents geographically closer to the target - Use
GET /debug/pick?url=...to preview which agent would be selected
No agents available (502)
All agents for this domain are temporarily excluded. Wait a moment and retry, or useGET /network/health/{domain} to check recovery status.
WebSocket errors
| Error | Cause | Close code |
|---|---|---|
| Invalid API key | Missing or unrecognized key in connect message | 1008 |
| Rate limit exceeded | Too many concurrent connections | 1008 |
| Connect timeout | No JSON connect message within 10 seconds | 1008 |
| Target connection failed | Agent could not connect to target WS | 1011 |
| Agent unavailable | No agent available for the request | 1011 |
AMQP errors
AMQP errors are delivered as SSE events:Common errors
Missing target URL
Invalid geo code
WebSocket connect timeout
The first JSON message withapiKey and url must be sent within 10 seconds of opening the WebSocket connection, or it will be closed with code 1008.