# 🛡️ Data Breach Monitor - New Breach Alerts by Domain (`that_red_bird/breach-monitor`) Actor

⚡ Know the day a new data breach is published. ✅ Watches the Have I Been Pwned breach catalogue and reports only what is new. ✅ Filter by company domain, exposed data type or size. No API key required — uses the public catalogue endpoint.

- **URL**: https://apify.com/that\_red\_bird/breach-monitor.md
- **Developed by:** [mohamed alaya](https://apify.com/that_red_bird) (community)
- **Categories:** Developer tools, Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Data Breach Monitor

Know the day a new data breach is published — and specifically whether it touches a company
you depend on.

Watches the **Have I Been Pwned breach catalogue** and reports only breaches that are new
since your last run.

### What you get per breach

`title` · `domain` · `accounts` (how many were exposed) · `breachedAt` · `addedAt` ·
`dataClasses` (passwords, credit cards, addresses…) · `description` (HTML stripped) ·
`verified` · `sensitive` · `malware`

### Filtering

- **`domains`** — only breaches at companies you use, e.g. your vendors and SaaS suppliers
- **`dataClasses`** — only breaches exposing passwords, or payment data, or whatever matters
- **`minAccounts`** — ignore small breaches
- **`verifiedOnly`** — skip anything HIBP has not verified

### Announced exactly once

A ledger of reported breach ids means nothing is sent twice. The **first run records a
baseline** instead of announcing the entire historical catalogue of 900+ breaches at you — but
it does not run silent: it pushes one `baseline-summary` row plus up to `baselineSampleSize`
(default 10, set to 0 to disable) of the breaches currently matching your filters, each tagged
`isBaseline: true` so they're never mistaken for a real "new breach" alert. That keeps the
run's dataset genuinely non-empty and useful instead of silently returning nothing on day one.
After that, every run reports only genuinely new entries.

### Privacy note, stated plainly

This uses HIBP's **public breach catalogue** endpoint, which needs no API key. It does **not**
look up individual email addresses — that is a separate, paid HIBP endpoint and is
deliberately not used here. So this tells you *"a company you rely on was breached"*, not
*"this specific person was in it"*.

### Typical uses

Security teams tracking vendor and supply-chain risk · MSPs watching their clients' providers ·
compliance teams needing a documented monitoring control · researchers and journalists
tracking breach volume · anyone who wants to force a password rotation the day it matters
rather than a month later.

# Actor input Schema

## `domains` (type: `array`):

Partial match on the breached company's domain, e.g. adobe.com. Leave empty to watch every new breach.

## `keywords` (type: `array`):

Case-insensitive match on the breach title, domain and description.

## `dataClasses` (type: `array`):

Match breaches exposing these data classes, e.g. Passwords, Credit cards, Physical addresses.

## `minAccounts` (type: `integer`):

Ignore breaches smaller than this.

## `verifiedOnly` (type: `boolean`):

Skip breaches HIBP has not verified.

## `onlyNew` (type: `boolean`):

Keeps a ledger of announced breach ids. The first run records a baseline silently rather than announcing the entire historical catalogue.

## `resetBaseline` (type: `boolean`):

Clear the seen-breach ledger and start fresh.

## `baselineSampleSize` (type: `integer`):

On the first run (no ledger yet), how many of the currently-matching breaches to include as a labelled sample (isBaseline: true) alongside the summary row, so the dataset is never empty.

## `maxItems` (type: `integer`):

Hard cap on dataset rows per run. 0 = no cap.

## `webhookUrl` (type: `string`):

POSTed when new breaches appear. Slack/Discord/Zapier compatible.

## `stateStoreName` (type: `string`):

Named key-value store holding the seen-breach ledger.

## Actor input object example

```json
{
  "verifiedOnly": false,
  "onlyNew": true,
  "resetBaseline": false,
  "baselineSampleSize": 10,
  "maxItems": 0,
  "stateStoreName": "breach-monitor-state"
}
```

# Actor output Schema

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

No description

## `downloadCsv` (type: `string`):

No description

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("that_red_bird/breach-monitor").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("that_red_bird/breach-monitor").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 '{}' |
apify call that_red_bird/breach-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,that_red_bird/breach-monitor"
        }
    }
}

```

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/8a6aClHPcFwRqUWTf/builds/3Nl68w2z6IWiiu163/openapi.json
