Skip to content
Task

Get Task

Retrieve detailed information about a specific task

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/tasks/{task_hash}

This endpoint retrieves detailed information about a specific task using its hash ID, including its current status, parameters, and execution history.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

task_hashstringpathrequired

The unique identifier (hash) of the task. Example: c5e29d2aba8b77cdc56391e7405302de

Response Field Explanations

hash_valuestring

Unique task identifier. Example: "c5e29d2aba8b77cdc56391e7405302de"

created_atstring

Task creation timestamp (ISO 8601). Example: "2024-12-24T10:57:55.045567"

is_activeboolean

Whether the task is active. Example: true

paramsobject

Task parameters (URL, search terms, etc.). Example: {"url": "https://..."}

moduleinteger

Internal module identifier. Example: 5

statusobject

Detailed execution status information. Example: {...}

objectstring

Always "task". Example: "task"

Status Object Fields

status.statusstring

Current task status (pending, running, completed, aborted, failed). Example: "completed"

status.started_atstring

When task execution started. Example: "2025-02-04T10:25:47.278419"

status.ended_atstring

When task execution ended. Example: "2025-02-04T10:26:52.310738"

status.is_doneboolean

Whether the task has completed. Example: true

status.total_resultsinteger

Total number of results scraped. Example: 156

status.total_pagesinteger

Total pages processed. Example: 1

status.done_reasonstring

Reason for task completion (completed, run_aborted, error, etc.). Example: "completed"

status.has_errorsboolean

Whether errors occurred during execution. Example: false

status.errorsstring | null

Error details if any occurred. Example: null

Use the status.total_results field to track how much data has been collected for this task.

The done_reason field helps identify why a task stopped - whether it completed normally, was aborted, or encountered errors.

Tasks with status 'aborted' may have partial results. Check total_results to see what was collected.

Code Examples

curl -X GET "https://api.lobstr.io/v1/tasks/c5e29d2aba8b77cdc56391e7405302de" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
{
  "hash_value": "c5e29d2aba8b77cdc56391e7405302de",
  "created_at": "2024-12-24T10:57:55.045567",
  "is_active": true,
  "params": {
    "url": "https://www.linkedin.com/in/johndoe"
  },
  "module": 5,
  "status": {
    "status": "completed",
    "started_at": "2025-02-04T10:25:47.278419",
    "ended_at": "2025-02-04T10:26:52.310738",
    "is_done": true,
    "total_results": 156,
    "total_pages": 1,
    "done_reason": "completed",
    "has_errors": false,
    "errors": null
  },
  "object": "task"
}
404
{
  "error": {
    "message": "Task not found",
    "type": "not_found_error",
    "param": "task_hash"
  }
}