Get Task
curl --request GET \
--url https://api.lobstr.io/v1/tasks/{task_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/tasks/{task_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/tasks/{task_hash}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/tasks/{task_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/tasks/{task_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/tasks/{task_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/tasks/{task_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"hash_value": "<string>",
"created_at": "<string>",
"is_active": true,
"params": {},
"module": 123,
"status": {},
"object": "<string>",
"status.status": "<string>",
"status.started_at": "<string>",
"status.ended_at": "<string>",
"status.is_done": true,
"status.total_results": 123,
"status.total_pages": 123,
"status.done_reason": "<string>",
"status.has_errors": true,
"status.errors": {}
}Task
Get Task
Retrieve detailed information about a specific task
GET
/
v1
/
tasks
/
{task_hash}
Get Task
curl --request GET \
--url https://api.lobstr.io/v1/tasks/{task_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/tasks/{task_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/tasks/{task_hash}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/tasks/{task_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/tasks/{task_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/tasks/{task_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/tasks/{task_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"hash_value": "<string>",
"created_at": "<string>",
"is_active": true,
"params": {},
"module": 123,
"status": {},
"object": "<string>",
"status.status": "<string>",
"status.started_at": "<string>",
"status.ended_at": "<string>",
"status.is_done": true,
"status.total_results": 123,
"status.total_pages": 123,
"status.done_reason": "<string>",
"status.has_errors": true,
"status.errors": {}
}This endpoint retrieves detailed information about a specific task using its hash ID, including its current status, parameters, and execution history.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYPath Parameters
string
required
The unique identifier (hash) of the task. Example:
c5e29d2aba8b77cdc56391e7405302deResponse Field Explanations
string
Unique task identifier. Example:
"c5e29d2aba8b77cdc56391e7405302de"string
Task creation timestamp (ISO 8601). Example:
"2024-12-24T10:57:55.045567"boolean
Whether the task is active. Example:
trueobject
Task parameters (URL, search terms, etc.). Example:
{"url": "https://..."}integer
Internal module identifier. Example:
5object
Detailed execution status information. Example:
{...}string
Always “task”. Example:
"task"Status Object Fields
string
Current task status (pending, running, completed, aborted, failed). Example:
"completed"string
When task execution started. Example:
"2025-02-04T10:25:47.278419"string
When task execution ended. Example:
"2025-02-04T10:26:52.310738"boolean
Whether the task has completed. Example:
trueinteger
Total number of results scraped. Example:
156integer
Total pages processed. Example:
1string
Reason for task completion (completed, run_aborted, error, etc.). Example:
"completed"boolean
Whether errors occurred during execution. Example:
falsestring | null
Error details if any occurred. Example:
nullUse 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"
import requests
url = "https://api.lobstr.io/v1/tasks/c5e29d2aba8b77cdc56391e7405302de"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
task = response.json()
print(f"Task ID: {task['hash_value']}")
print(f"Created: {task['created_at']}")
print(f"Active: {task['is_active']}")
print(f"Parameters: {task['params']}")
# Check execution status
status = task['status']
print(f"\nExecution Status: {status['status']}")
print(f"Results collected: {status['total_results']}")
print(f"Pages processed: {status['total_pages']}")
if status['is_done']:
print(f"Completion reason: {status['done_reason']}")
if status['has_errors']:
print(f"Errors: {status['errors']}")
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"
}
}