Run
Retry Run Task
Retry a single failed or skipped task within a completed run
The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
POST
https://api.lobstr.io/v1/runs/{run_hash}/tasks/{task_hash}/retryRetry a single task from a completed run without restarting the entire run. The task is reset to pending and the run relaunches to process it. Only one retry can be queued at a time per squid — no other run may be active.
Headers
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Path Parameters
run_hashstringpathrequiredHash ID of the completed run. Retrieve this from the List Runs endpoint.
task_hashstringpathrequiredHash ID of the task to retry. Retrieve this from the Get Run Tasks endpoint (data[].task).
Constraints
- The run must be completed (
is_done: true). Retrying while the run is still active returnsRunInProgress. - No other run may be active for the same squid. If one is,
ClusterBusyis returned. - The run must not have already reached its
max_unique_results_per_runcap — if it has, retrying won't scrape anything new andRunCapReachedis returned. Launch a new run instead. - A 5-minute cooldown applies between retries of the same task. Retrying too soon returns
RetryCooldown.
Code Examples
curl -X POST "https://api.lobstr.io/v1/runs/RUN_HASH/tasks/TASK_HASH/retry" \ -H "Authorization: Token YOUR_API_KEY"
Response
200
{ "id": "RUNTASK_HASH", "status": "pending", "is_done": false, "has_errors": null, "errors": null, "done_reason": null, "ended_at": null, "params": { "url": "https://example.com/listing/123" } }
Error Responses
400 RunInProgress
{ "error": "RunInProgress", "message": "Cannot retry a task while the run is still active." }
400 ClusterBusy
{ "error": "ClusterBusy", "message": "Another run is currently active for this squid." }
400 RunCapReached
{ "error": "RunCapReached", "message": "This run already reached its max unique results limit (200); retrying won't scrape anything new. Launch a new run instead." }
400 RetryCooldown
{ "error": "RetryCooldown", "message": "This task was retried too recently, please wait a few minutes." }