I work on the change detection in MeshArc, so I spend a lot of time on one question: why do website change monitors end up muted? Usually it's noise. A banner rotated, a "last updated" stamp ticked over, or a page timed out and got reported as deleted. What I actually want is narrower: watch a whole section of a site, hear about real edits only, and keep every version of every page in a table I can query next quarter.
This is that pipeline in three stages (the diff, the alert, the table), plus the cases where you shouldn't build it this way at all.
What a change monitor has to get right
Four things separate a monitor you trust from one you mute:
- Coverage. A regulator's guidance library or a competitor's docs is hundreds of pages, and new pages matter as much as edited ones. Ten hand-picked URLs will miss the page published on Tuesday.
- Noise. Consent banners, rotating widgets and timestamps change on every load. If they reach the diff, every page is "modified" every day.
- Refusal is not removal. A page that came back blocked, timed out or showed a captcha this run hasn't been deleted. A monitor that can't tell the difference will one day report half a site as gone.
- History. An alert tells you something changed today. A table tells you what the page said in March.
Keep these four in mind even if you never touch the code below. They're the checklist for any tool you pick.
Stage 1: the diff
In MeshArc a watched site is a project: a seed URL, a scope and a schedule. The first run sets the baseline. Every later run produces a change record that compares each page with its previous version.
pip install mesharc
# or: npm install mesharc
from mesharc import MeshArc
arc = MeshArc() # reads MESHARC_API_KEY
project = arc.projects.create(
"https://www.example.gov/guidance",
name="Regulator guidance",
schedule="daily", # manual | hourly | daily | weekly
config={
"max_pages": 300,
"include_paths": ["/guidance/*"],
},
)
arc.runs.start(project["id"], wait=True) # run 1: the baseline
# ...the next scheduled run (or another runs.start) produces the change record
record = arc.changes(project["id"])
print(record["change"]["counts"])
# {'added': …, 'removed': …, 'modified': …, 'withheld': …}
diff = arc.page_diff(project["id"], "https://www.example.gov/guidance/fees")
Each page in the record is classed as added, removed, modified, same, withheld, unverified or skipped. Three behaviours do most of the work:
- Noise is stripped before comparison. Consent banners, rotating widgets and "last updated" stamps come out first, so they never reach the diff.
- Withheld is not removed. A page the site refused this run is withheld, never removed. If a run reaches under 90% of the site, removals are held back altogether and the record says why, so an interrupted crawl isn't read as a mass deletion.
- Fields, not just text. Next to the word-level diff you get field-level changes to titles, dates, canonicals and prices. A field that suddenly goes empty on every page is raised as a broken selector, not reported as a thousand edits.
The third one is the one I'd steal for any homegrown monitor. If the same field disappears everywhere at once, the site didn't change. Your parser did.
Coverage comes from the sitemap. MeshArc walks robots.txt, the well-known paths and sitemap indexes, so a page that shows up in the sitemap is flagged as added on the run after it's published. On gov.uk one discovery mapped 508,290 URLs, which is a decent upper bound on "too many pages to watch by hand".
A quick word on cost, because it shapes the design: the change records, diffs, alerts and webhooks cost nothing. You pay for the page reads (1 credit for a plain page, 4 when it needs a real browser). Refused pages and 404s cost 0. Turn on sitemap_incremental and a page the sitemap says hasn't changed is carried over from the last run without a fetch, so a mostly static section gets cheap to watch daily.
Stage 2: the alert
There are two ways to hear about a change, and most teams end up wanting both.
Slack, Teams or Discord: one URL
Set chat_url in the project's config to an incoming-webhook URL. Slack, Discord, Microsoft Teams (Workflows), Mattermost and Google Chat are supported, each in its own message format. Slack gets Block Kit.
arc.projects.update(project["id"], config={
"chat_url": "https://hooks.slack.com/services/T000/B000/XXXX",
"notify_min_words": 20, # default 5; edits smaller than this stay quiet
})
notify_min_words is what keeps the channel readable. A modified page whose edit is under that many changed words stays out of the page.changed alerts, so a typo fix lives in the change record and not in Slack. The default is 5; I'd start higher on a busy site and lower it once you trust the noise filter.
Chat messages are unsigned (that's how incoming webhooks work), and the API hands the URL back masked as https://hooks.slack.com/services/••••, so it doesn't leak through a config dump.
A signed webhook, for code
For anything automated, set webhook_url and webhook_events on the project. The two events worth subscribing to are run.finished (status, pages, counts, coverage, stop reason) and page.changed (each added, modified or removed page, with words added and removed). There's also page.blocked, site.failing / site.recovered and sitemap.added / sitemap.removed if you want to know when a site starts refusing you or restructures.
arc.projects.update(project["id"], config={
"webhook_url": "https://hooks.yourapp.com/mesharc",
"webhook_events": ["run.finished", "page.changed"],
})
Every delivery is a POST with a JSON body {id, event, createdAt, data} and a header X-MeshArc-Signature: sha256=<HMAC-SHA256 of the raw body>. Verify against the raw bytes before you parse anything, and answer with a 2xx within 10 seconds:
import hashlib, hmac, json, os
from http.server import BaseHTTPRequestHandler, HTTPServer
SECRET = os.environ["MESHARC_WEBHOOK_SECRET"].encode()
class Hook(BaseHTTPRequestHandler):
def do_POST(self):
raw = self.rfile.read(int(self.headers["Content-Length"]))
expected = "sha256=" + hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, self.headers.get("X-MeshArc-Signature", "")):
self.send_response(401); self.end_headers(); return
self.send_response(204); self.end_headers() # acknowledge first
msg = json.loads(raw)
if msg["event"] == "page.changed":
queue_for_review(msg["data"]) # your code, off the request path
HTTPServer(("", 8080), Hook).serve_forever()
Two habits in there are worth copying into any webhook receiver. hmac.compare_digest instead of ==, so the check doesn't leak timing. And acknowledge first, work afterwards: a slow handler turns into a failed delivery. Failed deliveries are retried (and retries cost nothing), so a short deploy on your side shouldn't lose a change, but don't lean on that for long outages.
Stage 3: the table
Alerts are for today. For "what did this page say before the 14 March update", you want every version in a database. MeshArc writes to warehouses, databases, vector stores, object stores and streams on every plan, Postgres among them, with no glue code.
Add a Postgres connection once (its secret is the dsn), then a destination on the project. These are the settings for a change log, from the connectors and destinations docs:
| Setting | Value for a change log | Why |
|---|---|---|
target |
site_changes |
Created if missing |
mode |
upsert |
ON CONFLICT on the key |
key |
url+content_hash |
One row per page version; url alone keeps only the latest |
incremental |
true |
Sends only added, modified and removed pages, field changes and the baseline |
schedule |
after_run |
Syncs when each run finishes |
The key row is the whole trick. Key on url and you have a mirror of the site. Key on url+content_hash and you have its history.
The default columns already carry the change: change_class, added_words, removed_words and changed_fields, next to url, crawled_at, content_hash, markdown, title and the rest. If you only care about part of a site, a shape filters rows (say, path matching /guidance/fees/*) and maps fields into typed columns. POST /destinations/preview shows you the shaped rows from the last run before you save anything:
curl -X POST https://api.mesharc.dev/api/v1/destinations/preview \
-H "Authorization: Bearer $MESHARC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id": "<id>", "columns": ["url","crawled_at","change_class","added_words","changed_fields"], "shape": {}}'
Once rows are landing, the questions are plain SQL:
-- What changed in the last 30 days, biggest edits first
SELECT url, change_class, added_words, removed_words, changed_fields, crawled_at
FROM site_changes
WHERE change_class IN ('added', 'modified', 'removed')
AND crawled_at > now() - interval '30 days'
ORDER BY added_words + removed_words DESC;
-- Every version of one page
SELECT crawled_at, content_hash, left(markdown, 200)
FROM site_changes
WHERE url = 'https://www.example.gov/guidance/fees'
ORDER BY crawled_at;
One limit to know: a single sync writes at most 20,000 rows. A monitor sending only changed pages rarely gets near it. For a full re-sync of a big site, set incremental: false on purpose and expect several syncs.
When not to build it this way
- A short list of URLs and a spare server? changedetection.io is open source and self-hostable. Hard to argue with free.
- The people reading the alerts aren't developers? Visualping and Distill give visual diffs, browser extensions and email. For a marketing team watching ten competitor pages they're friendlier than any API.
-
You need checks every few minutes? MeshArc's fastest schedule is hourly, on purpose. Firecrawl's
/monitorgoes down to every 5 minutes (checked 27 Nov 2026). Prices that move by the minute belong in a live feed, not a crawler.
Where this setup earns its keep is a whole section rather than a URL list, refusals that never pass for deletions, and a history that lands in your own Postgres. If you want to see what MeshArc returns for a page you keep checking by hand, try a URL in the playground.
Your turn
How do you keep change alerts from turning into noise? A word threshold like notify_min_words, an allow-list of fields, a human triage step, or something I haven't thought of? I'd like to hear what's survived contact with a real team.
Originally published on mesharc.dev.
Top comments (0)