Skip to main content

Watches

A watch is a standing order: keep this page fresh to within a time you choose, and tell me when it changes or stops being readable. Each read is an ordinary job, so everything a job does (render modes, robots.txt, pacing, retries, quotas and result storage) applies to watches too.

Creating and updating

Create a watch with POST /v1/watches:

POST /v1/watches
Authorization: Bearer <key>
Content-Type: application/json

{
  "external_id": "source-123",
  "labels": ["catalogue", "region:north"],
  "request": {
    "url": "https://example.com/catalogue",
    "render": "auto",
    "output": "document",
    "policy": {"robots": true}
  },
  "compare": {
    "on": "text",
    "confirm_changes": true,
    "ignore_selectors": [".rotating-banner"],
    "ignore": [{"pattern": "(?i)updated.*", "unless": "important"}]
  },
  "freshness": {"max_age": "1d", "min_interval": "1h"},
  "lifecycle": {"gone_after": 2, "on_gone": "keep_checking", "follow_moves": "same_site"},
  "schedule": "auto",
  "emit_checks": false
}

The request

request is the body a one-off job takes; see Jobs. A watch keeps reading the whole page, so a few things are refused with 400 invalid_watch_request:

Render options a worker can't run are refused with 400 unsupported_option, as they are for jobs.

Freshness and scheduling

Field Meaning
freshness.max_age Required. How stale the page may get: Netscrape reads it at least this often while it's active and readable. From 1 hour to 90 days.
freshness.min_interval The most often Netscrape may read it, including when you ask. At least 1 hour and no more than max_age. Defaults to max_age.
schedule auto (default): Netscrape schedules reads. manual: you do; see manual watches.

Durations are whole seconds or strings such as "6h" or "14d" (hours or days). Responses give them in seconds.

You can also ask for a read now with POST /v1/watches/:id/check. It's refused with 429 check_rate_limited within min_interval of the last read, and with 409 check_pending while a read is still in flight.

Comparisons

compare.on chooses what a read is compared on:

Mode Compares Good for
text (default) The page's visible body text, normalised and masked Most HTML pages
bytes The raw response bytes PDFs, images, feeds, exact copies
extract The values your request's extract rules read Pages where only certain fields matter

text and extract need output to be body or document; extract also needs extract rules in the request. In extract mode, a selector that stops matching becomes null and the version is flagged extract_empty, and each watch.changed event lists the fields that changed with their before and after values.

Masks and ignore rules

In text mode Netscrape compares body text, not titles, JSON-LD or contact links, and first removes common noise from each line:

Add your own rules for anything else:

A read whose compared text comes out empty counts as a failed read (empty_document), not as a change.

Confirmation re-reads

Some pages change on every read: carousels, A/B tests, "featured" blocks. A confirmation re-read stops those from reaching you.

Reversals

A page that goes 50 → 60 → 50 has changed twice, and anyone holding 60 needs to hear about the return to 50. Netscrape keeps the fingerprints of a watch's last eight versions. A read that returns to one of them is always confirmed by a re-read unless confirm_changes is false. If it holds, watch.changed is sent with reversal: true and the earlier_version it matches.

A state that holds across a confirmation is never hidden.

Health states

Health is what Netscrape last saw. It's separate from status, which you control.

Health Enters when (defaults) Reads while in it
pending Created, re-enrolled, or robots.txt allows the page again First eligible read
healthy A read succeeds (2xx, no challenge) Normal schedule
failing 3 failed reads in a row, spanning at least 24 hours After 1 h, 4 h, 1 day, 2 days, then every max_age
gone 2 reads at least 24 hours apart answer 404, 410 or no such domain, or a move that isn't followed Every 7 days, or your max_age if longer; or the watch pauses with on_gone: "pause"
blocked 2 reads in a row answer 403 or 406, or show a challenge After 1 day, 3 days, 7 days, then every 14 days
robots_disallowed robots.txt refuses the page Only robots.txt is re-read, at most once a day per origin, then weekly after a week; see robots.txt. Page reads resume when it's allowed.

Every move between states sends watch.health_changed with from, to, a reason and the evidence (status, challenge vendor). Retry delays never come sooner than min_interval. Any successful read returns the watch to healthy.

Tune the thresholds per watch in lifecycle:

Option Default Range
failing_after 3 1–100
failing_span 86400 seconds 0–90 days
gone_after 2 1–100
gone_spacing 86400 seconds 0–90 days
blocked_after 2 1–100
on_gone keep_checking keep_checking or pause
follow_moves same_site same_site or never

Some failures aren't the page's fault, and never change its health: Netscrape's own faults, a job that expired in the queue, and waits for quota. If Netscrape can't submit a read at all, for example because a render option is no longer supported, the watch turns failing at once with evidence.stage: "submission" and tries again after min_interval; no read happens and nothing is metered.

Moves

When a read ends on a permanent redirect (301 or 308) instead of following it, Netscrape sends watch.moved. With follow_moves: "same_site", a move to the same host updates the watch's URL, up to three times. Otherwise the move is reported with followed: false and counts toward gone.

Pausing, resuming and retiring

Suspending an account pauses its active watches. Resume the labels you want afterwards.

Delivered checks

An unchanged read sends nothing, but sometimes you need the page anyway: your own rules changed, or someone asked for a recheck.

A delivered check always ends in watch.checked with delivered: true, changed, and a result_url for that read, even if the page didn't change or the read failed. See resync and recovery.

Set emit_checks: true on a watch to get watch.checked for every read, not only delivered ones.

Manual watches

With "schedule": "manual" Netscrape never schedules reads; you do, by adding "watch_id" to your own POST /v1/jobs requests. Each such job is judged as a check of the watch: compared, given a health, turned into events. This lets you keep your own schedule while Netscrape does the comparison, without reading any site twice.

Labels and filters

A watch has up to 50 labels, each 1–256 bytes; external_id is 1–256 bytes. List watches with GET /v1/watches, filtered by status, health, schedule, label, url_prefix or changed_since. Labels match exactly. See the API reference.

Retention

Data Kept
The watch While it's active or paused, and 90 days after it's retired
Change history (watch.changed events, with diffs and field values) The life of the watch, plus 90 days after it's retired
All events in the feed 30 days
Check records 90 days; unchanged, undelivered checks become daily counts after 30 days
The current version, and the compared text used for the next diff Only the latest; up to 200,000 characters of text
Page bodies 7 days, like every job result

Only the current version is stored in full. Earlier versions survive as change events, and the fingerprints of the last eight are kept to spot reversals. Diffs are capped at 32 KiB and say truncated: true when shortened.