Mozilla http scanner API
Overview
Mozilla's HTTP Observatory API scans websites and grades their HTTP security configuration, checking for headers like CSP, HSTS, X-Frame-Options, and more. It is completely free with no authentication required, making it an excellent tool for developers who want to audit and improve their site's security posture. The API powers the observatory.mozilla.org web interface.
Beginner Tip
Trigger a new scan with a POST request, then retrieve results with a GET request using the same hostname. Results are cached, so if you need a fresh scan, set the "rescan" flag to true in your POST body.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Mozilla http scanner",
"description": "Mozilla observatory http scanner",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
grade Letter grade for the site's HTTP security (A+ to F). score Numeric security score out of 100. state Current scan state: PENDING, RUNNING, FINISHED, or FAILED. tests_passed Number of individual security header tests that passed. tests_failed Number of security header tests that failed. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://github.com/mozilla/http-observatory/blob/master/httpobs/docs/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Classify
Classify provides programmatic access to encrypting & decrypting text messages via REST API.
Dehash.lt
Dehash.lt provides programmatic access to hash decryption md5, sha1, sha3, sha256, sha384, sha512 via REST API.
EmailRep
⭐ Beginner's PickEmailRep is a free API that evaluates the risk and reputation of an email address in seconds.
Escape
⭐ Beginner's PickEscapeAPI is a simple open-source utility API that takes raw user input and returns properly escaped versions safe for use in HTML, SQL, shell, and other contexts.
FilterLists
⭐ Beginner's PickFilterLists is a community-maintained directory API that catalogs hundreds of filter lists used by ad blockers and firewalls like uBlock Origin and Pi-hole.