Production Readiness
Before Production
Use bounded requests, explicit timeouts, and recoverable job handling.
- Keep API keys in a secret manager.
- Set result, page, depth, path, and timeout limits.
- Request only required output formats.
- Poll asynchronous jobs with a capped interval or use webhooks.
- Honor
Retry-Afteron429. - Retry network and
5xxfailures with backoff and jitter. - Validate critical extracted fields before consequential use.
- Monitor credits, concurrency, latency, and failure rates.
Retry Decisions
| Status | Action |
|---|---|
400, 422 | Correct the request. |
401, 403 | Correct authentication or account state. |
402 | Add credits or change plan. |
404 | Check the route, job ID, or source. |
429 | Wait for Retry-After. |
5xx | Retry a bounded number of times. |
Async Job Loop
Example
start job → store job_id → poll with backoff → stop on completed, failed, or cancelled