Skip to main content
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>'

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

Configure 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

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY
Content-Type
string
required
Request body format. Value: application/json

Scraper Parameters

Set these parameters in the params object:
ParameterTypeDefaultDescription
max_resultsintegerunlimitedMaximum number of rows (posts + comments) to collect per task
max_unique_results_per_runintegerunlimitedMaximum unique results across all tasks in the run
fetch_sincestringnullStop collecting content older than this threshold. Use a relative duration (24h, 7d, 2w) or absolute date (YYYY-MM-DD HH:MM)
fetch_since_timezonestringnullTimezone for interpreting an absolute fetch_since date (e.g. Europe/Paris). Ignored for relative values
sort_commentsstringbestSort order for post thread comments: best, top, new, controversial, old, q&a
sort_searchstringrelevanceSort order for search results: relevance, hot, top, new, comments
sort_subredditstringhotSort order for subreddit feeds: hot, new, top, rising, controversial
include_nsfwbooleanfalseInclude NSFW (adult) posts and comments in results
skip_commentsbooleanfalseReturn only post rows — skip all comments
skip_postsbooleanfalseSkip post rows. For post URLs: returns comments only. For user URLs: returns profile and comments. For subreddit URLs: returns subreddit metadata only

Squid Settings

SettingTypeDescription
namestringDisplay name for your squid configuration
concurrencyintegerNumber of parallel scraping threads (default: 1)
export_unique_resultsbooleanExport only unique results (deduplicated)
to_completebooleanRun until all tasks complete
no_line_breaksbooleanRemove 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
    }
  }'

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
  }
}