Skip to content
Examples

Update Settings

Configure settings for your Facebook Marketplace Scraper squid

The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
POSThttps://api.lobstr.io/v1/squids/{squid_hash}

Update the configuration of your Facebook Marketplace Scraper squid. Pass crawler-specific settings inside the params object.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Must be application/json. Value: application/json

Body

paramsobject

Crawler-specific settings. See fields below.

Settings Fields

params.max_resultsinteger

Maximum number of listings to collect per task. Leave empty for unlimited.

params.max_unique_results_per_runinteger

Maximum number of unique listings retrieved across all tasks in the entire run. Leave empty for unlimited.

params.fetch_sincestring

Only collect listings published after this point (based on creation_time). Use a relative duration (e.g. "24h", "7d", "2w") or an absolute date (YYYY-MM-DD or YYYY-MM-DD HH:MM). On search URLs, Facebook's matching Date listed filter (last 24 hours, 7 days or 30 days) is added for you. Older listings are skipped and not billed.

params.fetch_since_timezonestring

Timezone for interpreting an absolute fetch_since date (e.g. "Europe/Paris"). Only applies when fetch_since is an absolute date — ignored for relative values like "24h" or "7d".

params.exclude_outside_searchboolean

Skip the listings Facebook shows under "Results from outside your search" (outside your search area, or only loosely related to your query) and stop paging once that section starts. Skipped listings are not billed. Default: false.

params.listing_detailsboolean

Visit each listing's detail page to collect additional fields: full description, condition, precise location (latitude/longitude), seller profile, discount price, and structured listing attributes. Requires one additional request per listing.

To collect only new listings on a schedule, set fetch_since to the schedule interval ("24h" for a daily run, "7d" for a weekly one). It also applies to the listings under "Results from outside your search", so each run collects, and bills, only the listings published since the previous run. Set exclude_outside_search to true only if you don't want those listings at all.

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": "Facebook Marketplace Paris",
    "params": {
      "max_results": 200,
      "fetch_since": "24h",
      "exclude_outside_search": true,
      "listing_details": false
    }
  }'

Response

201
{
  "id": "YOUR_SQUID_HASH",
  "name": "Facebook Marketplace Paris",
  "crawler": {
    "id": "facebook-marketplace-scraper",
    "name": "Facebook Marketplace Scraper",
    "slug": "facebook-marketplace-scraper"
  },
  "params": {
    "max_results": 200,
    "fetch_since": "24h",
    "exclude_outside_search": true,
    "listing_details": false
  },
  "concurrency": 1,
  "export_unique_results": true,
  "to_complete": true,
  "no_line_breaks": false,
  "status": "idle"
}