Security Headers Grade API - A-F Rating for Any URL
Fetches the target URL and evaluates 6 security headers: Strict-Transport-Security (25pts), Content-Security-Policy (25pts), X-Content-Type-Options (15pts), X-Frame-Options (10pts), Referrer-Policy (15pts), and Permissions-Policy (10pts). Returns an overall score out of 100, letter grade, per-header breakdown, and recommendations for missing headers.
Code examples
curl -X POST https://api.botoi.com/v1/security/grade \
-H "Content-Type: application/json" \
-d '{"url":"https://stripe.com"}'When to use this API
CI/CD security gates
Add a security header check to your deployment pipeline. Fail the build if the grade drops below B, preventing configuration regressions from reaching production.
Security posture dashboards
Batch-grade all your company's domains and track scores over time. Surface domains with missing HSTS or CSP headers for the security team to prioritize.
Client security audits
Include security header grades in client deliverables. Grade the client's domain before and after your recommendations to show measurable improvement.
Frequently asked questions
What headers does the grading check?
How is the letter grade calculated?
Does this check the actual TLS certificate?
Can I grade URLs behind authentication?
Why does my site score 0 on Content-Security-Policy?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.