NetDiag Documentation | Multi-Region Network Diagnostics API
NetDiag is a network diagnostics API that checks DNS, TLS, HTTP, and ping health from multiple global regions. Get started with our JavaScript, .NET, or Python SDKs.
NetDiag is a network diagnostics API. It runs DNS, TLS, HTTP, and ping checks on any target from 3 geographic regions (US, EU, Asia-Pacific) simultaneously and returns a unified JSON response.
What You Get
| Check | What It Does |
|---|---|
| Ping | ICMP latency measurement with TCP fallback for cloud environments |
| DNS | Resolution + propagation status (detects when regions resolve to different IPs) |
| TLS | Certificate validity, expiry date, issuer, protocol version |
| HTTP | Status code, response time, endpoint availability |
Quick Example
curl "https://api.netdiag.dev/v1/checks?target=example.com"
Response:
{
"status": "Healthy",
"quorum": "3/3",
"dnsPropagationStatus": "consistent",
"locations": [
{ "region": "us-west", "status": "Healthy", "ping": {...}, "dns": {...}, "tls": {...}, "http": {...} },
{ "region": "eu-central", "status": "Healthy", ... },
{ "region": "ap-southeast", "status": "Healthy", ... }
]
}
SDK Clients
Choose your preferred language to integrate NetDiag into your applications:
JS
JavaScript
Node.js & Browsernpm i @netdiag/client
Full TypeScript support. Works in Node.js 18+ and modern browsers.
.NET
.NET
C# / .NET 8+dotnet add package Xakpc.NetDiag.Client
Dependency injection ready. Supports async/await and IHttpClientFactory.
PY
Python
Python 3.10+pip install netdiag-client
Context manager support. Type hints and dataclasses included.
SDK Methods
All clients implement these methods:
| Method | Description |
|---|---|
check(target) |
Run full diagnostics on a target |
checkPrometheus(target) |
Get results in Prometheus metrics format |
isHealthy(target) |
Quick boolean health check |
getStatus(target) |
Get status enum (Healthy/Warning/Unhealthy) |