{"uid":"cap_vnCK9VOwkXVd2tZ6Y-y8l","slug":"nostr-relay-health-check-9ace6c3a","name":"Nostr Relay Health Check","description":"Every relay is measured twice over. Over WebSocket a genuine REQ query is sent and the connection time, the time to end of stored events and the number of events returned are recorded — a relay that accepts the connection and then stays silent is the failure mode a reachability ping cannot see.","url":"https://nostr.halowerk.com/relay-health","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"relays":{"type":"array","items":{"type":"string"},"maxItems":12,"minItems":1,"description":"wss relay addresses. Left empty, ten measured default relays are used."},"probe_kind":{"type":"integer","default":1,"maximum":65535,"minimum":0,"description":"Event kind used for the probe query."},"read_nip11":{"type":"boolean","default":true,"description":"Also read the NIP-11 information document over https."},"timeout_ms":{"type":"integer","default":4000,"maximum":6000,"minimum":500,"description":"Time limit per relay in milliseconds."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4EPj0YL715p4opaiIMsPm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Measures Nostr relay health by sending a genuine WebSocket REQ query and recording connection time, time-to-end-of-stored-events, and event count returned.","exampleAgentPrompt":"Can you run a deep health check on the Nostr relay at wss://relay.example.com — I need to know not just if it connects, but whether it's actually returning stored events and how long it takes?","exampleUseCases":[{"title":"Diagnosing a silent relay failure","prompt":"My Nostr client keeps timing out on wss://relay.damus.io — can you check if it's actually responding to REQ queries or just accepting the connection and going silent?"},{"title":"Benchmarking relay before adding to client","prompt":"Before I add wss://nostr.wine to my relay list, can you measure its connection time and how many events it returns so I know if it's worth using?"},{"title":"Monitoring relay health for infrastructure dashboard","prompt":"Run a health check on wss://nos.lol and give me the connection latency, how long it takes to finish sending stored events, and how many events came back."}],"resultDescription":"Returns connection time in milliseconds, time-to-end-of-stored-events, and the count of events returned — distinguishing genuinely healthy relays from those that accept connections but never deliver events.","failureModes":["Relay refuses WebSocket connection — connection error returned","Relay accepts connection but returns no events within timeout — silent failure detected","Invalid or unreachable relay URL — network error","Relay returns events but latency is extremely high — degraded performance flagged","Malformed relay response — parsing error"],"whenToPreferThis":"Use this endpoint when you need to go beyond a simple reachability ping and verify that a Nostr relay is actually delivering stored events over WebSocket. It catches the critical silent-failure mode — a relay that accepts connections but never responds to REQ queries — which ping-based checks miss entirely.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:42:13.282Z","isFirstParty":false}