Skip to main content

Security Score API

pro
GET/v1/score/security

Calculates a composite security score using measured TLS and certificate evidence alongside HTTP headers, DNSSEC and other security checks. Unavailable connection evidence remains a partial result rather than an assumed secure configuration.

What It Does

Uses shared native certificate, TLS-version and cipher measurements for the relevant score components, while HTTP headers and DNS policy analysis run on the API. Retains validation outcomes and unavailable components. The same evaluator is used by HTTP requests and scheduled monitoring; CT issuance metadata is not substituted for the live certificate.

Why It's Useful

The weighted breakdown helps prioritize observed external configuration findings. Coverage and provisional status show which evidence remains unavailable. Scores support comparable monitoring with the same method; they do not establish breach likelihood or regulatory compliance.

Use Cases

CISO / Security Manager

Security Posture Reporting

Generate security scores for all public-facing domains for board-level reporting. Track score trends across quarters to demonstrate security investment ROI. Compare results against your own security baseline and review changes using the same scoring method.

Communicate observed security signals through 12 components with explicit coverage and assessment limits.

Third-Party Risk Analyst

Vendor & Supply Chain Risk Assessment

Score vendor domains against minimum security thresholds (e.g., require grade B or above) before contract signing. Flag vendors missing critical headers like CSP and HSTS that indicate weak security hygiene.

Data-driven vendor risk decisions — identify vendors with weak external security that could impact your supply chain.

Security Operations / SRE

Continuous Security Monitoring

Integrate security score checks into CI/CD pipelines and monitoring dashboards. Set alerts for score drops that indicate configuration drift, expired certificates, or security headers removed after deployments.

Catch security regressions within hours of deployment instead of waiting for the next quarterly audit cycle.

GRC Analyst

Compliance Evidence Collection

Map security score component breakdowns to specific compliance control requirements — TLS and certificate chain scores map to encryption controls, CSP and header scores map to application security controls. Use as automated evidence for NIST CSF, CIS Benchmark, PCI DSS, and SOC 2 audits.

Automated, repeatable compliance evidence that reduces audit preparation time and demonstrates continuous monitoring.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to calculate security score for. Analysis is performed over HTTPS.Example: cloudflare.com

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe scored domain
scorenumberEvidence-weighted security score 0–100 across12 components; critical takeover indicators cap the displayed score at29/F. Read assessment coverage before comparing grades.
gradestring|nullOrdinary grade only for complete evidence; null when provisional. Critical takeover indicators retain the explicit F override. Thresholds: A+95, A85, B70, C50, D30.
breakdownobjectTwelve component budgets with explicit observed, unavailable or not-applicable states. Unavailable weight remains in coverage, not in the observed-score denominator.
breakdown.tlsobjectMeasured accepted TLS versions and cipher strength (max18); unknown without native enumeration.
breakdown.headersobjectValue-aware delivered header protections normalized to max13.
breakdown.dnssecobjectResolver-authenticated answer signal (AD, max6), distinct from DNSKEY publication and local chain validation.
breakdown.httpsobjectObserved HTTP-to-HTTPS redirect plus valid HSTS preload-header eligibility (max10); actual list enrollment unverified.
breakdown.cookiesobjectApplicable response-header cookie attributes (max8); browser runtime storage is unmeasured.
breakdown.cspobjectContent Security Policy quality (max 10 pts)
breakdown.certChainobjectLive served-certificate validity and expiry (max9); CT data and defaults never substitute.
breakdown.wafobjectExplicit observed challenge signal (max5); generic provider fingerprints cannot establish enforcement.
breakdown.caaobjectCAA record presence + iodef contact (max 6 pts). Constrains which CAs can issue for the domain.
breakdown.dnskeyApexobjectDNSKEY publication at the discovered owning zone (max5); publication does not validate a trust chain.
breakdown.subdomainTakeoverobjectPhase 2: takeover sub-probe across 8 high-impact default labels (max 5 pts). Returns 0 with the critical_finding overlay set when ≥1 subdomain is vulnerable — the binary catastrophic dimension that the numeric score alone hides.
breakdown.mailobjectBounded SPF/DMARC/MX/MTA-STS publication hygiene (max5); no message signing/alignment assertion.
assessmentobjectcomplete/provisional/unavailable/critical status, applicable and observed weight, coverage, unavailable components and limits.
observed_scorenumberNormalized weighted result before a disclosed critical-risk override.
policy_checksarrayVersioned protocol subsets with pass/fail/unknown; whole-policy compliance remains unverified.
critical_findingbooleanUnclaimed-service takeover indicator. Critical assessment caps score at29/F, retaining observed_score and risk_override for transparency.
aligns_withobject | nullDeprecated broad alignment booleans remain false because whole-policy compliance is unverified. Use versioned, explicitly scoped policy_checks for observed subsets.
trendstring | nullPhase 2: 30-day trend direction — "improving", "stable", "degrading", or null on first score. Computed by comparing to the most-recent prior recorded score (excludes partial-failure scores).
historyobject | nullTenant-,methodology- and vantage-scoped history; actual30-day aggregate. Unassigned legacy global rows are excluded.
gradeDescriptionstringHuman-readable description of the letter grade
componentCountnumberNumber of security components evaluated
partialFailurebooleanTrue if any component evidence is unavailable; degraded evaluations are not cached as ordinary complete scores.
failedComponentsarrayList of components that failed to evaluate (informational).
recommendationsarrayPrioritized improvement actions ranked by score impact
grade_descriptionstringCanonical description of the grade; gradeDescription is a compatibility alias.
component_countnumberCanonical component count; componentCount is a compatibility alias.
partial_failurebooleanCanonical partial-failure flag; partialFailure is a compatibility alias.
failed_componentsarrayCanonical failed-component list; failedComponents is a compatibility alias.

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the pro plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/score/security?domain=cloudflare.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/score/security?domain=cloudflare.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/score/security?domain=cloudflare.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Security Score guide

Learn the concepts, choose a practical workflow, and interpret the observations from Security Score before acting on them. Run supported checks via MCP or through REST.

Read the guide →

    Related Endpoints

    External References

    Learn more about the standards and protocols behind this endpoint.

    Try This Endpoint

    Test the Security Score endpoint live in the playground.

    Security Score API Reference | EdgeDNS