Skip to main content

Privacy Audit API

developer
GET/v1/domain/privacy-audit

Analyzes cookies, consent management sophistication, privacy policy content, third-party trackers, CCPA/CPRA compliance signals, and cookie wall detection for privacy regulation readiness assessment. Checks for GDPR elements in privacy policy content (data rights, legal basis, DPO, transfer mechanisms) and CCPA terms (California disclosures, right to know/delete). Note: this is a static HTML analysis that detects compliance signals and documentation presence — it cannot verify cookie-blocking behavior before consent or test opt-out mechanism functionality, which require browser-based testing.

What It Does

Performs a privacy audit: inspects final-response cookie-setting attempts with security attributes (Secure, HttpOnly, SameSite, and the CHIPS Partitioned attribute used for cross-site cookies in modern Chrome), detects consent management platforms with sophistication analysis (IAB TCF API, granular consent categories, reject-all buttons, Google Consent Mode v2), fetches and analyzes privacy policy content for GDPR terms (data rights, legal basis, DPO contact, transfer mechanisms) and CCPA terms (California disclosures), identifies third-party trackers by category, evaluates CCPA signals (Do Not Sell link detection), detects possible consent-gate source patterns (behavior and legal applicability unverified), and computes documentation signals with legal assessment explicitly unverified. Returns a score, grade, per-component breakdown, and actionable recommendations.

Why It's Useful

Privacy regulations (GDPR, CPRA, ePrivacy Directive) carry significant fines for non-compliance. Websites frequently add tracking scripts without proper consent mechanisms. This audit provides the visibility needed to prioritize privacy review.

Use Cases

Data Protection Officer

GDPR Compliance Check

Audit websites for tracking technologies that require consent under GDPR.

Identify compliance gaps before they result in regulatory fines.

Privacy Engineer

Cookie Audit

Inspect Set-Cookie attempts on the final HTTP response and their security attributes. JavaScript, subresource cookies and actual browser storage require separate runtime observation.

Identify cookie candidates for a runtime inventory and privacy-notice review.

Privacy Analyst

Vendor Privacy Assessment

Evaluate vendor websites for tracker usage and consent management as part of procurement.

Assess vendor privacy practices before sharing user data.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredDomain or full URL — accepts `example.com` or `https://example.com/path`.Example: https://example.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
assessmentobjectSource-evidence status, observed/applicable weights and coverage; missing observations remain unavailable, not legally inapplicable.
legalAssessmentstringAlways unverified. Static documentation and header signals do not establish legal compliance or runtime enforcement.
applicabilitystringUnknown: jurisdiction, processing purpose and covered-business duties require separate review.
finalUrlstringFinal inspected homepage/document URL after redirects; secondary sources retain their own scope.
domainstringThe audited domain (bare hostname).
urlstringFull URL that was fetched, echoing the protocol used in the request.
cookiesobjectFinal-response Set-Cookie candidates, static acceptance/rejection reasons, deletion and validated attributes; actual installed, JavaScript and third-party subresource cookies remain unobserved.
consentManagementobjectConsent banner detection: provider, IAB TCF API, granular consent categories, reject-all button, Google Consent Mode v2, cookie wall detection
privacyPolicyobjectPrivacy policy presence, URL, and content analysis (GDPR/CCPA term detection)
thirdPartyTrackersobjectTracker inventory by category
ccpaobjectCCPA compliance signals: Do Not Sell link detection and URL
complianceIndicatorsobjectLegacy gdprReady/ccpaReady remain false because legal readiness is unverified; other fields describe source/header signals
scorenumberPrivacy score 0-100
gradestringStatic-signal grade for complete evidence; null when provisional
gradeDescriptionstringHuman-readable description of the grade (e.g., "Very Good - strong posture")
breakdownobjectPer-component score breakdown: cookieSecurity (20), consentQuality (25), privacyPolicy (12), trackerCount (13), firstPartyOnly (10), ccpaSignals (12), cookieWall (8)
recommendationsarrayPrivacy improvement actions
confidenceobjectResult confidence indicator: level (high/medium/low) and limitations list

Code Examples

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

cURL
curl --request GET 'https://api.edgedns.dev/v1/domain/privacy-audit?domain=https%3A%2F%2Fexample.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/privacy-audit?domain=https%3A%2F%2Fexample.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/domain/privacy-audit?domain=https%3A%2F%2Fexample.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Privacy Audit guide

Learn the concepts, choose a practical workflow, and interpret the observations from Privacy Audit 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 Privacy Audit endpoint live in the playground.

    Privacy Audit API Reference | EdgeDNS