Menu

Monitor

Monitor parameters

The endpoints, every field of a monitor, the intervals each plan and source allows, and the events.

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

A monitor is a saved target, an interval and a place to deliver events.

KindTargetA change isCredits per check
queryA search: a query, one source, and the search filtersA result URL this monitor has not seen before, among the first top_n results1
urlOne pageThe page's main text differs from the last check by more than min_change_charsThe price of the mode: 0.5 for live, 2 for rendered

A check that fails, is put off, or cannot be paid for is free, except a rendered check whose page the site says does not exist (404, 410), which is charged like a check that ran.

Endpoints

EndpointWhat it does
POST /v1/monitorsCreate a monitor
GET /v1/monitorsList your monitors. Free
GET /v1/monitors/{id}One monitor. Free
PATCH /v1/monitors/{id}Change status (active or paused), interval_minutes, webhook_id or name
DELETE /v1/monitors/{id}Delete it
POST /v1/monitors/{id}/runCheck now. Charged like a scheduled check. Four an hour per monitor
GET /v1/monitors/{id}/eventsPull its events. Free. Events are kept 30 days

Create a query monitor

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

Create a URL monitor

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

Fields

FieldTypeDefaultNotes
kindquery or urlRequired
interval_minutesinteger, 1 to 43,200Required. How often to check. The longest is 30 days. The shortest your monitor may use depends on the plan and the source (below): no plan or source today allows less than 5 minutes, and a shorter value is refused with the shortest allowed
namestring, up to 120 charactersA label for you
webhook_idstringAn active webhook endpoint. Without it, you pull events
notify_on_createbooleanfalseThe first check records a baseline and sends nothing, unless this is true
confirm_afterinteger, 0 to 50A change must still be there on the next n checks before the event is sent
querystringquery monitors: what to search for
sourceone sourcequery monitors: social, hn, news, law, contracts, podcasts, academic, medical or finance
filtersobjectquery monitors: the search request's domain lists, page types, topics and safe_search
top_ninteger, 1 to 2510query monitors: how far down the list to look for new results
urlstringurl monitors: the page to watch
modelive or rendered"live"url monitors: how the page is fetched
ignorearray of numbers, datesurl monitors: kinds of change to disregard
min_change_charsinteger, 0 to 10,00040url monitors: the smallest change worth an event

Sources and intervals

A query monitor watches one source, and only sources that are kept current:

SourceShortest interval
social, hn15 minutes (5 minutes on the Scale plan and above)
news1 hour
law, contracts, podcasts, academic, medical, finance24 hours
web, smallweb, discussions, communitiesNot offered. The call answers 400 UNSUPPORTED_OPTION. Watch a page with a url monitor instead

web is left out on purpose: it is refreshed periodically, so a monitor on it would report the index changing, not the world.

PlanActive monitorsShortest interval
Free324 hours
Starter251 hour
Growth10015 minutes
Scale5005 minutes (social, hn)
Business2,0005 minutes

A monitor's shortest interval is the longer of its plan's and its source's. A url monitor follows the plan column, and is never shorter than 15 minutes.

A monitor

FieldTypeNotes
idstring
kindquery or url
namestring or null
statusactive or paused
paused_reasonstring or nulluser, insufficient_credits, webhook_disabled, failing, unavailable or plan. Monitor errors says what each means
targetobjectWhat it watches
interval_minutesinteger
webhook_idstring or null
last_checked_at, last_changed_at, next_check_atdate and time, or null
consecutive_failuresinteger
created_atdate and time

Events

Events are delivered to the monitor's webhook when it has one, and can always be pulled:

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.

Every event has id (evt_ and an identifier), type, monitor_id, created_at and data.

TypeWhendata
monitor.changed, queryNew result URLs appearedkind, new_results (each with title, url, site, source, snippet, published_date, position, topic, page_type, source_hint, label_confidence), checked_at
monitor.changed, URLThe page changedkind, url, topic, page_type, source_hint, label_confidence, added, removed, truncated, previous_hash, current_hash, checked_at
monitor.failed3 checks in a row failedcode, message, consecutive_failures
monitor.pausedOut of credits 3 checks in a row, or its webhook endpoint was disabledreason

Every monitor.changed event says what its pages are, with the same labels an extracted page carries, so the program that receives an event can route it without fetching anything. A page event carries the labels of the page as it is now. A new search result carries the topic and page_type the search gave it where it gave them, and otherwise ones read from its title and snippet; its source_hint is the source it came from. A label that is a known fact rather than a reading has a null confidence. Any label can be null, as on Extract. Labels are free.

added and removed are the changed blocks of text, capped at 20 KB together. We keep the last two snapshots of a watched page, not its history.

Behaviour to know

Errors

400 INVALID_PARAM, which includes an interval shorter than the plan and the source allow (error.details.min_interval_minutes says the shortest); 400 UNSUPPORTED_OPTION for a source a query monitor cannot watch; 401 for a missing or refused key; 404 JOB_NOT_FOUND for a monitor that does not exist or is not yours; 429. See Errors.

Over MCP

The MCP server has a read-only list_monitor_events tool. No MCP tool creates or deletes a monitor.

Without a monitor

A search run on a schedule that remembers the URLs it has seen does the same job in your own code. The news monitoring guide has both ways.

This page as Markdown · llms.txt