{"api":{"id":"api_86086f8792b76041a7f2b761","slug":"website-security-grade","name":"Website Security Grade API","description":"Web security grade for each website you list: Mozilla Observatory letter grade and score, how many header and configuration tests passed or failed, scan time, and optionally HSTS preload list status.","kind":"ready_made","visibility":"public","domain":"observatory-api.mdn.mozilla.net","source_url":"https://observatory-api.mdn.mozilla.net/","category":"developer","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":9,"created_at":"2026-12-06T03:57:27.729Z","updated_at":"2026-12-06T03:57:27.729Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"host","type":"string","description":"Hostname that was graded.","required":false,"coverage":1,"example":"github.com"},{"name":"grade","type":"string","description":"Letter grade from A+ to F.","required":false,"coverage":1,"example":"A+"},{"name":"score","type":"integer","description":"Numeric score (can exceed 100 with bonus points).","required":false,"coverage":1,"example":115},{"name":"tests_passed","type":"integer","description":"Number of tests passed.","required":false,"coverage":1,"example":11},{"name":"tests_failed","type":"integer","description":"Number of tests failed.","required":false,"coverage":1,"example":1},{"name":"status_code","type":"integer","description":"HTTP status the site answered with during the scan.","required":false,"coverage":1,"example":200},{"name":"scanned_at","type":"datetime","description":"When the scan was made (UTC).","required":false,"coverage":1,"example":"2026-12-06T03:38:15.177Z"},{"name":"hsts_preload_status","type":"string","description":"HSTS preload list status; only when include_hsts_preload is on.","required":false,"coverage":1,"example":"preloaded"},{"name":"details_url","type":"url","description":"Link to the full report.","required":false,"coverage":1,"example":"https://developer.mozilla.org/en-US/observatory/analyze?host=github.com"}],"inputs":[{"name":"hosts","type":"array","description":"Website hostnames to grade, such as github.com. Web addresses are reduced to the hostname.","example":["github.com"],"required":true},{"name":"include_hsts_preload","type":"boolean","description":"Also look up each host on the HSTS preload list.","default":false,"example":true}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"details_url":{"description":"Link to the full report.","format":"uri","type":"string"},"grade":{"description":"Letter grade from A+ to F.","type":"string"},"host":{"description":"Hostname that was graded.","type":"string"},"hsts_preload_status":{"description":"HSTS preload list status; only when include_hsts_preload is on.","type":"string"},"scanned_at":{"description":"When the scan was made (UTC).","format":"date-time","type":"string"},"score":{"description":"Numeric score (can exceed 100 with bonus points).","type":"integer"},"status_code":{"description":"HTTP status the site answered with during the scan.","type":"integer"},"tests_failed":{"description":"Number of tests failed.","type":"integer"},"tests_passed":{"description":"Number of tests passed.","type":"integer"}},"required":[],"title":"Website Security Grade API","type":"object"},"samples":[{"host":"github.com","grade":"A+","score":115,"tests_passed":11,"tests_failed":1,"status_code":200,"scanned_at":"2026-12-06T03:38:15.177Z","hsts_preload_status":"preloaded","details_url":"https://developer.mozilla.org/en-US/observatory/analyze?host=github.com"},{"host":"mozilla.org","grade":"B+","score":80,"tests_passed":11,"tests_failed":1,"status_code":200,"scanned_at":"2026-12-06T03:39:13.540Z","hsts_preload_status":"unknown","details_url":"https://developer.mozilla.org/en-US/observatory/analyze?host=mozilla.org"},{"host":"wikipedia.org","grade":"C","score":50,"tests_passed":9,"tests_failed":3,"status_code":200,"scanned_at":"2026-12-06T03:39:16.584Z","hsts_preload_status":"preloaded","details_url":"https://developer.mozilla.org/en-US/observatory/analyze?host=wikipedia.org"}],"validation":{"checked_at":"2026-12-06T03:57:27.599Z","field_coverage":{"details_url":1,"grade":1,"host":1,"hsts_preload_status":1,"scanned_at":1,"score":1,"status_code":1,"tests_failed":1,"tests_passed":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"links":{"run":"https://pullrow.dev/v1/apis/api_86086f8792b76041a7f2b761/run","openapi":"https://pullrow.dev/v1/apis/api_86086f8792b76041a7f2b761/openapi.json","contract":"https://pullrow.dev/v1/apis/api_86086f8792b76041a7f2b761/contract.json","page":"https://pullrow.dev/catalog/website-security-grade"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["Grades web security headers and configuration (such as HTTPS redirects, CSP, cookies and HSTS) only; it is not a full security audit or vulnerability scan.","Mozilla caches scan results per host, so a repeat run soon after a change may return the earlier scan; check scanned_at.","Hosts must be public website hostnames (no paths, IP addresses or localhost). Hosts that cannot be scanned are skipped.","At most 200 hosts per run, read one at a time at about one scan every 1.5 seconds, so 200 hosts take around 10 minutes.","HSTS preload status comes from hstspreload.org (preloaded, pending, unknown) and is empty when you do not ask for it.","Data comes from the public Mozilla Observatory and hstspreload.org services. Not affiliated with or endorsed by Mozilla."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"host","label":"Host","description":"Hostname that was graded.","group":"Basics","shown":true,"written":false},{"name":"grade","label":"Grade","description":"Letter grade from A+ to F.","group":"Basics","shown":true,"written":false},{"name":"score","label":"Score","description":"Numeric score (can exceed 100 with bonus points).","group":"Basics","shown":true,"written":false},{"name":"tests_passed","label":"Tests passed","description":"Number of tests passed.","group":"Basics","shown":true,"written":false},{"name":"tests_failed","label":"Tests failed","description":"Number of tests failed.","group":"Basics","shown":true,"written":false},{"name":"status_code","label":"Status code","description":"HTTP status the site answered with during the scan.","group":"Basics","shown":true,"written":false},{"name":"scanned_at","label":"Scanned","description":"When the scan was made (UTC).","group":"Dates","shown":true,"written":false},{"name":"hsts_preload_status","label":"Hsts preload status","description":"HSTS preload list status; only when include_hsts_preload is on.","group":"Basics","shown":true,"written":false},{"name":"details_url","label":"Details link","description":"Link to the full report.","group":"Links","shown":true,"written":false}],"inputs":[{"name":"hosts","label":"Hosts","help":"Website hostnames to grade, such as github.com. Web addresses are reduced to the hostname.","example":"github.com","written":false},{"name":"include_hsts_preload","label":"Include hsts preload","help":"Also look up each host on the HSTS preload list.","example":"true","written":false}]}},"incidents":[]}