API Documentation
Domain Health Checker API
Use this API for extensions, automations, or external tools. The easiest starting point is the combined
POST /api/ext/v1/inspect endpoint.
Base URLs
- Local:
http://127.0.0.1:3000 - Production:
https://serverdiagnosis.abirhasan.dev
CORS
All /api/* routes return permissive CORS headers, so a Chrome extension can call them directly.
Best Endpoint
POST /api/ext/v1/inspect
Runs the relevant checks for a domain or a public IP in one request.
{
"target": "abirhasan.dev",
"includeShare": false
}
Domain Example
curl -s -X POST http://127.0.0.1:3000/api/ext/v1/inspect \
-H "Content-Type: application/json" \
-d '{"target":"abirhasan.dev"}'
IP Example
curl -s -X POST http://127.0.0.1:3000/api/ext/v1/inspect \
-H "Content-Type: application/json" \
-d '{"target":"203.0.113.10","includeShare":true}'
Response Shape
{
"target": "203.0.113.10",
"targetType": "ip",
"checkedAt": "2026-05-18T00:00:00.000Z",
"domainResult": null,
"portsResult": {},
"ipInfo": {},
"pingResult": {},
"redirectsResult": null,
"share": {
"id": "747160ca34c22110",
"url": "http://127.0.0.1:3000/?server=203.0.113.10"
}
}
For domains,
domainResult and redirectsResult are populated. For IPs,
domainResult and redirectsResult are null.
The extension routes live under
/api/ext/* so custom extension behavior does not interfere with the main app's original routes.
Other Endpoints
POST /api/check- domain-only inspectionPOST /api/check/section- re-run one domain sectionPOST /api/check/ports- port scan for domain or public IPPOST /api/ext/check/ports- extension-only port scan with optional custom portsPOST /api/ip-info- provider, ASN, RDAP, PTRPOST /api/ping- full ping result after 20 probesGET /api/ping/stream?target=...- live probe-by-probe ping streamPOST /api/redirects- redirect trace for domains/URLsPOST /api/share- create/update share snapshotGET /api/share/:id- load share by IDGET /api/share/by-site/:target- load latest share by normalized target
Share URL Rules
- Domains use
?site=example.com - IPs use
?server=203.0.113.10
Chrome Extension Example
const response = await fetch("https://serverdiagnosis.abirhasan.dev/api/ext/v1/inspect", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
target: "203.0.113.10",
includeShare: true
})
});
const data = await response.json();
console.log(data);
Validation Rules
- Accepts public domains, public IPv4, public IPv6, and normalizable URLs
- Rejects localhost, private IPs, internal hostnames, and suspicious shell-like input
Notes
- No API key is required right now.
- API requests are rate-limited per IP.
- The full markdown version of the docs also exists at
/API.md.