Skip to main content
POST
/
v1
/
runs
/
{run_hash}
/
abort
Abort Run
curl --request POST \
  --url https://api.lobstr.io/v1/runs/{run_hash}/abort \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "object": "<string>",
  "status": "<string>",
  "is_done": true,
  "done_reason": "<string>",
  "total_results": 123,
  "duration": 123,
  "credit_used": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

This 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

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY

Query Parameters

run_hash
string
required
The unique identifier (hash) of the run to abort. Example: 300e9c5c127d421c90f431478d9a2cfb

Response Field Explanations

id
string
The aborted run’s identifier. Example: "300e9c5c127d421c90f431478d9a2cfb"
object
string
Always “run”. Example: "run"
status
string
Run status (typically “uploading” immediately after abort). Example: "uploading"
is_done
boolean
Whether the run has fully completed. Example: true
done_reason
string
Will be “aborted” for manually stopped runs. Example: "aborted"
total_results
integer
Number of results collected before abort. Example: 6
duration
float
Run duration in seconds before abort. Example: 10.4498
credit_used
float
Credits 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

200
{
  "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,
  "email_done": null,
  "email_time": null,
  "created_at": "2025-02-10T14:30:55Z",
  "done_reason": "aborted",
  "done_reason_desc": null
}
404
{
  "error": {
    "message": "Run not found or already completed",
    "type": "not_found_error",
    "param": "run_hash"
  }
}