apyhub
SECURITY & PRIVACY · SEO

Security Headers Audit API

What it does

Security Headers Audit checks a webpage URL and returns a header-focused security report. Send an http or https URL in body.url, and get back a response with an overall score plus boolean flags for has_csp, has_hsts, has_x_content_type, has_referrer_policy, and has_x_frame_options.

Use it when you want to verify whether a site is sending common browser security headers without building your own crawler or response parser. The details object gives you additional string-valued findings, while the boolean fields make it easy to gate releases, run CI checks, or track improvements over time.

This fits well into pre-deployment audits, security review workflows, and automated monitoring for public-facing pages. If you manage a web app, you can check landing pages, login screens, or other critical endpoints and quickly see which protections are present and which ones are missing.

POST
Security Headers Audit
https://api.eu.apyverse.com/chisleroff/security-headers-audit

QUICKSTART

GUIDE

Quickstart

Check a webpage’s security headers by sending its URL.

curl -X POST "https://api.eu.apyverse.com/chisleroff/security-headers-audit" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

What you'll get back

Returns a JSON object with these top-level fields:

  • score (string)
  • details (object with string values)
  • has_csp (boolean)
  • has_hsts (boolean)
  • has_x_content_type (boolean)
  • has_referrer_policy (boolean)
  • has_x_frame_options (boolean)

Example:

{
  "score": "A",
  "details": {
    "csp": "Present",
    "hsts": "Present"
  },
  "has_csp": true,
  "has_hsts": true,
  "has_x_content_type": true,
  "has_referrer_policy": true,
  "has_x_frame_options": true
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
URL of the webpage to extract, audit, or validate content from (http/https only).

About this endpoint

What it does

Audits the security headers present on the webpage at the provided URL and returns a JSON object with a score, a details object, and boolean flags indicating whether specific headers are present.

Request Body

ParameterTypeMandatoryDescription
urlStringYesURL of the webpage to extract, audit, or validate content from (http/https only). Format: URI.

Response

Returns a JSON object with score as a string, details as an object of string values, and boolean fields for has_csp, has_hsts, has_x_content_type, has_referrer_policy, and has_x_frame_options.

ParameterTypeMandatoryDescription
scoreStringNoAudit score.
detailsObjectNoA map of string values with additional audit details.
has_cspBooleanNoIndicates whether a Content-Security-Policy header is present.
has_hstsBooleanNoIndicates whether an HSTS header is present.
has_x_content_typeBooleanNoIndicates whether an X-Content-Type-Options header is present.
has_referrer_policyBooleanNoIndicates whether a Referrer-Policy header is present.
has_x_frame_optionsBooleanNoIndicates whether an X-Frame-Options header is present.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.