List Runs
curl --request GET \
--url https://api.lobstr.io/v1/runs \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/runs"
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/runs', 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/runs",
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/runs"
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/runs")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/runs")
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{
"total_results": 123,
"limit": 123,
"page": 123,
"total_pages": 123,
"data": [
{}
],
"data[].id": "<string>",
"data[].status": "<string>",
"data[].is_done": true,
"data[].total_results": 123,
"data[].duration": 123,
"data[].credit_used": 123,
"data[].done_reason": {},
"next": {},
"previous": {}
}Run
List Runs
Retrieve a paginated list of all runs for a specific squid
GET
/
v1
/
runs
List Runs
curl --request GET \
--url https://api.lobstr.io/v1/runs \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/runs"
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/runs', 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/runs",
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/runs"
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/runs")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/runs")
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{
"total_results": 123,
"limit": 123,
"page": 123,
"total_pages": 123,
"data": [
{}
],
"data[].id": "<string>",
"data[].status": "<string>",
"data[].is_done": true,
"data[].total_results": 123,
"data[].duration": 123,
"data[].credit_used": 123,
"data[].done_reason": {},
"next": {},
"previous": {}
}This endpoint retrieves a paginated list of all runs for a specific squid. Use this to view run history and track past executions.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| squid | string | Yes | The squid hash ID to list runs for |
| page | integer | No | Page number for pagination. Default: 1 |
| limit | integer | No | Results per page. Default: 50, Max: 100 |
Response Field Explanations
integer
Total number of runs. Example:
4integer
Maximum results per page. Example:
50integer
Current page number. Example:
1integer
Total number of pages. Example:
1array
Array of run objects. Example:
[...]string
Unique run identifier. Example:
"381cfbb47e474782857ddc035298b6f3"string
Current run status. Example:
"done"boolean
Whether the run has completed. Example:
trueinteger
Number of results collected. Example:
156float
Run duration in seconds. Example:
3.1849float
Credits consumed. Example:
3.1849string | null
Reason for completion. Example:
"tasks_done"string | null
URL for next page (null if last page). Example:
nullstring | null
URL for previous page (null if first page). Example:
nullUse this endpoint to monitor all past and current runs for a squid.
Runs are returned in reverse chronological order (newest first).
Check is_done to quickly filter completed vs. active runs.
Code Examples
curl -X GET "https://api.lobstr.io/v1/runs?squid=b6c56d18cb0046949461ba9ca278e8ad&page=1&limit=50" \
-H "Authorization: Token YOUR_API_KEY"
import requests
url = "https://api.lobstr.io/v1/runs"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
params = {
"squid": "b6c56d18cb0046949461ba9ca278e8ad",
"page": 1,
"limit": 50
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Total runs: {data['total_results']}")
print(f"Page {data['page']} of {data['total_pages']}\n")
for run in data['data']:
status_icon = "✓" if run['is_done'] else "⟳"
print(f"{status_icon} Run: {run['id']}")
print(f" Status: {run['status']}")
print(f" Results: {run['total_results']}")
print(f" Credits: {run['credit_used']}")
print(f" Reason: {run['done_reason']}")
print()
Response
200
{
"total_results": 4,
"limit": 50,
"page": 1,
"total_pages": 1,
"result_from": 1,
"result_to": 4,
"data": [
{
"id": "381cfbb47e474782857ddc035298b6f3",
"object": "run",
"squid": "b6c56d18cb0046949461ba9ca278e8ad",
"is_done": true,
"started_at": "2025-02-04T10:25:13Z",
"total_results": 156,
"total_unique_results": 156,
"next_launch_at": null,
"ended_at": "2025-02-04T10:25:21Z",
"duration": 8.0415,
"credit_used": 8.0415,
"origin": "user",
"force_launch": false,
"status": "done",
"export_done": true,
"export_count": 1,
"export_time": "2025-02-04T10:25:25Z",
"email_done": null,
"email_time": null,
"created_at": "2025-02-04T10:25:13Z",
"done_reason": "tasks_done",
"done_reason_desc": null
},
{
"id": "3aa75b3f05c144f6a87f8397e229024e",
"object": "run",
"squid": "b6c56d18cb0046949461ba9ca278e8ad",
"is_done": true,
"started_at": "2025-01-29T09:53:27Z",
"total_results": 0,
"total_unique_results": 0,
"next_launch_at": null,
"ended_at": "2025-01-29T09:53:33Z",
"duration": 0.0466,
"credit_used": 0.0466,
"origin": "user",
"force_launch": false,
"status": "done",
"export_done": true,
"export_count": 1,
"export_time": "2025-01-29T09:53:37Z",
"email_done": null,
"email_time": null,
"created_at": "2025-01-29T09:53:27Z",
"done_reason": "tasks_done",
"done_reason_desc": null
}
],
"next": null,
"previous": null
}