Update Settings
curl --request POST \
--url https://api.lobstr.io/v1/squids/{squid_hash} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.lobstr.io/v1/squids/{squid_hash}"
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'}
};
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_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"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/squids/{squid_hash}"
req, _ := http.NewRequest("POST", url, nil)
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>")
.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>'
response = http.request(request)
puts response.read_bodyReddit Scraper
Update Settings
Configure the Reddit Scraper settings and filters
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>'import requests
url = "https://api.lobstr.io/v1/squids/{squid_hash}"
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'}
};
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_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"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/squids/{squid_hash}"
req, _ := http.NewRequest("POST", url, nil)
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>")
.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>'
response = http.request(request)
puts response.read_bodyConfigure your Reddit Scraper squid settings. Control sort order per input type, filter by date, limit results, and choose whether to include posts, comments, or both.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Request body format. Value:
application/jsonScraper Parameters
Set these parameters in theparams object:
| Parameter | Type | Default | Description |
|---|---|---|---|
| max_results | integer | unlimited | Maximum number of rows (posts + comments) to collect per task |
| max_unique_results_per_run | integer | unlimited | Maximum unique results across all tasks in the run |
| fetch_since | string | null | Stop collecting content older than this threshold. Use a relative duration (24h, 7d, 2w) or absolute date (YYYY-MM-DD HH:MM:SS) |
| fetch_since_timezone | string | null | Timezone for interpreting an absolute fetch_since date (e.g. Europe/Paris). Ignored for relative values |
| sort_comments | string | best | Sort order for post thread comments: best, top, new, controversial, old, q&a |
| sort_search | string | relevance | Sort order for search results: relevance, hot, top, new, comments |
| sort_subreddit | string | hot | Sort order for subreddit feeds: hot, new, top, rising, controversial |
| include_nsfw | boolean | false | Include NSFW (adult) posts and comments in results |
| skip_comments | boolean | false | Return only post rows — skip all comments |
| skip_posts | boolean | false | Skip post rows. For post URLs: returns comments only. For user URLs: returns profile and comments. For subreddit URLs: returns subreddit metadata only |
| max_depth | integer | unlimited | Maximum nesting depth of comments to collect. 0 = top-level comments only, 1 = top-level + first replies, etc. Leave empty for full thread |
| keyword | string | null | Search keyword. Automatically constructs a Reddit search URL for the given keyword and subreddit(s) — no need to manually craft search URLs |
| post_type | string | any | Filter search results by post type: any, link, self, image, video, richvideo. Only applies to search URLs and keyword searches |
| search_comments | boolean | false | Search within comment bodies instead of post titles. Only applies to search URLs and keyword searches |
Squid Settings
| Setting | Type | Description |
|---|---|---|
| name | string | Display name for your squid configuration |
| concurrency | integer | Number of parallel scraping threads (default: 1) |
| export_unique_results | boolean | Export only unique results (deduplicated) |
| to_complete | boolean | Run until all tasks complete |
| no_line_breaks | boolean | Remove line breaks from results |
The
sort_comments, sort_search, and sort_subreddit parameters are each applied only when the input URL matches the corresponding type — they do not conflict with each other.fetch_since filters based on the created_at field of each post or comment. It is useful for incremental runs to avoid re-collecting old content.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": "Reddit Scraper (1)",
"concurrency": 1,
"export_unique_results": true,
"to_complete": false,
"no_line_breaks": true,
"params": {
"max_results": 500,
"fetch_since": "7d",
"sort_subreddit": "hot",
"sort_comments": "top",
"skip_comments": false,
"skip_posts": false,
"include_nsfw": false
}
}'
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}
squid_id = "YOUR_SQUID_HASH"
response = requests.post(f"{BASE_URL}/squids/{squid_id}",
headers=headers,
json={
"name": "Reddit Scraper (1)",
"concurrency": 1,
"export_unique_results": True,
"to_complete": False,
"no_line_breaks": True,
"params": {
"max_results": 500,
"fetch_since": "7d",
"sort_subreddit": "hot",
"sort_comments": "top",
"skip_comments": False,
"skip_posts": False,
"include_nsfw": False
}
}
)
data = response.json()
print(f"Settings updated: {data['name']}")
Response
201
{
"name": "Reddit Scraper (1)",
"concurrency": 1,
"export_unique_results": true,
"to_complete": false,
"no_line_breaks": true,
"params": {
"max_results": 500,
"fetch_since": "7d",
"sort_subreddit": "hot",
"sort_comments": "top",
"skip_comments": false,
"skip_posts": false,
"include_nsfw": false
}
}
⌘I