Configure Google Sheet Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"google_sheet_fields.url": "<string>",
"google_sheet_fields.append": true,
"google_sheet_fields.is_active": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"google_sheet_fields.url": "<string>",
"google_sheet_fields.append": True,
"google_sheet_fields.is_active": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
'google_sheet_fields.url': '<string>',
'google_sheet_fields.append': true,
'google_sheet_fields.is_active': true
})
};
fetch('https://api.lobstr.io/v1/delivery', 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/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'google_sheet_fields.url' => '<string>',
'google_sheet_fields.append' => true,
'google_sheet_fields.is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"google_sheet_fields.url": "<string>",
"google_sheet_fields.is_active": true,
"google_sheet_fields.append": true
}Delivery
Configure Google Sheet Delivery
Export squid run results directly to a shared Google Sheet
POST
/
v1
/
delivery
Configure Google Sheet Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"google_sheet_fields.url": "<string>",
"google_sheet_fields.append": true,
"google_sheet_fields.is_active": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"google_sheet_fields.url": "<string>",
"google_sheet_fields.append": True,
"google_sheet_fields.is_active": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
'google_sheet_fields.url': '<string>',
'google_sheet_fields.append': true,
'google_sheet_fields.is_active': true
})
};
fetch('https://api.lobstr.io/v1/delivery', 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/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'google_sheet_fields.url' => '<string>',
'google_sheet_fields.append' => true,
'google_sheet_fields.is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"google_sheet_fields.url\": \"<string>\",\n \"google_sheet_fields.append\": true,\n \"google_sheet_fields.is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"google_sheet_fields.url": "<string>",
"google_sheet_fields.is_active": true,
"google_sheet_fields.append": true
}Configure Google Sheet delivery to export run results directly to a shared Google Sheet. Results can be overwritten with each run or appended with deduplication.
Behavior
- append = false: Only the latest run’s data is exported. Any previously exported data is overwritten.
- append = true: Data from all runs is appended and deduplicated before export.
Requirements
- The Google Sheet must be shared with “Anyone with the link”
- The sheet must have Editor access permission
- Export is limited to 100,000 rows
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Must be application/json. Value:
application/jsonQuery Parameters
string
required
The unique identifier (hash) of the squid for which to configure Google Sheet delivery. Example:
c106a44a98044ef18acc59986ae10967Request Body
string
required
Public Google Sheet URL (must be accessible with Editor permission). Example:
"https://docs.google.com/spreadsheets/d/1ly9nwTs-hNaFCzWtSljevSf16chs5Nn0PIv_TpQSEhA/edit?usp=sharing"boolean
required
false: Overwrites previous data with the last run’s result. true: Appends new results, deduplicated. Example:
falseboolean
required
Set to true to enable Google Sheet export, false to disable. Example:
trueResponse Field Explanations
string
The configured Google Sheet URL. Example:
"https://docs.google.com/spreadsheets/d/1ly9nwTs-hNaFCzWtSljevSf16chs5Nn0PIv_TpQSEhA/edit?usp=sharing"boolean
Whether Google Sheet export is active. Example:
trueboolean
Append mode setting. Example:
falseThe Google Sheet MUST be shared with ‘Anyone with the link’ and have Editor permissions. Without these settings, export will fail.
Use append: false for dashboards where you only want the latest data. Use append: true for historical tracking.
When append is true, Lobstr automatically deduplicates rows before exporting, so you won’t get duplicate entries.
Export is limited to 100,000 rows. If your squid generates more results, consider using S3 or SFTP delivery instead.
Use the Test Google Sheet endpoint to verify your sheet permissions before activating automatic delivery.
Code Examples
curl -X POST "https://api.lobstr.io/v1/delivery?squid=YOUR_SQUID_HASH" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"google_sheet_fields": {
"url": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=sharing",
"append": false,
"is_active": true
}
}'
import requests
url = "https://api.lobstr.io/v1/delivery"
headers = {
"Authorization": "Token YOUR_API_KEY",
"Content-Type": "application/json"
}
params = {
"squid": "YOUR_SQUID_HASH"
}
payload = {
"google_sheet_fields": {
"url": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?usp=sharing",
"append": False,
"is_active": True
}
}
response = requests.post(url, headers=headers, params=params, json=payload)
result = response.json()
print("Google Sheet delivery configured successfully!")
print(f"Sheet URL: {result['google_sheet_fields']['url']}")
print(f"Append mode: {result['google_sheet_fields']['append']}")
print(f"Active: {result['google_sheet_fields']['is_active']}")
Response
201
{
"google_sheet_fields": {
"url": "https://docs.google.com/spreadsheets/d/1ly9nwTs-hNaFCzWtSljevSf16chs5Nn0PIv_TpQSEhA/edit?usp=sharing",
"is_active": true,
"append": false
}
}