# UK GDPR Cookie & Consent Auditor (`cardinal_radiance_bce/apify-uk-gdpr-cookie-audit`) Actor

Scans a UK website for cookies set, consent-banner presence and GDPR/PECR issues. Pay-per-event audit actor for UK small businesses.

- **URL**: https://apify.com/cardinal_radiance_bce/apify-uk-gdpr-cookie-audit.md
- **Developed by:** [Tristan Evans](https://apify.com/cardinal_radiance_bce) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 per gdpr cookie 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

## UK GDPR Cookie & Consent Auditor

Scans a UK website for cookies set, consent-banner presence and GDPR/PECR issues.
For UK sole traders, tradespeople and small e-commerce sites that need a GDPR cookie check.

### Features

- **Cookie detection**: reads every `Set-Cookie` header the page sends (name, domain, path, Secure, HttpOnly, SameSite).
- **Consent-banner detection**: scans page text and HTML classes/ids for a cookie consent banner (UK/GDPR wording, OneTrust/Osano/Cookiebot-style classes).
- **GDPR/PECR issue reporting**: flags cookies set with no banner, non-essential (analytics/marketing) cookies without consent, missing Secure/HttpOnly flags, missing cookie-policy link.
- **UK-specific**: written around ICO/PECR cookie rules; cites the ICO as the legal driver.
- **No API key required**: reads public pages directly.
- **Pay-per-event**: charged per website audit returned (first 50 free per run).

### Use Cases

- **Website audit**: a sole trader or small e-commerce site owner wants to know if their cookie setup breaks PECR/GDPR.
- **Lead generation**: web designers and agencies finding small UK sites that need a consent banner installed.
- **Due diligence**: verifying a site's cookie compliance before appointing a developer.

### Data Fields

| Field | Type | Description |
|---|---|---|
| `url` | string | Website URL audited |
| `status_code` | integer | HTTP status code returned |
| `consent_banner_found` | boolean | Whether a cookie consent banner was detected |
| `banner_selector` | string | HTML element that looks like the consent banner |
| `cookies_found` | integer | Number of cookies set |
| `non_essential_cookies` | integer | Analytics/marketing cookies by name |
| `cookie_policy_url` | string | Link to the cookie policy page, if found |
| `issues` | array | GDPR/PECR issues detected |
| `cookies` | array | Full cookie list (name, domain, flags) when requested |
| `data_freshness` | string | ISO timestamp of the audit |

### Pricing

**Pay-per-event**: $0.002 per website audit (after the first 50 free per run).

Example costs:

- 50 audits: $0.00
- 100 audits: $0.10 (50 free + 50 × $0.002)
- 200 audits: $0.30 (50 free + 150 × $0.002)

### Input

```json
{
  "url": "https://example.co.uk",
  "max_pages": 1,
  "include_cookie_details": true
}
```

- `url` — UK website URL to audit (required)
- `max_pages` — how many pages to audit (default 1)
- `include_cookie_details` — include the full cookie list (default true)

### Example tasks

1. Audit one small business site: `{"url": "https://example.co.uk"}`
2. Audit 3 pages of a site: `{"url": "https://example.co.uk", "max_pages": 3}`
3. Audit without cookie details: `{"url": "https://example.co.uk", "include_cookie_details": false}`

### Local run (no platform, no API token needed)

```
python main.py --url https://example.co.uk
python main.py --url https://example.co.uk --max-pages 3 --no-cookie-details
```

### Source verification

- Source: ICO cookie guidance — https://ico.org.uk/for-organisations/guide-to-pecr/cookies-and-similar-technologies/
- GOV.UK accessibility guidance — https://www.gov.uk/government/publications/accessibility-requirements-for-public-sector-websites-and-mobile-apps

### Competitors

- Apify Store search "gdpr cookie scanner": existing actors exist (andok/gdpr-cookie-scanner 25 users/722 runs; unrivaled_fortress/gdpr-cookie-consent-compliance 2 users/26 runs) — proven PAY_PER_EVENT demand, but none UK-specific or ICO-cited.
- Price: $0.002 per audit, first 50 free per run — inside the proven band ($0.002–$0.004 per record for UK register-style actors).

# Actor input Schema

## `url` (type: `string`):

UK website URL to audit for cookies and consent banner, e.g. https://example.co.uk

## `max_pages` (type: `integer`):

How many pages to audit (default 1; audits the homepage unless set higher)

## `include_cookie_details` (type: `boolean`):

Include the full list of cookies found (name, domain, flags) in each audit record

## Actor input object example

```json
{
  "url": "https://example.co.uk",
  "max_pages": 1,
  "include_cookie_details": true
}
```

# Actor output Schema

## `total_audits` (type: `string`):

Number of pages audited in this run.

## `returned` (type: `string`):

Number of audit records pushed to the dataset.

## `pages_scanned` (type: `string`):

Number of pages actually fetched.

## `free_records` (type: `string`):

Records covered by the free allowance per run.

## `chargeable_records` (type: `string`):

Records above the free allowance.

## `estimated_cost_usd` (type: `string`):

Chargeable records x $0.002 per audit.

## `url` (type: `string`):

The website URL that was audited.

## `timestamp` (type: `string`):

ISO 8601 UTC timestamp when the run finished.

# 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 = {
    "url": "https://example.co.uk",
    "max_pages": 1,
    "include_cookie_details": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("cardinal_radiance_bce/apify-uk-gdpr-cookie-audit").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 = {
    "url": "https://example.co.uk",
    "max_pages": 1,
    "include_cookie_details": True,
}

# Run the Actor and wait for it to finish
run = client.actor("cardinal_radiance_bce/apify-uk-gdpr-cookie-audit").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 '{
  "url": "https://example.co.uk",
  "max_pages": 1,
  "include_cookie_details": true
}' |
apify call cardinal_radiance_bce/apify-uk-gdpr-cookie-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cardinal_radiance_bce/apify-uk-gdpr-cookie-audit"
        }
    }
}
```

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/AzQLMdUziiCndpEMn/builds/qxiLz9TcAP7uzQkEw/openapi.json
