Update Settings
curl --request POST \
--url https://api.lobstr.io/v1/squids/{squid_hash} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"params": {},
"params.max_related_videos_per_post": 123
}
'import requests
url = "https://api.lobstr.io/v1/squids/{squid_hash}"
payload = {
"params": {},
"params.max_related_videos_per_post": 123
}
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({params: {}, 'params.max_related_videos_per_post': 123})
};
fetch('https://api.lobstr.io/v1/squids/{squid_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/squids/{squid_hash}",
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([
'params' => [
],
'params.max_related_videos_per_post' => 123
]),
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/squids/{squid_hash}"
payload := strings.NewReader("{\n \"params\": {},\n \"params.max_related_videos_per_post\": 123\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/squids/{squid_hash}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"params\": {},\n \"params.max_related_videos_per_post\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/squids/{squid_hash}")
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 \"params\": {},\n \"params.max_related_videos_per_post\": 123\n}"
response = http.request(request)
puts response.read_bodyTikTok Video Scraper
Update Settings
Configure settings for your TikTok Video Scraper squid
POST
/
v1
/
squids
/
{squid_hash}
Update Settings
curl --request POST \
--url https://api.lobstr.io/v1/squids/{squid_hash} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"params": {},
"params.max_related_videos_per_post": 123
}
'import requests
url = "https://api.lobstr.io/v1/squids/{squid_hash}"
payload = {
"params": {},
"params.max_related_videos_per_post": 123
}
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({params: {}, 'params.max_related_videos_per_post': 123})
};
fetch('https://api.lobstr.io/v1/squids/{squid_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/squids/{squid_hash}",
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([
'params' => [
],
'params.max_related_videos_per_post' => 123
]),
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/squids/{squid_hash}"
payload := strings.NewReader("{\n \"params\": {},\n \"params.max_related_videos_per_post\": 123\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/squids/{squid_hash}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"params\": {},\n \"params.max_related_videos_per_post\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/squids/{squid_hash}")
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 \"params\": {},\n \"params.max_related_videos_per_post\": 123\n}"
response = http.request(request)
puts response.read_bodyUpdate the configuration of your TikTok Video Scraper squid. Pass crawler-specific settings inside the
params object.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Must be application/json. Value:
application/jsonBody
object
Crawler-specific settings. See fields below.
Settings Fields
integer
Number of related videos to also scrape for each task URL. Leave empty or set to
0 to disable. Example: 5Set
max_related_videos_per_post to expand your dataset — for each input URL, the scraper will also collect that many related videos. Results from related videos have is_related: true and include a related_to_video_id field.Code Examples
curl -X POST "https://api.lobstr.io/v1/squids/YOUR_SQUID_HASH" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "TikTok Video Scraper",
"params": {
"max_related_videos_per_post": 5
}
}'
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}
squid_hash = "YOUR_SQUID_HASH"
response = requests.post(f"{BASE_URL}/squids/{squid_hash}",
headers=headers,
json={
"name": "TikTok Video Scraper",
"params": {
"max_related_videos_per_post": 5
}
}
)
data = response.json()
print(f"Squid updated: {data['name']}")
print(f"Related videos per post: {data['params'].get('max_related_videos_per_post')}")
Response
201
{
"id": "YOUR_SQUID_HASH",
"name": "TikTok Video Scraper",
"crawler": {
"id": "1e6cba50f2713539a2b0ac784184ed92",
"name": "TikTok Video Scraper",
"slug": "tiktok-video-scraper"
},
"params": {
"max_related_videos_per_post": 5
},
"concurrency": 5,
"export_unique_results": true,
"to_complete": true,
"no_line_breaks": false,
"status": "idle",
"created_at": "2025-01-20T10:15:00.000000",
"updated_at": "2025-01-27T14:35:00.000000"
}
⌘I