detach: true. When you set it, FetchFox returns immediately with a jobId instead of keeping the request open until the job finishes.
Detached jobs are useful when:
- Your crawl or extraction may take a while
- Your client has a short timeout
- You want to start work in one request and check progress later
Start a detached job
Adddetach: true to the same request body you would normally send.
Example:
Check job status
To check the current status of a detached job, request:https://api.fetchfox.ai/api/jobs/:jobId
Example:
state field.
Job states
active: the job is still runningcompleted: the job finished successfullyerror: the job failed while running
active, keep polling the job endpoint until it reaches either completed or error.
Summary
- Any FetchFox endpoint can run as a detached job.
- Enable it by adding
detach: trueto the request body. - Use the returned
jobIdto poll/api/jobs/:jobId. - Watch the
statefield to know whether the job is still running, completed, or failed.