apyhub
SECURITY & PRIVACY · SEO

Security Header Full Audit API

What it does

Website Security Headers audits a site’s HTTP security headers and returns a simple score, the URL checked, and practical recommendations. Send a URL in the request body and get back the header status for common protections, including csp, hsts, and x_frame_options.

Use it when you want a quick security baseline for a production site, a staging environment, or a customer-facing landing page. The response tells you which headers are present or missing, so you can spot gaps that affect browser-side protection and harden your deployment without manual inspection.

The output is easy to use in internal dashboards, CI checks, or security review workflows. The recommendations array gives you concrete next steps, such as adding a Content-Security-Policy header, while the score helps you compare sites or track improvements over time.

If you need a lightweight check for common web hardening headers, Website Security Headers gives you the core signal in one response.

POST
Audit website security headers
http://localhost:8080/namastesumalya/audit-website-security-headers
QUICKSTARTGUIDE

Quickstart

Checks a website’s security headers by sending its URL in a JSON body.

curl -X POST "http://localhost:8080/namastesumalya/audit-website-security-headers" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"example.com"}'

What you'll get back

Returns a JSON object with url as a string, score as an integer, recommendations as an array of strings, and security_headers as an object.

{
  "url": "example.com",
  "score": 67,
  "recommendations": ["Add Content-Security-Policy header"],
  "security_headers": {
    "csp": "missing",
    "hsts": "present",
    "x_frame_options": "present"
  }
}
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*

About this endpoint

What it does

Audits the security headers for a website URL and returns the URL, an overall score, recommendations, and a breakdown of specific security header checks.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe website URL to audit.

Response

Returns a JSON object with url as a string, score as an integer, recommendations as a string array, and security_headers as an object. The security_headers object includes csp, hsts, and x_frame_options string fields.

ParameterTypeMandatoryDescription
urlStringNoThe audited website URL.
scoreIntegerNoThe audit score.
recommendationsString ArrayNoA list of recommendations for improving the website's security headers.
security_headersObjectNoThe security header check results.
security_headers.cspStringNoContent Security Policy header status.
security_headers.hstsStringNoHTTP Strict Transport Security header status.
security_headers.x_frame_optionsStringNoX-Frame-Options header status.

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.