# Privacy & Cookie Implementation Auditor (`afkdigital/privacy-cookie-implementation-auditor`) Actor

Inspect privacy links, consent controls and before/after cookie and tracker observations in fresh browsers. Redacted evidence; technical findings, not legal certification.

- **URL**: https://apify.com/afkdigital/privacy-cookie-implementation-auditor.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 completed site audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Privacy & Cookie Implementation Auditor

Inspect public or authorized websites for privacy/cookie links, visible consent controls and bounded browser observations. Return dated, source-backed technical findings with redacted JSON evidence. **This is not legal advice, a compliance certificate, a GDPR/CCPA pass/fail test, or a claim that a site complies in every region.**

### What it observes

- HTTP mode: initial HTML, same-origin privacy/cookie links, linked-page status and explicitly marked numeric policy dates. It does not execute scripts or determine dynamic cookies.
- Browser mode: the initial page in separate fresh, logged-out Chromium contexts for baseline, explicit acceptance and explicit rejection. Baseline snapshots are captured before interaction in every context.
- Exact, localized Accept all / Reject all controls are clicked only when exactly one visible enabled type=button outside forms is inside a cookie/consent container. No ambiguous Continue/OK button, account action, checkout, form, or preference submenu is clicked.
- Missing or ambiguous controls produce consentInteractionUnknown. No consent inference is made.
- Cookie metadata: hashed names/domains, masked values/path, Secure, HttpOnly and SameSite. Purpose stays unknown. A name alone is not a reliable purpose classifier.
- Tracker candidates: requests to Google Analytics domains using the cited vendor reference, plus optional user-provided domain expectations. Other trackers may be missed. Built-in fixtures use an explicitly documented synthetic tracker.
- Pre-consent and post-action cookies and network observations remain separate. Attempts and responses are distinct observations; blocked POST attempts are identified.

No legal rules are inferred from an old policy date, missing banner, country guess, or cookie name. Review findings in the site's actual business and jurisdictional context.

### Quick start

The default input uses a bundled, synthetic site at https://audit-fixture.invalid/correct-reject. It is served inside the Actor through browser route interception and never resolves externally. This reproducible smoke test is **not a scan of a live public website**.

Replace it with a public website you own or are authorized to audit:

```json
{
  "siteUrls": ["https://YOUR-AUTHORIZED-SITE.example"],
  "maxPagesPerSite": 3,
  "scanMode": "browser",
  "locale": "en-US",
  "viewport": {"width": 1365, "height": 768},
  "consentScenarios": ["initial", "accept", "reject"],
  "optionalExpectedPolicyRules": {
    "expectPolicyLink": true,
    "expectRejectOption": true,
    "disallowTrackersBeforeConsent": true,
    "trackerDomains": ["google-analytics.com"]
  }
}
```

Expected rules are customer technical expectations, not laws. Supported locales: English, Turkish, German and French. Unrecognized wording is left untouched. You are responsible for authorization and the target site's terms; robots permission alone is not authorization.

### Bounds and safety

- 1–3 unique site URLs per run. HTTP(S), ports 80/443 only; no credentials, query strings or fragments in input URLs.
- 1–5 HTTP site/policy pages per site (including initial page). Only discovered same-origin policy links without query/fragment are fetched. No recursive crawl. Links not checked remain distinguishable from page-status results.
- Browser scenarios each visit only the initial page. At most 6 initial document requests including redirects, 120 intercepted requests, 8 MB combined responses, and 45 seconds per scenario.
- At most 2 MB per individual response, 8-second hard request deadline (6 seconds for browser resources), 3-second DNS timeout, 240-second total work deadline. Default deployment timeout 270 seconds.
- IP addresses are resolved and all answers checked for public unicast on every actual fetch. Connections use a validated IP via a custom DNS lookup, preventing DNS rebinding between validation and connection. Redirect destinations are rechecked.
- Browser HTTP(S) traffic is intercepted and fulfilled through that same bounded transport. Private, loopback, link-local, reserved and mapped private IPv6 addresses are blocked.
- robots.txt is honored for each origin. A disallow, robots access restriction or unavailable server stops affected requests. This Actor takes a stricter approach to robots redirects by stopping rather than following.
- 401/403/429, login walls and access challenges are not bypassed. No proxy rotation, CAPTCHA solving or authentication import.
- POST/PUT and other non-read network methods, WebSockets, service workers, downloads, popups, subframes and subsequent navigation are blocked. Some consent managers save choices with POST: this mode can therefore under-observe their behavior. A clicked button is an observed action, not proof that a server saved consent.
- Authenticated sessions, purchasing, account creation and form submission are outside scope.

### Output and evidence

Dataset rows include siteUrl, checkedAt, policyUrls, policyPageStatus, visiblePolicyDate, consentUiObserved, rejectOptionObserved, scenario, cookiesObserved, trackerRequestsObserved, findingType, severity, evidenceUrl, evidenceArtifact and limitations.

The Dataset view groups the core technical fields. One scenario can produce several findings; it does not create additional billable site events.

evidenceArtifact points to an EVIDENCE-\*.json record in the run's default key-value store. SUMMARY reports completion, page/scenario counts, duration and billing. Evidence URLs retain origin and common static policy paths; arbitrary paths and query strings are masked. Evidence contains no raw HTML, screenshots, HAR, request bodies, cookie values, authorization headers, IP addresses or full browser storage. Cookie names/domains are hashed to reduce accidental identifier exposure. Hashed identifiers are not a guarantee of anonymization.

No raw browser profile is persisted. Unnamed run storages follow your Apify account's retention settings; no fixed automatic deletion deadline is promised. Restrict run sharing. Delete the run's default Dataset and key-value store when evidence is no longer needed. The Actor does not create long-lived named evidence stores.

### Findings

| findingType | Meaning |
|---|---|
| tracker_candidate_before_interaction | A listed endpoint candidate was observed before a consent action; requires review |
| tracker_candidate_after_reject | A listed endpoint candidate was observed after an explicit reject click |
| no_listed_tracker_observed_after_reject | No listed endpoint was observed in this bounded window; not proof of absence |
| policy_link_not_observed | No matching link was seen in the inspected source/rendered initial page |
| consentInteractionUnknown | An explicit action could not be safely identified/executed |
| user_expected_rule_mismatch | A supplied technical expectation differed from observations |
| consent_ui_not_observed | No recognized UI was observed in this environment |
| scenario_incomplete / audit_unavailable | Browser/infrastructure, access, safety or time limit prevented completion |

severity is info or review. It is not a legal risk score. Dates are observations, never standalone violation findings.

### Environment and limits of inference

Output records locale, viewport, logged-out fresh-context conditions, denied geolocation permission and blocked service workers. Egress is the Apify datacenter; its country is not verified or asserted, and no geolocation is spoofed. Different regions, browser versions, A/B tests and consent history can change the UI.

Observation windows are approximately 1.2 seconds after initial load and 1.2 seconds after a successful click. Delayed events can be missed. Cookies are snapshots and can miss transient cookies. Iframe UI, closed shadow roots, preference submenus and custom labels are unsupported. Inline-rendered policy links are reported but their pages are not fetched. Numeric dates require an update/effective marker; textual month names are not parsed.

### Pricing

PPE event: **site-audit**, one event per completed site audit, regardless of findings. A bounded site includes up to five HTTP site/policy pages and the initial page in up to three fresh browser scenarios. A selected HTTP-only audit uses the same event. Partial/unavailable audits have no custom site fee. Duplicate URLs are deduplicated. There is no automatic Dataset-item event or separate start fee.

Price: **USD 0.10 per completed site audit** (USD 100 per 1,000), platform usage included. The SDK budget is checked before work and charge acknowledgement before output; no retry fee is added. Run-storage access after completion can still incur standard Apify storage/API costs. Use a maximum charge budget to bound spending.

### Integrations

Use POST /v2/acts/afkdigital~privacy-cookie-implementation-auditor/runs with Authorization: Bearer <secured token>. Poll GET /v2/actor-runs/{id}; after SUCCEEDED fetch GET /v2/datasets/{defaultDatasetId}/items. Keep tokens out of URLs, spreadsheets and source files.

- examples/n8n-workflow.json: inactive HTTP-start workflow with setup notes. Polling and credentials must be configured in your n8n environment.
- examples/make-blueprint.json: documented API recipe, explicitly not an importable Make blueprint.
- examples/clay-setup.md: Clay HTTP enrichment mapping and asynchronous polling recipe.

These examples are not claimed as end-to-end tested native integrations.

### Technical sources checked 2026-11-21

- Playwright isolated non-persistent contexts and cookie APIs: https://playwright.dev/docs/api/class-browsercontext
- Cookie transport and attributes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies
- Google Analytics endpoint reference (domain-level candidate source, not a cookie-purpose database): https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference
- Robots Exclusion Protocol, including the distinction from authorization: https://www.rfc-editor.org/rfc/rfc9309
- Apify PPE and synthetic events: https://docs.apify.com/actors/monetize/pay-per-event
- Apify publishing prerequisites: https://docs.apify.com/actors/publishing/publish
- Apify Store terms (page states updated September 15, 2026): https://docs.apify.com/legal/store-publishing-terms-and-conditions
- Apify acceptable use (page states updated February 20, 2026): https://docs.apify.com/legal/acceptable-use-policy

No statute or jurisdictional legal rule is encoded or certified.

### Development

npm ci && npm test. Local controlled browser tests use /usr/bin/chromium. Docker installs the locked Playwright Chromium version. NEWAPI120 is maintained independently in /opt/NEWAPI/NEWAPI120. The source bundle excludes credentials, operational API responses and QA outputs.

# Actor input Schema

## `siteUrls` (type: `array`):

1–3 HTTP(S) URLs. No credentials, query strings or fragments. Built-in audit-fixture.invalid examples are synthetic controlled pages.

## `maxPagesPerSite` (type: `integer`):

Includes initial HTTP page plus discovered same-origin policy pages. Browser scenarios additionally visit the initial page only.

## `scanMode` (type: `string`):

HTTP only inspects public HTML and links. Browser executes selected consent scenarios in fresh contexts.

## `locale` (type: `string`):

Locale for browser rendering and exact consent labels. Egress geolocation is not changed.

## `viewport` (type: `object`):

Width 320–1920; height 240–1080.

## `consentScenarios` (type: `array`):

Baseline is always included. Each selected action uses its own fresh context.

## `optionalExpectedPolicyRules` (type: `object`):

Supported keys: expectPolicyLink, expectRejectOption, disallowTrackersBeforeConsent (booleans), trackerDomains (up to 30 hostnames). User expectations are not legal rules.

## Actor input object example

```json
{
  "siteUrls": [
    "https://audit-fixture.invalid/correct-reject"
  ],
  "maxPagesPerSite": 3,
  "scanMode": "browser",
  "locale": "en-US",
  "viewport": {
    "width": 1365,
    "height": 768
  },
  "consentScenarios": [
    "initial",
    "accept",
    "reject"
  ],
  "optionalExpectedPolicyRules": {}
}
```

# Actor output Schema

## `findings` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "siteUrls": [
        "https://audit-fixture.invalid/correct-reject"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/privacy-cookie-implementation-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "siteUrls": ["https://audit-fixture.invalid/correct-reject"] }

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/privacy-cookie-implementation-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "siteUrls": [
    "https://audit-fixture.invalid/correct-reject"
  ]
}' |
apify call afkdigital/privacy-cookie-implementation-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/privacy-cookie-implementation-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JDtUULs4b00y7mPay/builds/z9Zmf1GdCwSckvHjY/openapi.json
