Skip to content
Run

Abort Run

Stop an active run before completion

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.
POSThttps://api.lobstr.io/v1/runs/{run_hash}/abort

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

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

run_hashstringpathrequired

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

Response Field Explanations

idstring

The aborted run's identifier. Example: "300e9c5c127d421c90f431478d9a2cfb"

objectstring

Always "run". Example: "run"

statusstring

Run status (typically "uploading" immediately after abort). Example: "uploading"

is_doneboolean

Whether the run has fully completed. Example: true

done_reasonstring

Will be "aborted" for manually stopped runs. Example: "aborted"

total_resultsinteger

Number of results collected before abort. Example: 6

durationfloat

Run duration in seconds before abort. Example: 10.4498

credit_usedfloat

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,
  "expires_at": 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"
  }
}