Docs › Network and contact checks
TLS check API
A website's certificate and TLS setup, checked from India.
Connects to a host on port 443 and reports what a browser would care about: whether the certificate is valid for the name and leads to a trusted root, how many days it has left, the chain as the server sends it with each certificate's issuer, key and signature, the TLS version, cipher and HTTP/2 negotiated, OCSP stapling and certificate transparency, and which of TLS 1.0, 1.1, 1.2 and 1.3 the server accepts and whether it takes a weak cipher. Problems come as a plain list, errors and warnings, rather than a grade. Only public addresses are checked, and only port 443. Counts as 20 requests against the rate limit.
Check a host's TLS
GET/v1/tls/{host}
valid is false when any problem is an error: expired, not yet valid, name_mismatch, self_signed, incomplete_chain, untrusted, weak_key or sha1_signature. Warnings (expires_soon, old_versions, no_tls13, weak_cipher, chain_order) leave it true. Each version is tried with its own handshake offering every cipher Go supports; SSL 3 is not tested.
| Parameter | Description |
|---|---|
hostpath, required | Domain name or public IPv4 address. |
curl
curl "https://api.dharun.dev/v1/tls/dharun.dev?utm_medium=docs"JavaScript
const response = await fetch("https://api.dharun.dev/v1/tls/dharun.dev?utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/tls/dharun.dev?utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Guides
Using an AI assistant? Connect the MCP server and it can call this API by itself.