Watch API
The Watch class periodically polls a web page and detects changes in extracted fields. It supports typed callbacks for content, price, stock, and structural changes.
5 min read Updated July 2026
Python Usage
Node.js Usage
Parameters
| Method | Default | Description |
|---|---|---|
| field(name, selector) | — | Field to monitor for changes |
| interval(secs) | 300 | Polling interval in seconds |
| on_change(callback) | — | Callback function invoked on change events |
| tolerance(pct) | 0.0 | Price change percentage tolerance (e.g. 0.05 = 5%) |
Change Event Properties
| Property | Type | Description |
|---|---|---|
| field | str | Name of the field that changed |
| old_value | str | Baseline extracted value |
| new_value | str | Newly extracted value |
| event_type | str | ContentChange, PriceChange, StockChange, ElementAdded, ElementRemoved |
