Skip to content
Run

Get Run Stats

Retrieve detailed statistics about a specific 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.
GEThttps://api.lobstr.io/v1/runs/{run_hash}/stats

This endpoint retrieves detailed real-time statistics about a specific run, including progress information, estimated time remaining, and task completion status.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

run_hashstringpathrequired

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

Response Field Explanations

idstring

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

objectstring

Always "run". Example: "run"

durationstring

Human-readable duration (HH:MM:SS format). Example: "0:00:15.175532"

started_atstring

When the run started. Example: "2025-02-10T14:30:55"

ended_atstring | null

When the run ended (null if still running). Example: "2025-02-10T14:31:10"

is_doneboolean

Whether the run has completed. Example: true

percent_donestring

Completion percentage. Example: "100%"

etastring

Estimated time remaining ("∞" if unknown). Example: "∞"

total_tasksinteger

Total number of tasks in the run. Example: 10

total_tasks_doneinteger

Number of tasks completed. Example: 10

total_tasks_leftinteger

Number of tasks remaining. Example: 0

total_resultsinteger

Total results collected in this run. Example: 6

results_totalinteger

Expected total results (if known). Example: 138

results_doneinteger

Results collected so far. Example: 6

current_taskstring

Currently executing task (empty if none). Example: ""

updated_atstring

Last update timestamp. Example: "2025-02-10T14:31:10"

Poll this endpoint periodically to display real-time progress in your application.

The eta field provides an estimate but may show "∞" for runs with unpredictable completion times.

Use percent_done for progress bars and total_tasks_left to show remaining work.

Code Examples

curl -X GET "https://api.lobstr.io/v1/runs/300e9c5c127d421c90f431478d9a2cfb/stats" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
{
  "id": "300e9c5c127d421c90f431478d9a2cfb",
  "object": "run",
  "duration": "0:00:15.175532",
  "ended_at": "2025-02-10T14:31:10",
  "eta": "∞",
  "is_done": true,
  "percent_done": "100%",
  "started_at": "2025-02-10T14:30:55",
  "total_requests": null,
  "total_results": 6,
  "total_tasks": 10,
  "total_tasks_done": 10,
  "total_tasks_left": 0,
  "current_task": "",
  "results_total": 138,
  "results_done": 6,
  "updated_at": "2025-02-10T14:31:10"
}
404
{
  "error": {
    "message": "Run not found",
    "type": "not_found_error",
    "param": "run_hash"
  }
}