Snag Watcher

Getting started

Quickstart

1. Get a key

Sign up and save your key as an environment variable so the examples below work as is:

Shell
export SNAG_KEY=sw_...

If you'd rather not write code yet, the playground 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.

Shell
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" }
  }'

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 shows how to reach it.

Shell
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.

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). 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 has every check we ran and why it did or didn't match.