Web data & tools
Website Security Audit API
Website security audit: headers, CSP, cookies, SSL/TLS and HTTPS, graded A+ to F with fixes.
Base URLhttps://website-security-audit-headers-ssl-grade.p.rapidapi.com/v1/site-auditopenapi.json
- Free plan
- 10 credits a day
- Paid plans
- from $3.99 a month
- One credit
- 1 credit per website audited.
- Endpoints
- 5, on
/v1/site-audit
Example call
curl -G "https://website-security-audit-headers-ssl-grade.p.rapidapi.com/v1/site-audit/audit" \
--data-urlencode "url=w3.org" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: website-security-audit-headers-ssl-grade.p.rapidapi.com"
import requests
url = "https://website-security-audit-headers-ssl-grade.p.rapidapi.com/v1/site-audit/audit"
params = {
"url": "w3.org"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "website-security-audit-headers-ssl-grade.p.rapidapi.com",
}
r = requests.get(url, params=params, headers=headers)
print(r.json())
const res = await fetch("https://website-security-audit-headers-ssl-grade.p.rapidapi.com/v1/site-audit/audit?url=w3.org", {
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "website-security-audit-headers-ssl-grade.p.rapidapi.com",
},
});
console.log(await res.json());
{
"url": "https://w3.org/",
"final_url": "https://www.w3.org/",
"status_code": 200,
"grade": "B",
"score": 75,
"summary": { "passed": 13, "warnings": 3, "failed": 0, "info": 4 },
"checks": [
{
"id": "csp",
"category": "headers",
"title": "Content-Security-Policy",
"status": "warn",
"points": -15,
"value": "frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests",
"message": "CSP is weak: no default-src or script-src: scripts are not restricted.",
"fix": {
"header": "Content-Security-Policy: frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests; default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data: https:; connect-src 'self' https:; object-src 'none'; base-uri 'self'; form-action 'self'",
"nginx": "add_header Content-Security-Policy \"frame-ancestors 'self' ...\" always;",
"apache": "Header always set Content-Security-Policy \"frame-ancestors 'self' ...\"",
"cloudflare": "Rules › Transform Rules › Modify Response Header › Set static header: Content-Security-Policy = ...",
"note": "Your directives, plus a script policy built from what this page loads. Deploy it first as Content-Security-Policy-Report-Only."
}
},
{
"id": "referrer_policy",
"category": "headers",
"title": "Referrer-Policy",
"status": "warn",
"points": -5,
"message": "No Referrer-Policy: set one so full URLs (and what they carry) are not sent to other sites.",
"fix": {
"header": "Referrer-Policy: strict-origin-when-cross-origin",
"nginx": "add_header Referrer-Policy \"strict-origin-when-cross-origin\" always;",
"apache": "Header always set Referrer-Policy \"strict-origin-when-cross-origin\"",
"cloudflare": "Rules › Transform Rules › Modify Response Header › Set static header: Referrer-Policy = strict-origin-when-cross-origin"
}
},
{
"id": "certificate",
"category": "tls",
"title": "TLS certificate",
"status": "pass",
"points": 0,
"value": "Google Trust Services, expires 2027-02-02",
"message": "Valid and trusted, 69 days left."
},
{
"id": "tls_versions",
"category": "tls",
"title": "TLS protocol versions",
"status": "pass",
"points": 0,
"value": "TLS 1.2, TLS 1.3",
"message": "Only TLS 1.2 and 1.3."
},
{
"id": "http_redirect",
"category": "https",
"title": "HTTP to HTTPS redirect",
"status": "pass",
"points": 0,
"value": "https://www.w3.org/",
"message": "http:// redirects to HTTPS (301)."
},
{
"id": "hsts",
"category": "headers",
"title": "Strict-Transport-Security (HSTS)",
"status": "pass",
"points": 0,
"value": "max-age=15552000; includeSubdomains; preload",
"message": "HSTS for 180 days."
},
{ "...": "14 more checks" }
],
"headers": {
"strict-transport-security": "max-age=15552000; includeSubdomains; preload",
"content-security-policy": "frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests",
"x-content-type-options": "nosniff",
"server": "cloudflare",
"content-type": "text/html; charset=UTF-8"
},
"cookies": [
{ "name": "__cf_bm", "secure": true, "http_only": true, "same_site": "None" }
],
"redirects": [
{ "url": "https://w3.org/", "status": 301, "location": "https://www.w3.org/" }
],
"http_redirects": [
{ "url": "http://w3.org/", "status": 301, "location": "https://www.w3.org/" }
],
"fixes": {
"nginx": "# Content-Security-Policy\nadd_header Content-Security-Policy \"...\" always;\n# Referrer-Policy\nadd_header Referrer-Policy \"strict-origin-when-cross-origin\" always;\n# Permissions-Policy\nadd_header Permissions-Policy \"camera=(), microphone=(), geolocation=(), payment=(), usb=()\" always;",
"apache": "# Content-Security-Policy\nHeader always set Content-Security-Policy \"...\"\n# Referrer-Policy\nHeader always set Referrer-Policy \"strict-origin-when-cross-origin\"\n...",
"cloudflare": [
"Rules › Transform Rules › Modify Response Header › Set static header: Referrer-Policy = strict-origin-when-cross-origin",
"..."
]
},
"tls": {
"certificate": {
"domain": "w3.org",
"valid": true,
"issuer": "WE1",
"issuer_organization": "Google Trust Services",
"names": ["w3.org", "*.w3.org"],
"valid_until": "2027-02-02T05:48:26Z",
"days_remaining": 69,
"key": "EC 256",
"protocol": "TLSv1.3"
},
"protocols": { "tls_1_0": false, "tls_1_1": false, "tls_1_2": true, "tls_1_3": true }
},
"files": {
"security_txt": { "found": false, "has_contact": false, "signed": false },
"robots_txt": { "found": true, "url": "https://www.w3.org/robots.txt", "sitemaps": 0 }
},
"notes": [
"The page has 3 inline script(s): give them a nonce or move them to files before enforcing a strict CSP.",
"Headers checked on https://www.w3.org/, where the site redirects."
],
"checked_at": "2026-11-24T20:14:18Z"
}
Audit Website Security: GET /v1/site-audit/audit. A real call and its real response, with long values shortened.
What the Website Security Audit API returns
One call tells you what an attacker sees first, and how to close it. Send a domain and get a grade from A+ to F, every finding explained, and the exact fix: the header line to send, the nginx and Apache directives, and where to click in Cloudflare. Security headers, cookies, HTTPS, the TLS certificate and protocol versions, all in one answer, from $0.0004 per audit: hundreds of times cheaper than the popular security audit API.
- Security headers
- Content-Security-Policy analysed for real weaknesses (
'unsafe-inline','unsafe-eval', wildcards, report-only), HSTS (max-age, includeSubDomains, preload), X-Frame-Options orframe-ancestors, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP, CORP, COEP - Cookies
- Secure, HttpOnly and SameSite on every cookie the server sets (names and flags only, never values)
- TLS
- Certificate validity (expired, wrong name, self-signed, incomplete chain), issuer, days left, and which protocol versions the server accepts, TLS 1.0 to 1.3
- HTTPS
- Does http:// redirect to https://, and is anything still loaded over http:// (mixed content)
- Leaks
- Server and framework versions in the headers (
Server: Apache/2.4.41,X-Powered-By: PHP/8.1) - Files
security.txt(RFC 9116, expiry checked) androbots.txt- A starter Content-Security-Policy
- Built from what the page really loads, ready to deploy in report-only mode
- Bulk
- 10 websites per call, and a mode that grades headers you paste, for staging servers and CI
Endpoints
Host website-security-audit-headers-ssl-grade.p.rapidapi.com, header X-RapidAPI-Key. Parameters and examples for each one are in the API reference.
Security Audit
Full audit of a website, or up to 10, graded A+ to F.
-
GET
/v1/site-audit/auditFull security audit of a website, graded A+ to F, with fixes -
POST
/v1/site-audit/audit/bulkAudit up to 10 websites in one call
Headers
Security headers and cookies of a page, or of headers you paste.
-
GET
/v1/site-audit/headersGrade the security headers and cookies of one page -
POST
/v1/site-audit/headers/analyzeGrade response headers you paste (staging, CI)
TLS
Certificate validity and expiry, and TLS versions accepted.
Use cases
- Agencies and freelancers. Audit a client's site in one call and paste the fixes into the report
- SaaS security dashboards. Grade every customer domain and track it over time
- CI/CD. Grade the headers of a staging build before it ships
- Certificate monitoring. Days left and TLS versions of a whole fleet of hosts
- Sales and due diligence. A quick, explainable security score for a prospect or an acquisition
Tutorial
Web data & tools
Pricing
1 credit per website audited. Failed calls are never billed.
| Plan | Price | Credits included | Above the quota |
|---|---|---|---|
| BASIC | Free | 10 / day | resets every day |
| PRO | $3.99/mo | 10,000 / month | $0.004 per credit |
| ULTRA | $9.99/mo | 50,000 / month | $0.004 per credit |
| MEGA | $29.99/mo | 200,000 / month | $0.004 per credit |
Subscribe on RapidAPI (opens in a new tab)
No code: the Apify actor
The Website Security Audit - Bulk Headers, SSL & Grade actor runs the same engine on a list of inputs and exports a table (JSON, CSV, Excel, Google Sheets). It is billed per result; free-plan users get 25 websites per run.
| Event | Charged for | Price |
|---|---|---|
site-audited | Each website audited | $0.0015 |
Questions about the Website Security Audit API
Is this a penetration test?
Why does a big site get a C or a D?
Is the starter Content-Security-Policy safe to deploy as is?
Content-Security-Policy-Report-Only first: it is built from the page we fetched, and scripts can load more at runtime. Once the reports are clean, switch to enforcing. When the site already has a policy (report-only, or one that does not restrict scripts), the fix starts from it: its sources, nonces and hashes are kept, and only the missing directives are added.











