# Introduction Source: https://watcher.staging.manwhas.shop/docs/introduction # Snag Watcher API You tell us what to look for and on which sites, and we check those pages on a schedule. When something matches, like a price dropping or a size coming back in stock, we send a signed webhook to your server. Here's a watcher for size 10 Allbirds Wool Runners. It checks every hour for 30 days and sends you a webhook once they're back in stock. ```json { "target": { "query": "https://www.allbirds.com/products/mens-wool-runners", "match": "url", "attributes": { "size": 10 } }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "back_in_stock" }] }, "where": { "sites": ["allbirds.com"] }, "schedule": { "every": "1h", "until": "+30d" }, "notify": { "channels": ["webhook"], "webhook": { "url": "https://you.example/hook", "events": ["matched"] } } } ``` ## What you can watch | Watch for | Example | |---|---| | Price | A microphone under $100, or 10% below its price when you started watching | | Availability | A size or color coming back in stock at any of a few stores | | Release | The next version of a product, or a new GitHub release | | Slots | Open campsite nights before a certain date, within 25 miles | You don't pick the kind yourself. It comes from your conditions, and one watcher can check more than one thing, like "back in stock and 10% cheaper". ## Which sites work Most online stores work, along with marketplaces, booking pages, ticket sites, release feeds and a lot more. The list of sites that can be read is here: [Sites](/docs/sites). If your site isn't on the list, you can still watch it. We can learn how to read the page, or watch it for any change in its text. ## Where to go next - [Quickstart](/docs/quickstart): make your first watcher in about five minutes - [Recipes](/docs/recipes): requests you can copy for the common cases - [Create a watcher](/docs/create-watcher): every field, explained --- # Quickstart Source: https://watcher.staging.manwhas.shop/docs/quickstart # Quickstart ## 1. Get a key [Sign up](https://api.watcher.staging.manwhas.shop/signup) and save your key as an environment variable so the examples below work as is: ```sh export SNAG_KEY=sw_... ``` If you'd rather not write code yet, the [playground](https://watcher.staging.manwhas.shop/dashboard/new) does the next two steps with a form. ## 2. Preview a watcher You can preview a page to show what a watcher would see, without starting one. It's a quick way to check if we can read the site before you set up a watcher. ```sh curl curl https://api.watcher.staging.manwhas.shop/v1/watchers/preview \ -H "Authorization: Bearer $SNAG_KEY" \ -H "Content-Type: application/json" \ -d '{ "target": { "query": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "match": "url" }, "conditions": { "all": [{ "field": "price", "op": "<=", "value": 100 }] }, "where": { "sites": ["sweetwater.com"] }, "schedule": { "every": "1h", "until": "+30d" } }' ``` ```js Node const response = await fetch('https://api.watcher.staging.manwhas.shop/v1/watchers/preview', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SNAG_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ target: { query: 'https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone', match: 'url' }, conditions: { all: [{ field: 'price', op: '<=', value: 100 }] }, where: { sites: ['sweetwater.com'] }, schedule: { every: '1h', until: '+30d' }, }), }); console.log(await response.json()); ``` ```python Python import os, requests response = requests.post( "https://api.watcher.staging.manwhas.shop/v1/watchers/preview", headers={"Authorization": f"Bearer {os.environ['SNAG_KEY']}"}, json={ "target": {"query": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "match": "url"}, "conditions": {"all": [{"field": "price", "op": "<=", "value": 100}]}, "where": {"sites": ["sweetwater.com"]}, "schedule": {"every": "1h", "until": "+30d"}, }, ) print(response.json()) ``` ```json Response { "kind": "price", "schedule": { "every": "1h" }, "clamped": [], "warnings": ["sweetwater.com has no extractor of its own; it's read as Any product page with schema.org data. Check the preview before relying on it."], "would_match": true, "sites": [ { "site": "sweetwater.com", "outcome": "ok", "candidates": 1, "matched": true, "fields": [{ "url": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "title": "SM58 Cardioid Dynamic Vocal Microphone", "price": { "cents": 8900, "currency": "USD" }, "availability": "in_stock" }] } ] } ``` ## 3. Create the watcher Send the same body to `POST /v1/watchers` and add your webhook URL under `notify`. The URL has to be public and use https. If your server is running on your laptop, [local webhooks](/docs/authentication#local-webhooks) shows how to reach it. ```sh curl https://api.watcher.staging.manwhas.shop/v1/watchers \ -H "Authorization: Bearer $SNAG_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: sm58-under-100" \ -d '{ "target": { "query": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "match": "url" }, "conditions": { "all": [{ "field": "price", "op": "<=", "value": 100 }] }, "where": { "sites": ["sweetwater.com"] }, "schedule": { "every": "1h", "until": "+30d" }, "notify": { "channels": ["webhook"], "webhook": { "url": "https://you.example/snag", "events": ["matched", "changed", "blocked"] } } }' ``` The response includes a `webhook_secret`, and it's only shown once. You'll need it to [verify signatures](/docs/webhooks#verify-the-signature). ## 4. Get the webhook You don't have to wait for a real match to test your endpoint. `POST /v1/watchers/{id}/test-webhook` sends it a signed `test` event right away ([Send a test webhook](/docs/test-webhook)). Once the price is $100 or less, we send this: ```json { "id": "evt_4m2k9q8x7c1v0b3n5z6w", "type": "matched", "created_at": "2026-11-04T19:38:44.390Z", "watcher_id": "wch_dhjqcvaqnhrchsnv7gtc", "kind": "price", "data": { "group": "site:sweetwater.com", "results": [{ "site": "sweetwater.com", "url": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "title": "SM58 Cardioid Dynamic Vocal Microphone", "price": { "cents": 8900, "currency": "USD" }, "availability": "in_stock" }] } } ``` Reply with any 2xx status. After that, you only hear from us again when the result changes (`repeat` is `on_change` by default). If nothing shows up, [List runs](/docs/list-runs) has every check we ran and why it did or didn't match. --- # Authentication Source: https://watcher.staging.manwhas.shop/docs/authentication # Authentication Send your key as a bearer token on every request to `/v1/watchers`, `/v1/events` and `/v1/usage`: ```sh curl https://api.watcher.staging.manwhas.shop/v1/watchers -H "Authorization: Bearer sw_..." ``` A missing, unknown or revoked key gets `401 unauthorized`. Each key belongs to one account and only sees that account's watchers. Make and revoke keys in the [dashboard](https://watcher.staging.manwhas.shop/dashboard/keys). We only keep a hash, so you see a key once, when you make it. ## Test keys Make a test key on the [API keys](https://watcher.staging.manwhas.shop/dashboard/keys) page. It starts with `sw_test_` and works like a live key, except: - Its watchers don't count toward your 100, and you can have 10 at a time. - Each one ends within a day, whatever `until` says, and the response says so in `warnings`. - Every event from them has `"test": true` in the envelope. Previews work the same with either key. ## Local webhooks We send webhooks from our servers, so the URL has to be public https, and `localhost` would point at our machine. If your server runs on your laptop, open a tunnel like `cloudflared tunnel --url http://localhost:3000` or `ngrok http 3000` and use the https address it prints. ## Idempotency If you send an `Idempotency-Key` header with `POST /v1/watchers`, you can retry without making a second watcher. For 24 hours, the same key with the same body gets the first response back, and the same key with a different body gets `409 idempotency_conflict`. ## Rate limits Each key gets 120 requests a minute. Past that you get `429 rate_limited`, with a `Retry-After` header in seconds. The other limits are on [Limits](/docs/limits). --- # Limits Source: https://watcher.staging.manwhas.shop/docs/limits # Limits ## Price You pay $1.50 per 1,000 credits. Every account gets 5,000 free credits each calendar month (UTC), and we only bill what you use past that. A check is one read of one site for one watcher on one scheduled run, so a watcher with three sites makes three checks a run. Each check costs: | What | Credits | |---|---| | A check that read the page (outcome `ok`) | 1 | | Each Bright Data request the check needed, like Web Unlocker for a protected page, a Reddit read or a remote browser session | +1 | | Each captcha solved for the check | +2 | | Each AI judge call for a `judge` condition, added to the run's first `ok` check | +1 | | A check that was `blocked`, `unreachable`, `not_found` or `failed` | 0 | A check that doesn't read the page costs nothing, even if it needed Bright Data or a captcha on the way. If two of your watchers read the same page within a minute, we fetch it once, but each still pays for its own check, extras included. Previews are free, and so is learning a new page when you create a watcher. Every snapshot has its `credits` and a `credit_parts` breakdown, like `{ "check": 1, "brightdata": 1, "captcha": 2 }`. ## Account limits | Limit | Value | Over it | |---|---|---| | Watchers | 100 active or paused at a time | `403 limit_reached` | | Test key watchers | 10 at a time, on top of the 100, each ending within a day | `403 limit_reached` | | API requests | 120 a minute per key | `429 rate_limited` with `Retry-After` | | Browser runs with steps | 200 a day | The check fails with `usage_limit` and you get `failing` | | Captcha solves | 100 a day | The check fails with `usage_limit`, captcha unsolved | | AI judge calls | 20 a day per watcher | The `judge` condition counts as unknown, and the change waits for a later run | | API keys | 20 live keys | The dashboard won't make more | Daily caps reset at 00:00 UTC. Each site also has a [minimum interval](/docs/schedules#minimum-intervals) between checks. ## Check your usage `GET /v1/usage` ```sh curl https://api.watcher.staging.manwhas.shop/v1/usage -H "Authorization: Bearer $SNAG_KEY" ``` ```json { "plan": "beta", "price": "$1.50 per 1,000 credits", "credits": { "month": "2026-11", "used": 6240, "free_allowance": 5000, "billable": 1240, "price_per_1000_usd": 1.5, "estimated_usd": 1.86, "by_part": { "check": 5200, "brightdata": 640, "captcha": 320, "judge": 80 } }, "watchers": { "active": 12, "limit": 100 }, "test_watchers": { "active": 1, "limit": 10 }, "requests_per_minute": 120, "today": { "step_runs": { "used": 4, "limit": 200 }, "captcha_solves": { "used": 0, "limit": 100 }, "resets_at": "2026-11-11T00:00:00.000Z" } } ``` `credits.used` counts this month so far, and `estimated_usd` is what the `billable` part costs. The same numbers are on the [API keys](https://watcher.staging.manwhas.shop/dashboard/keys) page. ## List charged checks `GET /v1/usage/checks` This lists every check that cost credits, newest first. To pick a period, pass `since` (included) and `until` (not included) as ISO 8601 times. `limit` sets the page size, from 1 to 500 (default 100). For the next page, pass `next_cursor` as `cursor`; it's `null` on the last page. A bad value gets `400 invalid_request`. ```sh curl "https://api.watcher.staging.manwhas.shop/v1/usage/checks?since=2026-11-01T00:00:00Z&limit=2" -H "Authorization: Bearer $SNAG_KEY" ``` ```json { "data": [ { "id": 1042, "watcher_id": "wch_8f2k1m", "end_user": null, "run_at": "2026-11-18T12:15:00.000Z", "site": "allbirds.com", "outcome": "ok", "credits": 4, "credit_parts": { "check": 1, "brightdata": 1, "captcha": 2 } }, { "id": 1041, "watcher_id": "wch_8f2k1m", "end_user": null, "run_at": "2026-11-18T12:00:00.000Z", "site": "allbirds.com", "outcome": "ok", "credits": 1, "credit_parts": { "check": 1 } } ], "next_cursor": "MjAyNi0xMS0xOFQxMjowMDowMC4wMDBafDEwNDE" } ``` A check stays in this list after its watcher is deleted. --- # SDKs, CLI and MCP Source: https://watcher.staging.manwhas.shop/docs/sdks # SDKs, CLI and MCP The clients aren't on npm or PyPI yet. Until they are, call the API with curl, fetch or requests, like in the [quickstart](/docs/quickstart). ## TypeScript ```js Node import { SnagWatcher, verifyWebhook } from 'snag-watcher'; const snag = new SnagWatcher({ apiKey: process.env.SNAG_KEY }); const preview = await snag.watchers.preview(request); const watcher = await snag.watchers.create(request); for await (const run of snag.watchers.runsAll(watcher.watcher_id)) console.log(run.run_at, run.summary); ``` Errors throw a `SnagWatcherError` with `status`, `code`, `field`, `errors`, `suggestion` and `retryAfter`. `verifyWebhook({ secret, rawBody, signature })` checks a webhook [signature](/docs/webhooks#verify-the-signature). ## Python ```python Python from snag_watcher import SnagWatcher, verify_webhook snag = SnagWatcher() # reads SNAG_KEY preview = snag.watchers.preview(request) watcher = snag.watchers.create(request) for run in snag.watchers.runs(watcher["watcher_id"])["data"]: print(run["run_at"], run["summary"]) ``` It needs Python 3.9 or later and only the standard library. Errors raise a `SnagWatcherError`. ## CLI The TypeScript package also installs a `snag-watcher` command: ```sh export SNAG_KEY=sw_... snag-watcher watch preview watch.json snag-watcher watch create watch.json snag-watcher watch runs wch_dhjqcvaqnhrchsnv7gtc snag-watcher watch test-webhook wch_dhjqcvaqnhrchsnv7gtc snag-watcher usage ``` ## MCP server `snag-watcher-mcp` lets coding assistants like Claude Code, Claude Desktop or Cursor preview, create and read watchers with your key. It tells them to preview before creating. This command will work once the package is on npm: ```sh claude mcp add snag-watcher -e SNAG_KEY=sw_... -- npx snag-watcher-mcp ``` ## llms.txt [/llms.txt](https://watcher.staging.manwhas.shop/llms.txt) lists every docs page, and [/llms-full.txt](https://watcher.staging.manwhas.shop/llms-full.txt) has all of them in one Markdown file you can paste into a model's context. --- # Recipes Source: https://watcher.staging.manwhas.shop/docs/recipes # Recipes Send any of these to `POST /v1/watchers` with your own webhook URL in `notify`. ## Size back in stock One size of a product on a Shopify store comes back in stock. ```json { "target": { "query": "https://www.allbirds.com/products/mens-wool-runners", "match": "url", "attributes": { "size": 10 } }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "back_in_stock" }] }, "where": { "sites": ["allbirds.com"] }, "schedule": { "every": "1h", "until": "+30d" } } ``` `back_in_stock` is only true on the check where the size comes back. To hear as soon as it's available, even on the first check, use `in_stock`. ## Price drop from today The price is 10% or more under what it was on the first check. ```json { "target": { "query": "https://www.sweetwater.com/store/detail/SM58--shure-sm58-cardioid-dynamic-vocal-microphone", "match": "url" }, "conditions": { "all": [{ "field": "price_drop", "op": ">=", "value": "10%", "compare_to": "first_snapshot" }] }, "where": { "sites": ["sweetwater.com"] }, "schedule": { "every": "6h", "until": "+90d" } } ``` ## Cheapest of several stores You get the cheapest of three stores that has size 10 in stock at $120 or less. ```json { "target": { "query": "Brooks Ghost 17", "match": "exact", "attributes": { "size": 10 } }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "in_stock" }, { "field": "price", "op": "<=", "value": 120 }] }, "where": { "sites": ["brooksrunning.com", "runningwarehouse.com", "zappos.com"], "aggregate": "best" }, "schedule": { "every": "1h", "until": "+30d" } } ``` ## New product at a store Keychron lists anything new with "Q1" in its name, other than the Q1 Pro. ```json { "target": { "query": "Q1", "match": "line", "exclude": ["Q1 Pro"] }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "in_stock" }] }, "where": { "sites": ["keychron.com"] }, "schedule": { "every": "1h", "until": "+60d" }, "notify": { "channels": ["webhook"], "repeat": "on_change", "webhook": { "url": "https://you.example/hook", "events": ["matched", "changed"] } } } ``` The first webhook lists what already matches, and after that you get `changed` for each new product. ## New post on a subreddit Someone on r/Pen_Swap sells a Pilot Custom 823 for $250 or less, leaving out "want to buy" posts. ```json { "target": { "query": "Custom 823", "match": "line", "exclude": ["WTB"] }, "conditions": { "all": [ { "field": "availability", "op": "=", "value": "in_stock" }, { "field": "price", "op": "<=", "value": 250 } ] }, "where": { "sites": ["reddit.com/r/Pen_Swap"] }, "schedule": { "every": "5m", "until": "+30d" }, "notify": { "channels": ["webhook"], "repeat": "on_change", "webhook": { "url": "https://you.example/hook", "events": ["matched", "changed"] } } } ``` Each result is a post: `url` links to it, `seller` is the author, `date` is when it was posted, and `price` is the first dollar amount in the title, or in the text if the title has none. A post is `out_of_stock` once its flair says sold (or closed, pending, traded and so on), its title has `[SOLD]`, or it's removed. The first webhook lists the posts that already match, and after that you get `changed` for each new one. ## Next release of a repo Node.js ships its first release at version 25 or above, and the watcher stops. ```json { "target": { "query": "node", "match": "line" }, "conditions": { "all": [{ "field": "version", "op": ">=", "value": 25 }, { "field": "release_status", "op": "=", "value": "available" }] }, "where": { "sites": ["github.com/nodejs/node"] }, "schedule": { "every": "1h", "until": "after_first_match" } } ``` Prereleases come through as `announced`, so `available` skips them. ## Two sizes at the same store One store has both size 10 and 10.5 in stock at the same time. ```json { "target": { "query": "Brooks Ghost 17", "match": "exact", "attributes": { "size": [10, 10.5] } }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "in_stock", "over": { "key": "sizes", "require": "all", "same": "seller" } }] }, "where": { "sites": ["runningwarehouse.com", "zappos.com"] }, "schedule": { "every": "1h", "until": "+14d" } } ``` ## New product, then its price When Keychron lists a new "Q6 HE", a second watcher starts on that product page and waits for a price under $200. See [Follow-up watchers](/docs/follow-ups). ```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" } } } ``` ## A booked time opens up A 15-minute slot opens on a Cal.com page between November 9 and 13, in New York time. ```json { "target": { "query": "cal.com/peer/15", "match": "listing", "attributes": { "from": "2026-11-09", "to": "2026-11-13", "time_zone": "America/New_York" } }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "open_slot" }] }, "where": { "sites": ["cal.com/peer/15"] }, "schedule": { "every": "5m", "until": "+7d" } } ``` Cal.com only lists open times, so a booked time drops out of the results. If someone cancels, it comes back and you get `changed`, even inside the cooldown. Each result's `date` is the start with its UTC offset. ## A job at a company Discord posts a new remote engineering job on its Greenhouse board. Internships don't count. ```json { "target": { "query": "engineer", "match": "line", "attributes": { "remote": true }, "exclude": ["intern"] }, "conditions": { "all": [{ "field": "availability", "op": "=", "value": "in_stock" }] }, "where": { "sites": ["boards.greenhouse.io/discord"] }, "schedule": { "every": "15m", "until": "+30d" }, "notify": { "channels": ["webhook"], "repeat": "on_change", "webhook": { "url": "https://you.example/hook", "events": ["matched", "changed"] } } } ``` An open job counts as `in_stock`. The first webhook lists the jobs that already match, and after that you get `changed` for each new one. Lever, Ashby and Workday boards work the same way. ## A token moves 0.5% in 10 minutes BONK on Solana moves 0.5% up or down within 10 minutes, read from DexScreener every minute. ```json { "target": { "query": "https://dexscreener.com/solana/DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", "match": "url" }, "conditions": { "all": [{ "field": "price_move", "op": ">=", "value": "0.5%", "compare_to": "window", "window": "10m" }] }, "where": { "sites": ["dexscreener.com"] }, "schedule": { "every": "1m", "until": "+7d" }, "notify": { "channels": ["webhook"], "repeat": "every_match", "cooldown": "5m", "webhook": { "url": "https://you.example/hook", "events": ["matched"] } } } ``` The link can be a pair or a token address. We keep exact prices, so a move on a $0.000028 token is measured on the real number. The window compares with the oldest check in the last 10 minutes ([compare_to](/docs/conditions#window)). ## A status page incident Cloudflare's Durable Objects component stops being operational, or an incident mentions it. ```json { "target": { "query": "Durable Objects", "match": "line" }, "conditions": { "any": [ { "field": "status", "op": "changed" }, { "field": "status", "op": "in", "value": ["partial_outage", "major_outage"] } ] }, "where": { "sites": ["statuspage:www.cloudflarestatus.com"] }, "schedule": { "every": "5m", "until": "+30d" } } ``` Each component, incident and maintenance is a `record` with a `status` and a `record_type` (`component`, `incident`, `maintenance` or `page`). For the whole page, use `match: listing`. A status page on its own domain needs the `statuspage:` or `instatus:` prefix. ## A page's text changes Python's downloads page lists 3.16.0, or its release list changes at all. ```json { "target": { "query": "https://www.python.org/downloads/", "match": "url", "attributes": { "selector": ".download-list-widget .release-number", "contains": "Python 3.16.0" } }, "conditions": { "any": [ { "field": "contains", "op": "=", "value": true }, { "field": "text_hash", "op": "changed" } ] }, "where": { "sites": ["change:https://www.python.org/downloads/"] }, "schedule": { "every": "1h", "until": "+30d" } } ``` A text watch can't tell a release from a typo fix, only that the text changed or the phrase appeared. Preview it to check the selector picks the part you meant. Every attribute is in [Page changes](/docs/conditions#page-changes). ## A haircut at a salon, under a price Robert's regular haircut at a Booksy barber shop costs $40 or less. ```json { "target": { "query": "https://booksy.com/en-us/388730_barber-shop-nyc_barber-shop_30067_new-york-city", "match": "url", "attributes": { "service": "Regular Haircut", "staff": "Robert" } }, "conditions": { "all": [{ "field": "price", "op": "<=", "value": 40 }] }, "where": { "sites": ["booksy.com/en-us/388730_barber-shop-nyc_barber-shop_30067_new-york-city"] }, "schedule": { "every": "6h", "until": "+30d" } } ``` On Booksy and Fresha we read the service menu: one result per service, with its price, length and staff. We can't read open times there, because Booksy's robots.txt disallows its time-slot API and Fresha opens a cart and can show a captcha for each search. Vagaro and Boulevard are waiting on a review. To hear when a time opens, the salon has to book through a site where we read times, like Cal.com ([A booked time opens up](#a-booked-time-opens-up)) or Jane App for clinics. ## A bill's next action Senate bill 3331 has a new action, like being reported, passed or signed into law. ```json { "target": { "query": "https://www.congress.gov/bill/119th-congress/senate-bill/3331", "match": "url" }, "conditions": { "all": [{ "field": "latest_action", "op": "changed" }] }, "where": { "sites": ["congress.gov"] }, "schedule": { "every": "1h", "until": "+180d" } } ``` Each check reads the bill's latest action and its date, and we work out a `status` from its wording (`introduced`, `reported`, `passed`, `to_executive`, `became_law`, `vetoed`, `failed` or `in_progress`), so `{ "field": "status", "op": "=", "value": "became_law" }` waits until it's law. Congress.gov doesn't publish a status, so this is our reading of the text. State bills work the same way through Open States (`openstates.org/nc/bills/2025/HB1105`). If Congress.gov or Open States isn't connected yet, creating the watcher fails with `site_unavailable`. ## A PDF changes, and what changed The IRS posts a new revision of Form W-9. ```json { "target": { "query": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "match": "url" }, "conditions": { "all": [{ "field": "text_hash", "op": "changed" }] }, "where": { "sites": ["change:https://www.irs.gov/pub/irs-pdf/fw9.pdf"] }, "schedule": { "every": "1d", "until": "+180d" } } ``` A link ending in `.pdf` is read as a PDF, and the result is a `document` with the text of every page, `pages`, `pdf_title` and `pdf_modified`. When the text changes, `last_change` says what moved, like `changed "Rev. October 2018" to "Rev. March 2024"`, and how many paragraphs were added, removed and changed. Add `"summarize": true` to the attributes for a one or two sentence summary written by an LLM. A scanned PDF with no text layer reads as empty. We store the last version, so a deploy on our side doesn't lose the "before" text. ## Something new on a list CISA posts a new press release on its newsroom. ```json { "target": { "query": "https://www.cisa.gov/news-events/news", "match": "url", "attributes": { "list": "article.c-teaser" } }, "conditions": { "all": [{ "field": "items", "op": "added" }] }, "where": { "sites": ["change:https://www.cisa.gov/news-events/news"] }, "schedule": { "every": "1h", "until": "+30d" } } ``` `list` is a CSS selector for the item that repeats. Each match becomes a `record` keyed by its link, with its title, `href`, `position` and the `date` from its `