Developers

API, badge and embed

Free, no key, no sign-up. Please be gentle: limits are per IP address.

JSON API

GET /api/audit?url=<domain> returns the full scan. CORS is open, so you can call it from a browser.

curl
curl "https://httpaudit.vercel.app/api/audit?url=example.com"
JavaScript
const res = await fetch("https://httpaudit.vercel.app/api/audit?url=example.com");
const result = await res.json();
console.log(result.grade, result.score);
ParameterMeaning
urlA public domain or URL. Only the hostname is used; https://hostname/ is scanned.
fresh=1Skip the 10-minute cache and scan now (stricter limit).
private=1Keep this scan out of the public history.

Response fields

gradeA+ to F
scorePoints; 100 is the baseline, bonuses can take it above
checks[]Every check: id, category, title, status (pass, warn, fail, info), score, message, value
recommendations[]Headers to add or change: name, value, note
notes[]Fixes that aren't headers (redirects, cookie flags)
headersResponse headers of the final page, lower-cased
redirects[]Each hop: url, status, location
tlsconnected, authorized, protocol, issuer, validTo, daysLeft
finalUrl, statusWhere the redirects ended and its HTTP status
checkedAtWhen the scan ran (ISO 8601). Results are cached for 10 minutes
errorPresent only when the site couldn't be loaded

Errors: 400 for a missing or non-public domain, 429 when rate limited (with Retry-After). A site that can't be reached returns 200 with an error field. What each check id means: glossary.

README badge

Example badge: security A+ An SVG that shows the current grade, cached for a day.

Markdown
[![HTTP Audit](https://httpaudit.vercel.app/badge/yoursite.com)](https://httpaudit.vercel.app/r/yoursite.com)
HTML
<a href="https://httpaudit.vercel.app/r/yoursite.com"><img src="https://httpaudit.vercel.app/badge/yoursite.com" alt="HTTP Audit security grade"></a>

Embed widget

A live grade card for a trust or security page. It links to the full report.

Script tag (recommended)
<script src="https://httpaudit.vercel.app/embed.js" data-host="yoursite.com" async></script>
Iframe
<iframe src="https://httpaudit.vercel.app/embed/yoursite.com" title="Security grade" width="380" height="150" style="border:0;max-width:100%" loading="lazy"></iframe>

Themes: data-theme="light" or "dark" on the script, ?theme= on the iframe. By default it follows the visitor's system setting.

Limits

EndpointPer IP, per minute
/api/audit10 (3 with fresh=1)
/badge, /embed60

Only public domains on ports 80 and 443 can be scanned. Need more, or scanning internal sites? Run the CLI or import { audit } from "httpaudit" yourself; it has no limits.

CLI & CI

Terminal
npx httpaudit yoursite.com --fix nextjs --fail-under B

For CI, the GitHub Action fails builds on low grades or regressions, comments on pull requests and uploads SARIF. Full options are in the README.