Snag Watcher API https://watcher-api-staging.manwhas.shop

Guides

Follow-up watchers

Some watches only make sense in order: "when the store lists the new keyboard, tell me when it's under $200". Until it's listed, there's no page to watch for a price.

Put the second watcher in then. When the first one matches, we create it on the page that matched.

JSON
{
  "target": { "query": "Q6 HE", "match": "line" },
  "conditions": { "all": [{ "field": "availability", "op": "=", "value": "in_stock" }] },
  "where": { "sites": ["keychron.com"], "aggregate": "first" },
  "schedule": { "every": "1h", "until": "+180d" },
  "then": {
    "conditions": { "all": [{ "field": "price", "op": "<", "value": 200 }] },
    "schedule": { "every": "6h", "until": "+90d" }
  }
}

What the follow-up gets

FieldValue
targetmatch: url on the page that matched, with the parent's attributes
conditions, scheduleFrom then
whereFrom then, or the site that matched
notifyFrom then, or the parent's
location, fetchThe parent's

The parent's matched event names it:

JSON
"then": [{ "url": "https://www.keychron.com/products/keychron-q6-he-wireless-custom-keyboard", "child_id": "wch_8s1d4f6g7h2j3k5l9q0w" }]

The follow-up has parent_id set and works like any other watcher.

Rules

  • The parent must stop at its first match: until: "after_first_match", or aggregate: "first".
  • One level only. A then can't hold another then.
  • then is checked when you create the parent, so a bad one fails right away.
  • If the account is at its watcher limit, the event says "then_skipped": "limit" instead.