Skip to content

JSON API

Base URL: https://qsafe.sh. No key and no signup. The machine-readable spec is at qsafe.sh/openapi.yaml, and every endpoint is in the API reference.

Endpoint Scans? Use it to
GET /api/v1/scan?domain= Yes, unless a result under 1 h exists Get a report
GET /api/v1/result/{domain} Never Read the latest saved report
GET /api/v1/history/{domain} Never Chart the last 30 scores
POST /api/v1/bulk Never Look up up to 50 domains (guide)
GET /api/v1/fixes[/{stack}] Never Get config fixes (fix guides)
GET /api/v1/methodology Never Read the scoring rules
GET /api/v1/leaderboard Never Read the public leaderboard
Terminal window
curl -s "https://qsafe.sh/api/v1/scan?domain=example.com"

A trimmed response:

{
"scan_id": "m4k2x9c1a7",
"permalink": "https://qsafe.sh/r/example.com?scan=m4k2x9c1a7",
"cached": false,
"private": false,
"domain": "example.com",
"score": 58,
"band": "orange",
"label": "Not yet",
"key_exchange": { "negotiated": "X25519", "post_quantum": false, "pq_groups_supported": [], "prefers_pq": false },
"tls_versions": { "TLS 1.0": false, "TLS 1.1": false, "TLS 1.2": true, "TLS 1.3": true },
"stack": [{ "id": "nginx", "name": "Nginx", "kind": "server", "evidence": ["server: nginx"] }],
"findings": [
{
"id": "KEX_CLASSICAL_ONLY",
"severity": "high",
"title": "No post-quantum key exchange",
"fix": "Run Nginx on OpenSSL 3.5 or newer. Then make sure the group list includes the hybrid:",
"snippet": "ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;",
"snippet_where": "nginx.conf, http or server block",
"fix_guide": "nginx"
}
]
}

Every field is described in the Report schema.

  • A public result under one hour old is returned instead of scanning (cached: true). Add fresh=1 to force a new scan.
  • private=1 results are never reused or listed anywhere, so they always scan.
  • result, history, bulk, fixes, methodology and badges never scan, so they’re free to call.

Errors are RFC 9457 problem details:

{ "type": "about:blank", "title": "rate_limited", "status": 429, "detail": "Too many scans from your network. Try again in a minute." }
Status title Meaning
400 bad_request The request body isn’t valid JSON or is missing a field.
404 not_found Nothing saved for that domain or scan id, or unknown stack.
422 invalid_domain, no_dns, private_address Not a public hostname we can scan: an IP literal, no A/AAAA records, or it points to a private address.
429 rate_limited A limit was hit. Wait Retry-After seconds.
502 scanner_error The scan didn’t finish, usually a timeout on the target. Try again later.
  • Read saved results with result or bulk before scanning.
  • Only scan domains you own or operate, or public sites for research. See the scanner bot page for how site owners can opt out.