Monitors are services that periodically check Nostr relays and publish their findings as signed NIP-66 events. Each monitor announces itself with a kind 10166 event and publishes kind 30166 status events for every relay it checks. The rstate aggregation engine tracks these monitors, scores their reliability, and exposes the results through the endpoints documented here. The relaymon service is the reference monitor implementation used in the nostr.watch network. Multiple independent monitors operate across different geographic regions. Their combined observations form the consensus dataset that the rest of the API serves.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sandwichfarm/nostr-watch/llms.txt
Use this file to discover all available pages before exploring further.
Monitor pubkeys are stable Nostr public keys in hex format. You can query individual monitors by pubkey to inspect their coverage and reliability scores.
GET /monitors
List all known monitors with their reliability scores, sorted by last seen (most recent first). Response:Array of monitor objects. Each monitor includes its pubkey, last seen timestamp, declared check frequency, and network coverage.
Total number of known monitors.
Reliability analytics for each monitor. Includes coverage, consistency, and timeliness scores.
GET /monitors/:pubkey
Get detailed information about a specific monitor by its hex pubkey. Path parameters:The monitor’s Nostr pubkey in hex format (64 hex characters).
{ monitor, analytics }
The monitor’s configuration derived from its kind 10166 event: pubkey, frequency, networks covered, check types, timeouts, and optional geolocation.
Reliability analytics for this monitor:
GET /monitors/:pubkey/analytics
Get analytics data for a specific monitor without the full monitor object. Path parameters:The monitor’s Nostr pubkey in hex format.
GET /monitors/analytics
Get aggregated analytics across all monitors. Useful for understanding the overall health of the monitoring network. Response: Array of analytics objects, one per monitor.GET /policy
Get the current aggregation policy. The policy controls how rstate combines observations from multiple monitors to produce consensus values. Response:Minimum fraction of monitors that must report a value for it to be included in the aggregated result (0–1).
Minimum support ratio for label values (NIP-32
L/l tags) to be included in aggregated output (0–1).Median Absolute Deviation scale factor used for numeric outlier rejection. Higher values are more permissive.
PUT /policy
Update the aggregation policy. This endpoint requires NIP-98 HTTP authentication and the caller’s pubkey must be in the server’sallowedPubkeys configuration.
Headers:
| Header | Value |
|---|---|
Authorization | Nostr <base64-encoded-signed-kind-27235-event> |
Content-Type | application/json |
New quorum threshold (0–1).
New label quorum threshold (0–1).
New MAD scale factor for outlier detection.
New weighting object with
recency and reliability fields (must sum to 1).{ success, policy, message }
What monitors report
A monitor’s kind 10166 announcement event documents its configuration. Key fields relevant to understanding reliability scores:| Field | Tag | Meaning |
|---|---|---|
| Check frequency | frequency | How often the monitor runs checks, in seconds |
| Networks | n | Which networks the monitor covers: clearnet, tor, i2p |
| Check types | c | Which checks are performed: open, read, write, ssl, dns, geo, info |
| Timeouts | timeout | Per-check timeout in ms |
| Location | g | Monitor’s geographic location as a geohash |