# Change Monitor

> Watch a page and see what was added or removed since the last check.

Source: http://localhost:3000/docs/endpoints/change-monitor

## Change Monitor: `POST /v1/change-monitor/`

Snapshot a page and report added, removed and changed content since last check. Cost: 2 credits.

```bash
curl -X POST https://api.hushsearch.io/v1/change-monitor/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/"
}'
```

Two calls: register a page, then ask what changed.

## Watch a page

**POST** `/v1/change-monitor/` with `{"url": "https://example.com/"}` takes a first snapshot.

```json
{ "url": "https://example.com/", "watched": true, "first_run": true, "credits_used": 2, "credits_remaining": 498 }
```

## Check for changes

**GET** `/v1/change-monitor/?url=https://example.com/` compares the page with the last snapshot.

```json
{
  "url": "https://example.com/",
  "changed": true,
  "first_run": false,
  "added": ["New pricing tier: Team"],
  "removed": [],
  "added_count": 1,
  "removed_count": 0,
  "snapshot_chars": 5120,
  "credits_used": 2,
  "credits_remaining": 496
}
```

Each call costs 2 credits. Pair it with a scheduler, or with [Jobs](http://localhost:3000/docs/endpoints/jobs) and [Webhooks](http://localhost:3000/docs/endpoints/webhooks), to get notified.
