Get started with DiffWatch
You're 3 API calls away from monitoring any website for changes. Works with any language, any framework, any AI agent.
Get Your API Key
Create a free account and generate an API key from the dashboard.
Create API Key and copy your key. That's it!Your API key starts with dw_live_ — keep it secret, never expose it in client-side code.
Create Your First Monitor
One API call to start watching a URL for changes.
# Create a monitor that checks every hour
curl -X POST https://api.diff.watch/v1/monitors \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/pricing",
"interval": "1h",
"webhook_url": "https://your-app.com/webhook"
}'{
"id": "mon_a1b2c3d4",
"url": "https://example.com/pricing",
"status": "active",
"interval": "1h",
"next_check": "2025-01-01T01:00:00Z"
}Supported intervals: 1m 5m 15m 30m 1h 6h 12h 24h. Minimum interval depends on your plan.
Receive Webhooks
When a change is detected, DiffWatch POSTs a signed payload to your webhook URL.
{
"event": "monitor.changed",
"id": "evt_xxx",
"created_at": "2025-01-01T01:05:00Z",
"data": {
"monitor_id": "mon_a1b2c3d4",
"url": "https://example.com/pricing",
"change_id": "chg_x9y8z7",
"changes": {
"added": ["Enterprise plan: $299/mo"],
"removed": ["Enterprise plan: $199/mo"],
"added_count": 1,
"removed_count": 1,
"summary": "Price changed from $199 to $299",
"similarity": 0.95
},
"detected_at": "2025-01-01T01:05:00Z"
}
}// Verify the X-DiffWatch-Signature header
import { createHmac } from "node:crypto"
function verifyWebhook(body: string, signature: string, secret: string) {
const expected = createHmac("sha256", secret)
.update(body).digest("hex")
return signature === `sha256=${expected}`
}Webhook payload fields
event— Always"monitor.changed"data.changes.added/removed— Arrays of changed text linesdata.changes.summary— Human-readable description of changesdata.changes.similarity— 0 to 1 score (1 = identical, lower = bigger change)
TypeScript SDK
Install the official SDK for type-safe API access. Zero dependencies.
npm install @diffwatch/sdkimport { DiffWatch } from "@diffwatch/sdk"
const dw = new DiffWatch("dw_live_xxx")
// Create a monitor
const monitor = await dw.monitors.create({
url: "https://example.com/pricing",
interval: "1h",
webhook_url: "https://your-app.com/webhook",
})
// List all monitors
const monitors = await dw.monitors.list()
// Get changes for a monitor
const changes = await dw.monitors.changes(monitor.id)
// Force an immediate check
await dw.monitors.check(monitor.id)
// Get the latest snapshot content
const snapshot = await dw.monitors.snapshot(monitor.id)MCP Integration
Connect DiffWatch to AI assistants via the Model Context Protocol. Two modes available.
The MCP server lets AI agents like Claude, Cursor, and Windsurf create monitors, check changes, and manage webhooks directly. Choose the mode that fits your workflow:
Runs locally via npx. Best for local AI editors like Claude Desktop and Cursor.
{
"mcpServers": {
"diffwatch": {
"command": "npx",
"args": ["-y", "@diffwatch/mcp-server"],
"env": {
"DIFFWATCH_API_KEY": "dw_live_xxx"
}
}
}
}{
"mcpServers": {
"diffwatch": {
"command": "npx",
"args": ["-y", "@diffwatch/mcp-server"],
"env": {
"DIFFWATCH_API_KEY": "dw_live_xxx"
}
}
}
}claude mcp add diffwatch -- npx -y @diffwatch/mcp-server
# Set your API key in the env when promptedcodex mcp add diffwatch -- npx -y @diffwatch/mcp-serverConnects directly to the DiffWatch server. No local install, just browser login via OAuth. Works with any MCP-compatible client.
{
"mcpServers": {
"diffwatch": {
"type": "http",
"url": "https://api.diff.watch/mcp"
}
}
}claude mcp add --transport http diffwatch https://api.diff.watch/mcpOn first use, your AI client will open a browser window for login. After that, sessions persist automatically.
Available MCP tools
diffwatch_list_monitorsList all monitors with statusdiffwatch_create_monitorCreate a new website monitordiffwatch_get_changesGet detected changes for a monitordiffwatch_check_nowForce an immediate checkdiffwatch_get_snapshotGet the latest scraped page contentdiffwatch_delete_monitorDelete a monitor and its historyAPI Reference
Full REST API with interactive examples.
Explore every endpoint in the interactive Swagger UI, powered by OpenAPI 3.1.
https://api.diff.watchx-api-key: dw_live_xxxEndpoints
/v1/monitors— List monitors/v1/monitors— Create monitor/v1/monitors/:id— Get monitor/v1/monitors/:id— Update monitor/v1/monitors/:id— Delete monitor/v1/monitors/:id/changes— List changes/v1/monitors/:id/check— Force check/v1/monitors/:id/snapshot— Get snapshotReady to start monitoring?
Create your free account and make your first API call in under 30 seconds. No credit card required.