# CA Data Broker Registry Evidence Pack (`substitute99/ca-data-broker-evidence-pack`) Actor

Normalize the CPPA Data Broker Registry and create public-page evidence packs for privacy policy, opt-out/delete, CCPA/GPC, noindex, broken-page, request-metric, and diff monitoring signals.

- **URL**: https://apify.com/substitute99/ca-data-broker-evidence-pack.md
- **Developed by:** [Dongwook Kim](https://apify.com/substitute99) (community)
- **Categories:** Business, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 broker evidence packs

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## CA Data Broker Registry Evidence Pack

Apify Actor for a public-page-only validation build around the California CPPA Data Broker Registry.

It fetches the CPPA registry CSV, normalizes broker rows, scans each broker's public website and CA rights URL, and emits one `broker-evidence-pack` dataset item per scanned broker.

### What v1 Scans

- CPPA registry row normalization as `registry-row-normalized`
- Primary broker website and CA consumer-rights URL
- Privacy policy, opt-out, delete, and CCPA links
- CCPA and Global Privacy Control mentions
- `noindex` evidence pages
- Broken pages
- Request-metric disclosure signals
- Compact per-page evidence metadata: status, title, noindex, extracted links, CCPA/GPC/request-metric mentions, privacy-contact presence, and content hash
- Optional diff rows against the latest saved snapshot

### Explicitly Out Of Scope

- No consumer-subject lookup
- No consumer PII collection
- No opt-out or deletion request submission
- No login-gated or private-page crawling

### Local Commands

```bash
npm install
npm test
npm run build
npx --yes apify-cli@1.6.2 validate-schema
````

Run a small local sample:

```bash
npm run start:dev
```

Use Apify input to set `mode`, `maxBrokers`, `includePageScan`, and `includeDomains` for validation runs. `includeDomains` accepts bare domains or HTTP(S) URLs, matches exact multi-label domains and subdomains, so `example.com` also includes `www.example.com`; invalid-only filters match no brokers. `registry_snapshot` emits normalized registry rows only; `evidence_pack` emits broker evidence packs.

### Diff Monitoring

`diff_since_last_run` compares the current evidence packs with the latest saved evidence-pack snapshot, stores the aggregate counts in `CHANGE_DIFF_SUMMARY`, and emits `change-diff` dataset rows only for `added`, `removed`, and `changed` brokers. Unchanged brokers are counted in the summary but are not emitted as per-broker diff rows.

### PPE Events

Configured validation pricing:

- `registry-row-normalized`: registry snapshot event, `$0.01`
- `broker-evidence-pack`: primary evidence event, `$0.25`
- `change-diff`: diff monitoring event, `$0.08`

The Actor charges `registry-row-normalized`, the non-configurable `broker-evidence-pack`, and `change-diff` before emitting the matching dataset rows. For evidence-pack runs, the primary event is charged before page scans start, so Apify can enforce the user's PPE max-charge limit without doing uncharged broker scans. Snapshots and run summaries are written only for emitted items.

Raw contact email values are not emitted in public dataset rows. The Actor keeps `signals.hasPrivacyEmail` as a presence signal for triage.

# Actor input Schema

## `mode` (type: `string`):

Choose a registry snapshot, evidence-pack scan, or diff against the previous saved snapshot.

## `registryUrl` (type: `string`):

Defaults to the public CPPA data broker registry CSV.

## `maxBrokers` (type: `integer`):

Stops after this many registry rows to control spend and run time.

## `includePageScan` (type: `boolean`):

When enabled, fetches public broker pages and extracts privacy/opt-out/delete/GPC/noindex evidence. Ignored in registry\_snapshot mode.

## `includeDomains` (type: `array`):

Optional domain allow-list for targeted validation runs. Matches exact domains and subdomains, so example.com also includes www.example.com. Leave empty for registry order.

## `scanConcurrency` (type: `integer`):

Number of brokers scanned in parallel.

## `maxPagesPerBroker` (type: `integer`):

Bounds public-page fetches per broker. Initial URLs are the primary website and CA consumer-rights URL, then discovered evidence links.

## `requestTimeoutSecs` (type: `integer`):

Per-page HTTP timeout.

## `diffPreviousSnapshotId` (type: `string`):

Optional key-value store record name for diff mode. Defaults to the latest saved evidence-pack snapshot.

## Actor input object example

```json
{
  "mode": "evidence_pack",
  "registryUrl": "https://cppa.ca.gov/data_broker_registry/registry.csv",
  "maxBrokers": 100,
  "includeDomains": [],
  "scanConcurrency": 5,
  "maxPagesPerBroker": 4,
  "requestTimeoutSecs": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Normalized registry rows, broker evidence packs, and optional change-diff records.

## `runSummary` (type: `string`):

Structured run summary written under RUN\_SUMMARY.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("substitute99/ca-data-broker-evidence-pack").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("substitute99/ca-data-broker-evidence-pack").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call substitute99/ca-data-broker-evidence-pack --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=substitute99/ca-data-broker-evidence-pack",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CA Data Broker Registry Evidence Pack",
        "description": "Normalize the CPPA Data Broker Registry and create public-page evidence packs for privacy policy, opt-out/delete, CCPA/GPC, noindex, broken-page, request-metric, and diff monitoring signals.",
        "version": "0.3",
        "x-build-id": "Yt2O0ICezaxEZPkvl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/substitute99~ca-data-broker-evidence-pack/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-substitute99-ca-data-broker-evidence-pack",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/substitute99~ca-data-broker-evidence-pack/runs": {
            "post": {
                "operationId": "runs-sync-substitute99-ca-data-broker-evidence-pack",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/substitute99~ca-data-broker-evidence-pack/run-sync": {
            "post": {
                "operationId": "run-sync-substitute99-ca-data-broker-evidence-pack",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Run mode",
                        "enum": [
                            "evidence_pack",
                            "registry_snapshot",
                            "diff_since_last_run"
                        ],
                        "type": "string",
                        "description": "Choose a registry snapshot, evidence-pack scan, or diff against the previous saved snapshot.",
                        "default": "evidence_pack"
                    },
                    "registryUrl": {
                        "title": "CPPA registry CSV URL",
                        "type": "string",
                        "description": "Defaults to the public CPPA data broker registry CSV.",
                        "default": "https://cppa.ca.gov/data_broker_registry/registry.csv"
                    },
                    "maxBrokers": {
                        "title": "Max brokers",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Stops after this many registry rows to control spend and run time.",
                        "default": 100
                    },
                    "includePageScan": {
                        "title": "Scan broker pages",
                        "type": "boolean",
                        "description": "When enabled, fetches public broker pages and extracts privacy/opt-out/delete/GPC/noindex evidence. Ignored in registry_snapshot mode."
                    },
                    "includeDomains": {
                        "title": "Only include domains",
                        "type": "array",
                        "description": "Optional domain allow-list for targeted validation runs. Matches exact domains and subdomains, so example.com also includes www.example.com. Leave empty for registry order.",
                        "items": {
                            "type": "string",
                            "pattern": "^(?:[^.\\s/:]+(?:\\.[^.\\s/:]+)+\\.?|https?:\\/\\/[^.\\s/:]+(?:\\.[^.\\s/:]+)+(?:\\/\\S*)?)$"
                        },
                        "default": []
                    },
                    "scanConcurrency": {
                        "title": "Scan concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Number of brokers scanned in parallel.",
                        "default": 5
                    },
                    "maxPagesPerBroker": {
                        "title": "Max pages per broker",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Bounds public-page fetches per broker. Initial URLs are the primary website and CA consumer-rights URL, then discovered evidence links.",
                        "default": 4
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout seconds",
                        "minimum": 5,
                        "maximum": 60,
                        "type": "integer",
                        "description": "Per-page HTTP timeout.",
                        "default": 20
                    },
                    "diffPreviousSnapshotId": {
                        "title": "Previous snapshot ID",
                        "type": "string",
                        "description": "Optional key-value store record name for diff mode. Defaults to the latest saved evidence-pack snapshot."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
