Get Last Worker Run
Method: GET
Endpoint: /api/v2/worker-runs/last
Authentication: Supports Authorization: Bearer <YOUR_API_KEY>, api-key: <YOUR_API_KEY>, and ?token=<YOUR_API_KEY>. Prefer Bearer token.
Try it
Section titled “Try it”GET
/api/v2/worker-runs/lastGet last worker runAuthenticationRequired
Stored only in this browser tab. Sent only to https://openapi.coreclaw.com.
Request BodyNot applicable
No JSON request body is defined for this operation.
When to use this endpoint
Section titled “When to use this endpoint”Use this endpoint to read or operate on the account-level latest run.
Request Example
Section titled “Request Example”curl -X GET "https://openapi.coreclaw.com/api/v2/worker-runs/last" \ -H "Authorization: Bearer YOUR_API_KEY"Response Example
Section titled “Response Example”{ "code": 0, "data": { "duration": 10, "err_msg": "", "finished_at": 1782091210, "origin": "openapi", "results": 1, "scraper_slug": "demo-worker", "scraper_title": "Demo Worker", "slug": "01KKDXV2G26BT7NH4ZQR2R4NPZ", "started_at": 1782091200, "status": "running", "traffic": 0, "usage": "1.00", "version": "latest" }, "message": "success", "request_id": "req-123"}Response Fields
Section titled “Response Fields”data contains these run fields:
| Field | Type | Description |
|---|---|---|
slug | string | Run identifier; pass it as runId to detail, log, result, and export endpoints. |
scraper_slug | string | Identifier of the Worker that ran. |
scraper_title | string | Worker display name. |
version | string | Worker version that actually ran, for example v1.2.8. |
status | string | Run status and the primary outcome field. See Run Lifecycle & Status for values. |
results | integer | Current or final number of result rows. 0 does not mean failure. |
usage | string | Platform-recorded resource usage (numeric string) for observability and billing diagnostics. |
traffic | integer | Platform-recorded traffic diagnostic value. |
origin | string | Run origin, for example api_v2. |
started_at | integer | Execution start time, Unix seconds. |
finished_at | integer | Execution end time, Unix seconds. |
duration | integer | Execution duration in seconds. |
err_msg | string | Optional diagnostic text. It may be absent (successful runs usually omit it); use it only as supporting evidence, never as the sole success/failure signal. |
Timestamps are Unix seconds (UTC). Cancellation, queueing, or state synchronization can produce incomplete or non-intuitive timing combinations; always treat
statusas authoritative.
- API v2 supports Bearer token, the legacy
api-keyheader, and query token. Prefer Bearer token for new integrations. - This is an account-level latest-run endpoint and does not take a
workerIdpath parameter; it operates on the latest run in the current account scope. lastmeans the latest run in the current scope. Use a concreterunIdendpoint when the target must be explicit.- See Run Lifecycle & Status for status handling, polling, failure diagnosis, and cancellation behavior.
HTTP Responses
Section titled “HTTP Responses”| HTTP Status | Application Code | Meaning |
|---|---|---|
200 | 0 | OK |
400 | 11000 | Bad Request |
401 | 12001 | Unauthorized |
404 | 11004 | Not Found |
429 | 13000 | Too Many Requests |
500 | 10000 | Internal Server Error |