Abort Run
Stop an active run before completion
https://api.lobstr.io/v1/runs/{run_hash}/abortThis endpoint aborts an active run using its hash ID. The run will stop collecting data and begin the export process for any results already gathered.
Headers
AuthorizationstringheaderrequiredYour API authentication token. Value: Token YOUR_API_KEY
Path Parameters
run_hashstringpathrequiredThe unique identifier (hash) of the run to abort. Example: 300e9c5c127d421c90f431478d9a2cfb
Response Field Explanations
idstringThe aborted run's identifier. Example: "300e9c5c127d421c90f431478d9a2cfb"
objectstringAlways "run". Example: "run"
statusstringRun status (typically "uploading" immediately after abort). Example: "uploading"
is_donebooleanWhether the run has fully completed. Example: true
done_reasonstringWill be "aborted" for manually stopped runs. Example: "aborted"
total_resultsintegerNumber of results collected before abort. Example: 6
durationfloatRun duration in seconds before abort. Example: 10.4498
credit_usedfloatCredits consumed before abort. Example: 10.4498
Aborted runs still export any results collected up to the point of abortion.
You will still be charged credits for the work done before aborting.
Use Get Run Stats to check progress before deciding to abort a run.
Code Examples
curl -X POST "https://api.lobstr.io/v1/runs/300e9c5c127d421c90f431478d9a2cfb/abort" \ -H "Authorization: Token YOUR_API_KEY"
Response
{ "id": "300e9c5c127d421c90f431478d9a2cfb", "object": "run", "squid": "e445405ef4ab41208ef7d29b92a1a9dd", "is_done": true, "started_at": "2025-02-10T14:30:55Z", "total_results": 6, "total_unique_results": 6, "next_launch_at": null, "ended_at": "2025-02-10T14:31:10Z", "duration": 10.4498, "credit_used": 10.4498, "origin": "user", "force_launch": false, "status": "uploading", "export_done": null, "export_count": 0, "export_time": null, "expires_at": null, "email_done": null, "email_time": null, "created_at": "2025-02-10T14:30:55Z", "done_reason": "aborted", "done_reason_desc": null }
{ "error": { "message": "Run not found or already completed", "type": "not_found_error", "param": "run_hash" } }