{"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},"version":"1.0","contract_hash":"f06aae51ad347c8a6ed0df1449f1702c6ccdc52f516c90cfe2f91539324b5062","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},"changelog":[{"version":"1.0","change_kind":"initial","note":"Imported from the ready-made source catalog.","created_at":"2026-12-06T03:57:27.729Z","activated_at":"2026-12-06T03:57:27.729Z","active":true,"contract_hash":"f06aae51ad347c8a6ed0df1449f1702c6ccdc52f516c90cfe2f91539324b5062","fields_count":9}]}