Menu

Monitor

Monitor quickstart

Create a monitor, let it run, and read what changed.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

Example
Shell
curl https://api.millionshort.com/v1/monitors \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "query",
    "name": "bridge tenders",
    "query": "bridge inspection",
    "source": "contracts",
    "top_n": 10,
    "interval_minutes": 1440
  }'

The answer is the monitor, with its id. The first check records a baseline and sends nothing, unless notify_on_create is true. After that, an event is made whenever a result appears among the first top_n that this monitor has not seen.

2. Or watch a page

Example
Shell
curl https://api.millionshort.com/v1/monitors \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "url",
    "url": "https://example.org/pricing",
    "mode": "live",
    "ignore": ["numbers", "dates"],
    "min_change_chars": 40,
    "interval_minutes": 60
  }'

ignore and min_change_chars keep a counter or a date in the page from making an event every hour.

3. Read the events

Example
Shell
curl "https://api.millionshort.com/v1/monitors/$MONITOR_ID/events?limit=50" \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY"

Pass the id of the last event you handled as after to get only newer ones. Pulling is free.

4. Or have them delivered

Register a webhook, verify it, and pass its id as webhook_id when you create the monitor. Events then arrive signed, and can still be pulled.

Next

This page as Markdown · llms.txt